body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
dpkg: error processing package liblmdb0:amd64 (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration Setting up libevdocument3-4:amd64 (3.18.2-1ubuntu4.1) ... Setting up libevview3-3:amd64 (3.18.2-1ubuntu4.1) ... Setting up evince-common (3.18.2-1ubuntu4.1) ... Setting up evince (3.18.2-1ubuntu4.1) ... Setting up libepoxy0:amd64 (1.3.1-1ubuntu0.16.04.2) ... Processing triggers for libc-bin (2.23-0ubuntu9) ... Errors were encountered while processing: liblmdb0:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1) I am getting this error every time I execute these commands on the terminal: sudo apt-get update && sudo apt-get upgrade sudo apt-get autoremove I'm running Ubuntu 16.04 I can't uninstall programs in my system and I'm also getting a System Error popup everytime my computer starts.
|
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?
|
I know that $e^xe^y=e^{x+y}$ but I want to show it by expanding the exponentials in MacLaurin Series. $$ \left(\sum_{n=0}^{\infty} \frac{x^n}{n!}\right) \left(\sum_{m=0}^{\infty} \frac{y^m}{m!}\right) =^? \sum_{n=0}^{\infty} \frac{(x+y)^n}{n!} $$ This is what I have. I'm not sure what my next step would be since I can't think of a way to combine the two summations on the RHS.
|
In order to show $e^{x+y}=e^{x}e^{y}$ by using Exponential Series, I got the following: $$e^{x}e^{y}=\Big(\sum_{n=0}^{\infty}{x^n \over n!}\Big)\cdot \Big(\sum_{n=0}^{\infty}{y^n \over n!}\Big)=\sum_{n=0}^{\infty}\sum_{k=0}^n{x^ky^n \over {k!n!}}$$ But, where should I go next to get $e^{x+y}=\sum_{n=0}^{\infty}{(x+y)^n \over n!}$. Thanks in advance.
|
e.g. imagine somebody is looking for an apartment and needs it from September. They see a post somewhere that says "Crazy cool apartment available from August" and they just ignore the fact that it says "from August". So when asked "Are you going to take this from August?" they just reply "Oh no I need it from September". Is there a word for such a behaviour? I can't think of any in either english, italian, spanish or french. Even if you a slovakian word for it, I'd be really interested in it!
|
I know what this word really means but I cannot help to think that ignorant also means he ignores his surrounding or the consequences of his actions. "He was ignorant, unwilling to warn the police about what has been happening next door for years” for example. Can anyone tell me the word I am looking for? Or is it too broad to find a suitable adjective?
|
The $\underbrace{a=b=c}_{\text{comment}}$ command is producing a bracket below the equality $a=b=c$ and gives the opportunity to write a comment below that equality. Is it possible to replace that bracket by something else, such as an horizontal $[$?
|
I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me believe that is possible to decorate the end of the \overline bar. I know the existence of \overbrace, but I need a square bracket; moreover, \overbrace takes too much vertical space
|
How do I create a directory with read, write and execute permission in ubuntu 14.04. I have a web-app written in php and I am using <?php mkdir('/items/folder', 0777, true); ?> to create folders but the its not assigning the right permission to my folders, even using chomd on my php script fails. The app is on a digitalocean vps.OS is ubuntu 14.04. What can I do?
|
I having a weird problem on my VPS with Ubuntu 14.04 as the server. I tried creating a directory with php mkdir using the code below <?php mkdir("/items/foldername", 0777, true); ?> Whenever i run this script,the folder gets created but with 755 permission instead of 777. I have tried all available options I can see none is working. My php script is using www-data. I have tried the following sudo chmod -R 777 items sudo chmod -R g+s items I added www-data to the root group
|
I'm working an assignment to create a list with no maximum number of elements with generics. Before I add a generic to my code, I wanted to try it with a basic int first. However, I keep getting a NullPointerException whenever I make a call to my append() method. Here's the code: public class PythonList { class Node { int data; Node next; public Node(int data) { this.data = data; next = null; } } Node head; public void append(int x) { Node currentNode = head; Node tempNode = new Node(x); while(currentNode.next != null) { currentNode = currentNode.next; } currentNode.next = tempNode; } public static void main(String[] args) { PythonList list = new PythonList(); list.append(1); list.append(2); list.append(3); list.append(4); } I know the logic behind this is sort of in the style of Python, but I've never studied Python before, and I need help understanding why the while loop causes a NullPointerException that crashes my program every time?
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
I know that this feature dates back 20 years but I still would like to find out What is the purpose of the reserved blocks in ext2/3/4 filesystems?
|
I understand that by default, newly created filesystems will be created with 5% of the space allocated for root. I also know you can change the defined space with: tune2fs -m 1 /dev/sdXY What I'm curious about though, is what the actual purpose for this reserved space is. Does it serve any practical purpose which would merit more than 5% space in some circumstances? The reason I've stumbled upon this question is that we recently built a 1TB filestore, and couldn't quite figure out why a df -h left us missing 5% of our capacity.
|
I have installed Ubuntu 18.04 LTS for testing on a crash dummy in anticipation of upgrading my 16.04 LTS machines. So far everything is working quite well and I do like some of the changes and improvements. One thing I noticed though is that Ubuntu seems to be "calling home" to Google web sites on a frequent, periodic basis. Wondering what that's all about. This issue was regarding a similar situation in Ubuntu 17.10 but the answer and reasons for this snooping were extremely vague. I block all outside traffic to/from my local subnet (192.168.0.0/24) and force all Internet traffic to go through my VPN. All of this works well. Every five minutes I see five packets as follows: [ +4.160090] [UFW BLOCK] IN= OUT=wlx00026f5a322b SRC=192.168.0.11 DST=104.198.143.177 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=10309 DF PROTO=TCP SPT=44246 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0 [ +8.192209] [UFW BLOCK] IN= OUT=wlx00026f5a322b SRC=192.168.0.11 DST=104.198.143.177 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=10310 DF PROTO=TCP SPT=44246 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0 The destination IP isn't always the same but a whois verifies that they are all owned by Google. Updates, NTP and so on seem to be working correctly and are (I assume) properly going through my VPN. In testing this I have all apps shut down so it seems like it's something in Ubuntu itself that is causing these attempted connections. There is nothing Google-related turned on that I can see. Chrome isn't even installed. jones@Office-Ubuntu:~$ ps -ef | grep chrome jones 19610 1930 0 10:24 pts/0 00:00:00 grep --color=auto chrome jones@Office-Ubuntu:~$ If I didn't have the firewall enabled I'd never even know this was going on. If I go to the web site IP it does render a (blank) page which makes me think that the purpose for these connection attempts is data collection. Since this is Google, I am naturally suspicious/paranoid that something creepy is going on. A related indicates that this might be some sort of a "keep-alive" function. If so, it is obviously not needed since I am blocking the connections in UFW and everything continues to work perfectly. I see no way to turn this off as described in the related question. And as an aside, if this is indeed some sort of a "keep-alive" "feature" there are probably better ways to implement that capability without exposing the Ubuntu community to Google's data collection warehouse. And when/why did Ubuntu start thinking it would be a good idea to collaborate with Google to collect user information surreptitiously? My question differs from the inasmuch as the answer there implied (apparently incorrectly) that these connections are necessary and benefit Ubuntu users (but doesn't really explain why). The primary question I am asking is this: How do I "opt-out" of this unwanted intrusion into my privacy since connecting to a Google web site every five minutes is clearly not needed to keep anything useful in Ubuntu functioning?
|
I am using Ubuntu 17.10 on my desktop PC, I've been monitoring network traffic with Etherape. I noticed HTTP requests from my PC(casa hostname) to googleusercontent.com (104.198.143.177). So I used lsof and ss to 'identify' process behind these requests. Using lsof -i: NetworkMa 778 root 20u IPv4 546772 0t0 TCP casa:53671->177.143.198.104.bc.googleusercontent.com:http (SYN_SENT) NetworkMa 778 root 20u IPv4 546772 0t0 TCP casa:53671->177.143.198.104.bc.googleusercontent.com:http (ESTABLISHED) Using ss -rep dst 104.198.143.177: tcp SYN-SENT 0 1 casa%enp4s0:53671 177.143.198.104.bc.googleusercontent.com:http users:(("NetworkManager",pid=778,fd=20)) timer:(on,964ms,0) ino:546772 sk:6df <-> tcp ESTAB 0 87 casa%enp4s0:53671 177.143.198.104.bc.googleusercontent.com:http users:(("NetworkManager",pid=778,fd=20)) timer:(on,300ms,0) ino:546772 sk:6df <-> It seems NetworkManager (pid 778) is sending requests to googleusercontent, and it happens every 5 minutes exactly. I have to say, no applications were launched at the moment, no background process, no network activities,no online account and it was a 'Ubuntu fresh install'. So why NM would sent requests to googleusercontent?
|
I'd like to know if there is any sort of explaination from rigurous biological arguments which could potentially explain how homeopathies could work? I'm not talking about placebo effects (psychological) or "water memory" (purely hypothetic), but really about the immune system itself. Usually, there is only 1, or a really insignifiant amount of toxins after the dillutions for the homeopathies. But does that mean that there is absolutely no effect on the organism, biologically talking? Or could there be some immune memory taking place here for example (ik it is usually in adaptative reaction with the lymphocytes, but does it happen with the white cells or other stuff)? I'm just curious about it :), thanks!
|
Even though we have a very high tech society, cancer is still a serious issue. We humans still are not entirely capable of fighting cancer. Radiation and chemotherapy are still considered the best methods for treating it and frequently, even these don't work. And, as for this disease, it is a phenomenon of uncontrolled cell growth that has lead to the death of many people. Within these main two treatments, there is plenty of controversy surrounding applying radiation and chemo in a proper sequence. However, there are also some different methods known and available on the market to treat cancer. Among them, homeopathic and herbal treatments are the most common. So, my question is, do they really work and is there any scientific evidence of that? If yes then what is it?
|
I have a button which is generated in a function via a mustache JS template. {{#attributes}} <a class="button--small btn" data-selector="{{selector}}">{{title}}</a> {{/attributes}} and a sample output of that is <a class="button--small btn" data-selector=".news">More News</a> However, I am trying to execute another jquery function when this button is clicked but regardless of whether I use .click(function() { }); or .bind it doesn't seem to work? Even a console.log doesn't print so I'm not getting into the right conditions. Here is the script: function lazyload(selector) { $("a[data-selector^='"+selector+"']").bind("click", function(e) { e.preventDefault(); loadNews(selector); }); } $(document).ready(function(){ lazyload(".news"); // CALL FUNCTION READY FOR USAGE });
|
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've made a function/command for use mid-sentence, but it adds spaces everywhere it's inserted. Is there a way to flag it so it doesn't make them? Code: \def \testvar{0} \newcommand{\test} { \ifnum \testvar=1 { test0 } \else { test1 } } Inside document: aaaa \test aaaa Output: aaaa test1 aaaa Wanted output: aaaa test1 aaaa
|
I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
|
I want to take a list for sorting and sort it using python random library. The strategy to do this: First, take any two random index in the list we take as input Then swap those two elements. check if the list is sorted or not. if not sorted , repeat the steps again. I am new in python. So not well acquainted with all the techniques . Please help with explanation. I cant figure out what is going wrong. from random import randint n=int(input()) l=[int(input()) for x in range(0,n)] p=1 while (1): if(p==1): ransort(n) else: break for x in l: print (x) def ransort(n): i=randint(0,n-1) j=randint(0,n-1) l[i],l[j]=l[j],l[i] if l== l.sort(): p=0 else: p=1 return p
|
What exactly are the Python scoping rules? If I have some code: code1 class Foo: code2 def spam..... code3 for code4..: code5 x() Where is x found? Some possible choices include the list below: In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop Also there is the context during execution, when the function spam is passed somewhere else. And maybe pass a bit differently? There must be a simple reference or algorithm somewhere. It's a confusing world for intermediate Python programmers.
|
If I am rolling I die until I roll every number at least once, what is the expected value of times that I will need to roll the die? After a brief computer simulation, I got 15. But why is this the answer?
|
What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die? The order in which the numbers appear does not matter. I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation. We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$ Can someone please explain this to me, possibly with a link to a general topic?
|
If $f(x)$ is a quadratic expression such that $f(x) > 0,\ x\in\mathbb{R}$ and if $g(x)= f(x) + f'(x) + f''(x)$, then prove that $g(x) > 0, \ x\in\mathbb{R}$.
|
If $f(x)$ is a quadratic expression such that $f(x)>0\;\forall x\in\mathbb{R},$ and if $g(x)=f(x)+f'(x)+f''(x),$ Then prove that $g(x)>0\; \forall \; x\in \mathbb{R}$. $\bf{My\; Trial \; Solution::}$ If $f(x)>0\;\forall x\in \mathbb{R}$. Then function $f(x)$ has Minimum value . Let Minimum occur at $x=x_{0}$. Then $f(x)_{Min} = f(x_{0})>0$ Now Given $g(x) = f(x)+f'(x)+f''(x)$. Then $g'(x) = f'(x)+f''(x)+f'''(x).$ Now at $x=x_{0}\;\;,$ Value of $g(x_{0}) = f'(x_{0})+f''(x_{0})+f'''(x_{0}) = 0+f''(x_{0})+f'''(x_{0})$ Now I did not understand How can i solve after that, Help me Thanks
|
I know there are a lot of threads, tutorials and questions about how to work around it, but I do not get, WHY you simply cannot use Ctrl+C and Ctrl+V to insert a line for example from the browser into the bash (Linux) / cmd (Windows). Is there a specific reason why this isn't yet implemented? It works like this: Ctrl+C from the source Right Click -> Paste in the Bash or CMD
|
When I copy something to the clipboard and press Ctrl + V in Bash, nothing happens; However, right clicking and selecting Paste does the job. Why? Is there any reasonable issue (I'm sure there is) behind this behavior in Linux?
|
I am making an app that gets weather info from the web. I am getting the whole JSONObject at once, instead of piece by piece. As a result of that, I can't call .getDouble for temperature, I call getString. This returns a String, which I can't use the Math.round method on. I tried the .split(".") and it returns an array out of bounds exception, when I try to instert the sting into a text view. If I call .toString() it gives me "[Ljava.lang.String;@7353879" in the textview.
|
In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the of the array, as defined by Object.toString(): int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray); // prints something like '[I@3343c8b3' But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs: // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5] // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]
|
This is Ubuntu 20.04.1 LTS. I execute the following command to add user "louyang" to group "vboxsf". $ sudo usermod -G vboxsf -a louyang The command seems ok without any output. but when I try to list with the following command, $ id uid=1000(louyang) gid=1000(louyang) groups=1000(louyang),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd) It show that I doesn't in that group, why? BTW, the following command may show that I already in that group, which information I should trust, command id? or grep vboxsf /etc/group? $ grep vboxsf /etc/group vboxsf:x:998:louyang
|
Im not sure why the following have different output. My understanding is that groups without specifying a user give all the groups the currently logged in user is a member of. jacob@box:~$ groups jacob adm lp dialout cdrom plugdev lpadmin sambashare jacob@box:~$ groups jacob jacob : jacob Also what does it mean "groups of the current process" (from the groups man page)? Where are they set up? NOTE: My distro is Ubuntu.
|
Let $X$ be a non-trivial (other than singleton $x$) normed space. Prove that $X$ is a Banach space if and only if $\{x \in X \mid \|x\| = 1 \}$ is complete.
|
Let $X$ be a normed vector space. Show that if a subsequence of a Cauchy sequence converges, then the whole sequence converges. Use the part 1 to show that $S = \{x\in X : \|x\| = 1\}$ is complete if and only if $X$ is Banach. I have found the first part in a book, but I do not how to prove part 2. Thanx regards
|
Chewbacca’s bowcaster is firing red projectiles in Episode VII. As far as I can remember from movies, shows and games bowcasters only fire green projectiles. A Wookiee firing a green projectile from a bowcaster in Star Wars: Episode III (at about 50 minutes) Why does Chewbacca’s bowcaster fire red projectiles in The Force Awakens? Is there more information about this bowcaster? Have there been others that I did not notice? A related question:
|
In “The Force Awakens” Han Solo, Chewbacca and Finn are caught in a battle on the planet Takodana—where Maz Kanata lives, hangs out and does whatever she does—and Chewbacca begins using his bowcaster to pick off Stormtroopers like flies. At one point in the middle of the battle, Han Solo asks to try the bowcaster out and exclaims something along the lines of, “I like this thing!” Okay, okay… Han Solo likes that big, bad powerful bowcaster… But why is he so surprised and delighted by its power and handling apparently only now in this film? Hasn’t Chewbacca had that bowcaster for at least 30 years? And within those 30 years you are telling me Han Solo has never put his hands on that bowcaster before? Or witnessed its power in action? Really? The first time he’s touched it is during the events in this film? What is the in-universe explanation for this? I mean I know some couples are shockingly oblivious to the things their partners have, use, do and have done. But this seems a bit of a stretch coming from someone like Han Solo who seems to spend endless days/nights with his Wookiee sidekick getting into all kinds of wacky action/adventure predicaments.
|
Let $x\in(0,\pi/2)$ and $\{a_n\}_{n\in\mathbb N}$ defined recursively as follows: $$ a_0=x, \quad \text{and} \quad a_{n+1}=\sin(a_n). $$ Show that $$ \lim_{n\to\infty}{n\,a_n^2}=3. $$ Note. There is a very strong numerical evidence that the above is valid, and the limit is independent of the initial choice of $a_0$. I have no idea where to start from.
|
Consider the sequence defined as $x_1 = 1$ $x_{n+1} = \sin x_n$ I think I was able to show that the sequence $\sqrt{n} x_{n}$ converges to $\sqrt{3}$ by a tedious elementary method which I wasn't too happy about. (I think I did this by showing that $\sqrt{\frac{3}{n+1}} < x_{n} < \sqrt{\frac{3}{n}}$, don't remember exactly) This looks like it should be a standard problem. Does anyone know a simple (and preferably elementary) proof for the fact that the sequence $\sqrt{n}x_{n}$ converges to $\sqrt{3}$?
|
Let $G$ be à profinite group and $\widehat{G}$ his profinite completion. I want to show (I hope it's true) that $\widehat{G}$ is strongly complete that is all normal subgroups of finite index are open sets. For that I take $\widehat{N}$ a finite index normal subgroup of $\widehat{G}$ and try to find $N$ normal subgroup of finite index of $G$ such that $\widehat{N}=\ker\left(\varphi_N:\widehat{G}\to G/N\right)$. I tried $N=\theta^{-1}\left(\widehat{N}\right)$ where $\theta:G\to\widehat{G}$ but could not conclude. Not rely with I think: I don't want a different definition of strongly complete but I want to check that somewath ($\widehat{G}$ here) is strongly complete.
|
Let $G$ be a profinite group (or equivalently a compact and totally disconnected topological group ) with the property that all of its normal subgroups of finite index are open sets. Does this imply that all of its subgroups of finite index are open sets ? (if all subgroups of finite index from $G$ are open sets, than $G$ is called strongly complete ; this motivates the title of this post)
|
My Calculus II teacher left us the task of finding a sequence that is conditionally convergent, and that if we multiply it by $(-1)^n$ it converges. I think that sequence could be $\frac{sen(n)}{n}$. But first I have to prove that it is conditionally convergent, for that I will use the Dirichlet test. And one of his hypotheses is that the partial sums of $\Sigma_{n=1}^\infty \sin(n)$ are bounded , but I don't know how to do it. I would appreciate if you do not use very complicated things in the proof, since I would also have to demonstrate them.
|
So I'm trying to prove some series converges, and I'm trying to show it by using the Drichlet test. So I need to prove that the series of partial sums $\Sigma_{k=1}^\infty \sin(ki)$ is bounded. I tried proving it by dividing and multiplying with $2\cos(\frac{i}{2})$ and then using the trigonometric identity $2\cos(\beta)\sin(\alpha)=sin(\alpha+\beta)-sin(\alpha-\beta)$, which creates a telescopic series - but I didn't manage to bound the result. Any assistance would be great! Thanks in advance!
|
Prove that, if $a_k \geq 0$ for large $k$, and that $$\sum_{k=1}^\infty \frac{a_k}{k}$$ converges. Prove that $$\lim_{j \rightarrow \infty} \sum_{k=1}^\infty \frac{a_k}{j+k} = 0$$ I believe I cant write $$\sum_{k=1}^\infty \frac{a_k}{j+k} \leq \sum_{k=1}^\infty \frac{a_k}{k}.$$ However, taking limit does not give me the answer.
|
Exercise: Suppose that $a_k \geq 0$ for $k$ large and that $\sum_{k = 1}^{\infty} \frac{a_k}{k}$ converges. Prove that $$\lim_{j \to \infty}\sum_{k = 1}^{\infty} \frac{a_k}{j+k} = 0$$ Attempt in proof: Suppose $a_k \geq 0$ for any large $k$ and that $\sum_{k = 1}^{\infty} \frac{a_k}{k}$ converges. . Then give $\epsilon >0$ there is $N \in N$ such that $\left|\sum_{k = n}^{\infty} \frac{a_k}{k}\right| < \epsilon$. Let $s_n = \frac{a_n}{j+k}$ denote the partial sums. Then $\sum_{k = 1}^{\infty} \frac{a_k}{j+k} $ will converge to zero if and only if its partial sum converges to zero as n approaches infinity. Taking the limit of $$\lim_{j \to \infty}\sum_{k = 1}^{\infty} \frac{a_k}{j+k} = \lim_{j \to \infty}\frac{a_1}{j + k} + \cdots+ \frac{a_n}{j + k} + \cdots = \lim_{j \to \infty}\frac{a_1/j}{1 + k/j} + \cdots+ \frac{a_n/j}{1 + k/j} +\cdots $$ Can someone please help me finish? I don't know if this a right way. Any help/hint/suggestion will be really appreciate it. Thank you in advance.
|
I wanted to apply but since I'm using fractions it's all crowded and messy. Is there a way to leave more space between the lines? \begin{equation*} \begin{array}{c|c c c|c} &1 &-2 &1 &-\frac{4}{27}\\ \frac{1}{3} & &\frac{1}{3} &-\frac{5}{9} &\frac{4}{27}\\ \hline & 1 &-\frac{5}{3} &\frac{4}{9} &0\\ \end{array} \end{equation*}
|
I am trying to code a command in LaTeX to type the . You can see in the Wikipedia link above that these are rather simple tables. There is a vertical line at the beginning, after the first column, and there is a horizontal line at the end, before the last row. I would like to have a command that I can pass the numerical entries of the table and ir draw the rest. How to do this? I would like something like \ruffini{...} and in entries we either enter the list of numbers, perhaps separated by commas. Or maybe even entering the numbers with the separators & and \\ to format in what position the go in the table. But I wouldn't want to be thinking about the lines in the table. I would like the command to take care of the line.
|
I was just trying function hoisting in js , I have a doubt in below code // Case 1 var foo = function() { return 3; } // Case 2 function foo() { return 2; } alert(foo()); Why case1 gets preference over case 2 always? case 2 never overrides case 1 , why?
|
I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent. The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not. The two ways are: var functionOne = function() { // Some code }; function functionTwo() { // Some code } What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?
|
i'm testing another simple program for drawing a line. First problem is the error. Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at GUI$2.paint(GUI.java:57) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) This is the code for line 57 g.drawLine(pointStart.x, pointStart.y, pointEnd.x, pointEnd.y); panel = new JPanel(){ Point pointStart = null; Point pointEnd = null; int x = 1; { addMouseListener(new MouseAdapter(){ public void mousePressed(MouseEvent e){ pointStart = e.getPoint(); } public void mouseReleased(MouseEvent e){ pointEnd = e.getPoint(); } }); addMouseMotionListener(new MouseAdapter(){ public void mouseMoved(MouseEvent e){ pointEnd = e.getPoint(); } public void mouseDragged(MouseEvent e){ pointEnd = e.getPoint(); repaint(); } }); } public void paint(Graphics g){ super.paint(g); g.setColor(a); g.drawLine(pointStart.x, pointStart.y, pointEnd.x, pointEnd.y); } }; If i can ask, how do i save the lines that has been drawn? Thanks
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
my nexus 4 , almost 1 month old, died all of a sudden ,only thing its doing nw is flashing a red light on charging. Cant switch it on or even cant reboot. As discussed in the this form i initially thought its complete battery drainage issue. so i kept the phone charging for almost 24hrs ....still no use... i bought it frm US thru my cousin and im staying outside , so its not kind of easy for warranty claiming also .
|
This morning my Nexus 4 wouldn't turn on, so I plugged it in, but the white battery recharging icon doesn't show up when I press Power, and holding Power doesn't turn on the phone. Instead the notification light blinks a deep red. The screen was totally unresponsive. Lots of websites have plenty of doom and gloom hinting that red light = device is bricked, but I see no official source for this. What does this light mean?
|
Let A be a Lebesgue measurable set. Let f: $\mathbb{R} \rightarrow \mathbb{R}$ be a function of the class $C^1$; Is this true that f(A) is lebesgue measurable? I know that this is true when f is injective. But I don't know that when f is not injective. Could you teach me it is true or not? Sorry for my poor English.
|
Let $n$ be a positive integer. $\; $ Let $f : \mathbb{R}^n \to \mathbb{R}^n$ be everywhere . Let $S$ be a subset of $\mathbb{R}^n$ with zero. Does it follow that $\{f(s) : s\in S\}$ has Lebesgue measure zero? (I know it would if $D(f)$ is continuous.)
|
From what I have read having a \ will ignore the break character in a Java string. So I have the following code: //requestedFile is created from a substring from above and contains the string "WebRoot\" if(requestedFile == "WebRoot\\" { do stuff } Are these not the same thing?
|
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
|
Show that the projection map of $[0,1] \times \mathbb{R} $ onto $\mathbb{R}$ is a closed map. I know that [0,1] is a compact space but I am not sure how this implies that the projection map is closed. I know that in plain old $\mathbb{R} \times \mathbb{R} $ the projection map is not closed because the graph of $f(x) = 1/x $ is closed but has open projection and that in $[0,1] \times \mathbb{R} $ we can't have this type of function, but that's it. Thanks for any tips or help.
|
Let $\pi: X \times Y \to X$ be the projection map where $Y$ is compact. Prove that $\pi$ is a closed map. First I would like to see a proof of this claim. I want to know that here why compactness is necessary or do we have any other weaker condition other than compactness for the same result to hold.
|
I have currently started and completed a lot of Ks3 physics papers. I have decided to go right back to basics so now I feel that I can start working at GCSE level but the only reference I can find to do this is BBC Bitesize. but I find that this only covers some parts and not others, I want something more in depth and can anyone point me in the right direction without me having to pay for an online course?
|
Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start. All the questions linked below, as well as others which deal with more specialized books, can be found under the tag (formerly ). If you have a question to add, please edit it in. However, make sure of a few things first: The question should be tagged It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list Related Meta:
|
I have been using the Java documentation for OpenJDK 1.7, but I am not seeing a lot of information on Big-Oh notation in terms of complexities of operations between different container types, which is making it harder to know which is the most performance collection to use for my task at hand; for example, implementing a stack or a queue. I have been using an ArrayDeque for both just following my C++ instincts. The basics are there, such as ArrayList is faster than LinkedList, but there doesn't seem to be a consistent section for this. In C++ documentation, there is a section like the one below. Any Javadoc references that speak about complexities between containers would be helpful. C++ example: Complexity Average case constant, worst case linear in the size of the container. Java Example: Embedded in the ArrayList documentation I found the following The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant factor is low compared to that for the LinkedList implementation.
|
I may be teaching a "Java crash-course" soon. While it is probably safe to assume that the audience members will know Big-O notation, it is probably not safe to assume that they will know what the order of the various operations on various collection implementations is. I could take time to generate a summary matrix myself, but if it's already out there in the public domain somewhere, I'd sure like to reuse it (with proper credit, of course.) Anyone have any pointers?
|
I have two layers. One with small Polygons and one with a line. I want to select all Polygons which intersect with the line. Additionally the selected Polygons should be sorted by the order of the line, as a line has always a start and a end. The first polygon that intersects at the start of the line should be on top of the attribute table. The second one on second place and so on.
|
I have 119 parcels that intersect a polyline. I want to be able to sort the table to see if any of the land owners in the parcels have have consecutive ownership along the line. Is there a way to do this, or some other process to see the order?
|
I am looking for the best questions that have both the tags and . I get back a sorted by votes. Why wasn't returned to me, this was the one I was looking for and I could not find it. Why didn't it appear? Is it because it is a Wiki? If so, how am I supposed to find it? EDIT: The reason this bothers me slightly is because this question is actually in the IDE section. Reading it once and then looking for it on SO and not finding it is quite disconcerting! If it is considered a useless question, why is it linked?
|
Historical locks are sometimes applied to questions. What is a historical lock? What is the purpose of a historical lock? How are questions affected by historical locking? When is it appropriate to lock a question for historical reasons? When is it not appropriate? How do I request a historical lock for a question? What should I do if I notice a serious problem with a historically-locked question or one of its answers?
|
I use Ubuntu 16.04. I installed , , and theme. My current terminal look like this I can any symbol from awesome fonts to my terminal. But how can I add image in my terminal?, same as beautiful terminal in
|
OS X has emoji support inside terminal, and I'm a little jelly. brings emoji support to Ubuntu, but at the moment the terminal will only render monochrome emojis. Is there a way to get these color beauties in gnome terminal?
|
$$\Large x^{x^{x^{x^{x^{.^{\,.^{\,.}}}}}}} = 2$$ What is $x$?
|
How do you approach a problem like (solve for $x$): $$x^{x^{x^{x^{...}}}}=2$$ Also, I have no idea what to tag this as. Thanks for any help.
|
Let $\cdot$ be an action of a group $G$ on a set $X$. For $g\in G$, define the map $\phi(g):X\to X$ by $\phi(g)(x)=g\cdot x$. I'm asked to show that $\phi(g)\in {\rm Sym}(X)$ and that $\phi :G\to{\rm Sym}(X)$ is a homomorphism. I've shown that $\phi(g)\in{\rm Sym}(X)$, but I don't understand how to show $\phi$ is a homomorphism? I know it follows from the definition of an action, but what even is the function $\phi: G\to Sym(X)$ explicity? The solution says that $\phi$ being a homomorphism follows immediately from the fact that $\phi (gh)(x)=g\cdot (h\cdot x)$, but aren't $\phi$ and $\phi (g)$ different functions?
|
Checking out and (and some papers) was a bit difficult for understanding Group Action. The closest to understanding was this part: I understand the definition of homomorphism (a structure-preserving map between two algebraic structures of the same type). And from what I understand the symmetric group is a group of functions (bijective functions) mapping elements of a set $X$ onto itself. However I get confused at this line: ...an action of $G$ on $X$ may be formally defined as a group homomorphism $\phi$ from $G$ to the symmetric group of $X$. That seems to be the definition of group action, but I am having trouble understanding how to apply that. What that says to me is it is a homomorphism (function) $f \colon X \rightarrow S$ where $S$ is a set of bijective functions on $X$. That itself seems weird, I thought a group action would result in a number or something related to $\{1, 2, 3\}$ (defined next). Continuing, if we have a set $X = \{1, 2, 3\}$ and a group $(*,\{4, 5, 6\})$, then the symmetric group of $X$ would be something like $S = \{1 \rightarrow 2, 2 \rightarrow 3, \dots \}$, and $\phi$ would be something like $f : \{4, 5, 6\} \rightarrow S$. That doesn't make sense to me and I feel like I'm interpreting something wrong. I don't see how mapping to a set of functions $S$ will result in an action on the set.
|
I'm a bit stumped as to why this code is failing and have used numerous examples, but with no success. This is the exact issue I'm stuck on. You will notice that you can create a new row by clicking on the '+' icon, but when you attempt to remove a row by clicking on the trash can icon, presently, it should popup an alert just affirming that we made it into the function. This never happens and henceforth, is the reason for this post. $("[id^=removeitem]").click(function() { var elmId = $(this).attr('id'); alert(elmId); }); Any help would be so very appreciated!
|
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 have an object I want to rotate about a specific point. I've tried this answer but it doesn't work because when I open the Transform -> Rotate dialog box and attempt to alt + LMB nothing happens except the rotate dialog box flashes goes it is the focus and not the canvas.
|
If I select Rotate tool, I can select center of rotation then and move it. After that I am able to rotate object around that center. But this rotation is imprecise. Suppose I want to rotate for 120 degrees. I can double click on Rotate tool and get Rotate dialog, where I can enter precise value in degrees. But this way I can't use shifted center of rotation because it jumps back to geometric center at the moment I call Rotate dialog. Is it possible to rotate by precise angle with dialog and have shifted center of rotation.
|
So let's say I have a score of 4 out of 5. How can I use /testfor to detect I have 4 points. I know how to use /testfor @p[score_Points_min=5. If I take out the min I get this: /testfor @p[score_Points=4] You know, to detect that I have 4 points. This should work right? No, it still activates when I have 2 points. I want this to tell me I have 4 points. I've tried every single command that would possibly work. However it STILL consists of activating no matter what score I have. How can I get this to work? For any more info ask me!
|
What if I want to make a command like this: execute @e[score_A=10] ~ ~ ~ summon Creeper So that the entity must have a score of 10 (not less, not more)? Does it even exist that or a [score_A_max=] argument? I know about scoreboard players test, but i guess it is not the case to use it.
|
I am using tufte-latex book format for writing my thesis. I have a full width table which I can easily define within table* environment in tufte book. As far as I understood, the caption should also be full width. However, I still get it on the right margin. Any idea how to solve this issue? I also want the caption to be placed on the top of the table. Here is my MWE: \documentclass[nols,a4paper,justified,marginals=auto]{tufte-book} \usepackage{makecell} \usepackage{booktabs} \usepackage{multirow} \renewcommand{\arraystretch}{1.2} \usepackage[flushleft]{threeparttable} \begin{document} \begin{table*}[h!] \centering \begin{threeparttable} \caption{here I have a long caption that I want it to be in the fullwidth format as the table but I get it in margin.\label{table3}}% \begin{tabular}{llllllllllllllllllll}% A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P\\% 0.50&$0.47^{a}$&0.48&0.50&0.47&0.48&0.60&0.39&1.00&\0.48&0.50&0.47&0.48&0.60&0.39&1.00\% \end{tabular}% \begin{tablenotes} %\footnotesize \item $^{a}$ some extra information about this number. \end{tablenotes} \end{threeparttable} \end{table*} \end{document} Thanks in advance.
|
I've tried to change the caption in a full-width float with tufte-book, but to no avail. I want the caption in this figure to be like more common LaTeX classes. Here is a MWE and the result: \documentclass[a4paper,nohyper]{tufte-book} %abstracton \usepackage{fontspec} \defaultfontfeatures{Ligatures={TeX}} \setmainfont[Numbers={OldStyle}]{Minion Pro} %or any other font \setsansfont{Myriad Pro} % or any other font \setmonofont[Scale=MatchLowercase]{Menlo} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{sidecap} \usepackage[dvipsnames]{xcolor} \usepackage{polyglossia} \setmainlanguage{brazil} \usepackage[bookmarks]{hyperref} %\usepackage[font=sf, labelfont={sf}, margin=1cm]{caption} \newfontfamily{\A}{Al Bayan} \begin{document} \begin{figure*} \centering \includegraphics[width=.9\textwidth]{./camp-scene} \caption{Cena de Acampamento. Mir Sayyid Ali, séc. XVII. 28,4 x 20 cm. Harvard University Art Museums, 1958.75. Os tecidos preenchiam a vida tanto dos nômades quanto dos habitantes das cidades, cobrindo o chão e definindo o espaço. O papel onipresente dos tecidos é visto numa pintura de um acampamento nômade, atribuído ao pintor persa do século XVI Mir Sayyid Ali.} \label{fig:camp-scene} \end{figure*} \end{document}
|
apt install does not work, for example: $ apt install uget Reading package lists... Done Building dependency tree Reading state information... Done E: The package intellij-idea-ultimate needs to be reinstalled, but I can't find an archive for it. This problem arose after I installed intellij idea using .
|
Running Synaptic I get the following error message: E: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it. E: Internal error opening cache (1). Please report. Upon accepting the message, Synaptic quits.
|
After battling a black screen and a boot loop I was able to boot my PC successfully. After using it a couple days, I understood that it doesn't connect to the internet anymore. And by that I mean it could ping 8.8.8.8 but none of the apps including the browser could connect to anything. I could not update any of the apps either as the update module gave me an error for unmet dependencies. I tried a couple fixes without success. I decided to say f it and install it fresh after backing up my files. Now that I'm trying to boot my PC and it's not going past the logo screen. What is the fix?
|
I am trying to boot Ubuntu on my computer. When I boot Ubuntu, it boots to a black screen. How can I fix this? Table of Contents:
|
I'd like to access multiple different devices residing on my home network, from anywhere else in the world, using custom domain names. I'm running a standard (commercial) router provided by my ISP, and don't have the option to change (they won't provide login info for the ADSL connection required by a third-party router). I'm aware of how to access things like my Raspberry Pi running web services with Nginx/Apache/Reverse proxy, but would like similar functionality (access to individual devices via unique domain names) for things like SSH too. Reverse Proxy's typically only handle HTTP(S) traffic, so aren't applicable for this scenario. One comment below mentions IPv6, but how would this actually be achieved through standard commercial routers?
|
I've grown quite fond of HTTP reverse proxies in our development environment and found the DNS based virtual host reverse proxy quite useful. Having only one port (and the standard one) open on the firewall makes it much easier for management. I'd like to find something similar to do SSH connections but haven't had much luck. I'd prefer not to simply use SSH tunneling since that requires opening port ranges other than the standard. Is there anything out there that can do this? Could HAProxy do this?
|
Is there any way to clear my Skype chat history in Fedora.My skype version is 4.3.0.37 and the fedora version is Version 3.14.2.
|
how clear the skype chat history ?
|
A moderator contacted me today via a Comment on an Answer to say that I seemed not to have seen his reply to a flag of mine that he had declined. Apparently, he had declined several similar ones from me. I've looked into trying to find and read these moderator replies, now that my attention has been drawn to them, but have had no success. The closest Meta posting that I could find was which seems to suggest that a year or so ago they were not able to reply to flags. If I want to see moderator replies to any of my flags where can I find them?
|
The (click on your number of helpful flags in your profile) is cool, however some posts have a gray background, some don't. What does it mean? example:
|
Find the value of $\sqrt{\left(\cos\theta\right)^2}$ at $\theta=\pi$ There can be two ways in which people will do this: First way: Put the value of theta directly, so $\sqrt{\left(\cos\pi\right)^2}$, answer will be $1$ Second way: Simplify the expression first and then put the value of $\theta$, so in this case one will get $-1$. Why do these two ways give different answers?
|
There is a formula given in my module: $$ \sqrt[n]{a^n} = \begin{cases} \, a &\text{ if $n$ is odd } \\ |a| &\text{ if $n$ is even } \end{cases} $$ I don't really understand the differences between them, kindly explain with an example.
|
A long time ago I read a short Sci-Fi story and I'm trying to figure out its Title/Author. Here is the plot and the last line: An attorney for one food producing company is trying to get the product of another company banned. He is standing up in front of a bunch of government officials or legislatures. All food is processed food in their economy; none of it is from animals. Indeed most people don't even know about meat. So the attorney has to explain what food used to be. At one point he introduces a word by spelling it out... C.A.R.N.I.V.O.R.E.... and one member of the audience gets ill (he had warned them it would be a difficult topic) and has to leave. After explaining all about meat, and different kinds of meat, and that their competitor has designed several of their foods to taste like meat,a he says, and this is a pretty much quote, I think, "So now I have to explain about another word: C.A.N.N.I..." [end of story]
|
Synthetic foods are all the rage, and while some are new and novel, many are attempts to recreate the taste and texture of a natural foods, with varying degrees of success. One company introduces a new synthetic food that becomes wildly popular. The competition analyzes it, and based on discovering what natural creature it is based on, they petition the government to ban it. They discover that the product is synthetic human flesh, so consuming it is not technically cannibalism, but it is similar, as they explain to the panel of government officials.
|
Okay, I'm trying to bake the coloured materials I've added to my model. But whenever I go to the Render tab > Bake > and select any of the options, I get an error at the top saying 'No active UV layer found in the object'. Well... Of course not. I've added materials, not textures. I've not had to do any UV unwrapping. What am I missing? What do I need to do to bake coloured materials? Thanks
|
I created a interior scene and i don't know how to bake a texture using cycles bake.
|
A very common question about Gauss law is being asked in schools or Internet: Why the electric field of an infinite plane is independent on distance? Actually I was one of who asked this question and I found an answer, and I will explain it in the next paragraph. A very important thing we have to remember when think about this kind of problems is that the electric field is a vector, and the $Ex$ vector only effect on it because $Ey$ is cancelled by another charge. Since we go further. the electric field is being weaker, also the angle $θ$ is being less too So $\cos θ$ is getting larger so that compensated the lack of electric field. Now, why we cant apply this argument on an infinite line, as you see in the picture? Please don't explain it using Gauss law because it's hard to visualize it, because the number of imaginary concepts like : (Flux, Electric field, epsilon ... etc.) So it's hard to realize. Finally, please don't mark my question as a duplicate because I didn't understand Eeko explanation.
|
I understand that with an infinite plane, as you get closer, the infinitesimal contributions to the electric field become greater in module. The direction of the vectors become less perpendicular to the plane as you get closer, hence reducing the overall electric field in the perpendicular direction. Both effects offset each other such that the electric field is the same at whatever distance. However, wouldn't this same argument apply to an infinite line? Gauss's law shows that the electric field of an infinite line depends on the distance, but supposedly the same would happen as with the infinite plane, and yet it doesn't. Does anyone have an explanation for this?
|
The principle of relativity suggests that all inertial frames are indistinguishable. But if I consider the rest frame of a photon (i.e. an IRF traveling at speed $c$ w.r.t. me), then won't it be distinguishable from my rest frame? And both are IRFs. For example, time is not well-defined for the photon rest frame. I've heard that time stands still for a photon. Isn't that a special property of photon rest frames, and therefore something that can be used to fundamentally distinguish it from regular IRFs (like mine)?
|
Quite a few of the questions given on this site mention a photon in vacuum having a rest frame such as it having a zero mass in its rest frame. I find this contradictory since photons must travel at the speed of light in all frames according to special relativity. Does a photon in vacuum have a rest frame?
|
I am wanting to get the list of files that are in a specific folder in that document library using powershell CSOM Tried this but it didnt work saying it didnt recognise getfolder $folder = $list.ParentWeb.GetFolder($web.Url + "/" + $list.RootFolder.Url + "/" + $foldername) foreach ($item in $folder.Files) { Write-Host $item.Name }
|
I there anyway to output the files of a specific folder in a document library? Listing them will be like foreach $file in $folder.files { write-host $file.name } But how do I tell it to look a specific folder? In CSOM please Tried the below answer but it did not work
|
I've installed Tor Browser and I can run it buy the command: ./start-tor-browser.desktop This command works as long as the Tor icon(the globe icon) is in : /home/user/tor-browser_de/ and I am also there in ~/tor-browser_de. When I want to set the shortcut Super+T, I use the command ./start-tor-browser.desktop, but it does not work. I copied the Tor icon to /home/user, but the problem still persists. How can I fix this problem?
|
From what I can gather, .desktop files are shortcuts that allow application's settings to be customized. For instance, I have lots of them in my /usr/share/applications/ folder. If I open that folder in nautilus, I can run these applications just by double clicking its associated file, e.g. double-clicking firefox.desktop runs Firefox. However, I can't find a way to do the same thing via terminal. If I do gnome-open foo.desktop it simply opens foo.desktop as a text file. If I make it executable and then run it in bash it simply fails (which is expected, it's clearly not bash script). EDIT: Doing exec /fullpath/foo.desktop gives me a Permission denied message, even if I change ownership to myself. If I make executable and do the same command, the terminal tab I'm using simply closes (I'm guessing it crashes). Finally, if I do sudo exec /fullpath/foo.desktop, I get an error reporting sudo: exec: command not found. That's my question, how can I run a foo.desktop file from the terminal?
|
Does a square matrix $X \in\Bbb R^{n\times n}$ always follow that $\dim(\ker(X)) = \dim(\ker(X^T))$? I know it works for a sizable amount, but I am not sure if it works for all of them, is there a way to prove this either way?
|
How to prove $dim(Ker (A- \lambda I))=dim (Ker(A^t- \lambda I))$ ? We know both $A$ and $A^t$ have same eigenvalues and $Av= \lambda v$ imply $v^tA^t= \lambda v^t$ but this does not imply that there is a one to one association b/w eigenvectors of $A$ and $A^t$.. So how to proceed?
|
How does axiom of regularity ensures that Russell's Paradox doesn't occurs. Given the axiom of regularity states: If A is a non-empty set, then there is at least one element x of A which is either not a set, or is disjoint from A.
|
In ZF set theory the axiom of regularity (also called axiom of foundation) says that: In all nonempty sets x there is an element y such that x∩y=∅ As I been told that of the axiom is to prohibit constructions as $x\in x$, but is this a possible strategy? Given a binary predicate $R$, written in infix notation, there are unitary predicates $p$ such that: $\qquad \exists y \forall x: x R y \leftrightarrow p(x)$. But there also are some convincing counterexamples: $ p(x) \leftrightarrow \neg(x R x)$ $ p(x) \leftrightarrow \neg(x R f(x))$, where $f$ is any surjection $ p(x) \leftrightarrow$ all chains $x_1 R x, \: x_2 R x_1, \: x_3 R x_2, \ldots \:$ are finite. I think there is a major mistake to try to avoid certain paradoxical loops. First, there are no guarantees that every possibility is prohibited. And second, it seems pathological to make constructions that avoid certain proof-techniques (it's like the attitude of a shyster). So, what protection comes from this axiom? Historically, has it anything to do with the Russell-predicate $x\notin x$? See also
|
I have the Puzzle Ring in Diablo 3 which means that I have a cute little treasure goblin that runs around with me. He picks up and eats all the white items that I find and after a certain number (for me, it's 12 but I believe it varies) he poops out a rare or legendary item. Depending on what I'm doing in the game, it seems like the item count resets differently. So what causes the item count to reset on the puzzle ring? Is it different depending on what you're doing - like regular game versus Rift?
|
Patch 2.0.1 introduced a lot of significant changes to the loot system in the game. One of the significant ones was the revamp to the , which now has a new effect: Summon a treasure goblin who picks up normal-quality items for you. After picking up 12–16 items, he drops a rare item with a chance for a legendary. What is the cooldown on the goblin item drop? Does the effect stack if you have one on your character and another on your follower (i.e. two goblins)? Is the drop chance for the rare/legendary affected by increased Magic Find? If so, approximately how much? Is there a cap on them max item level of the dropped item? (While < lvl 60, at lvl 60, and when the level cap is raised in the expansion.) Does the item counter reset when you leave the game, change acts, or die?
|
The Protagonist is a suave, charismatic young man and his girl, ending up being persecuted by a rigid dystopian future state. Some details I remember: Featuring a possibly sympathetic military officer (who is an old family friend/acquaintance) driving a jaguar. which gets hijacked on a highway by hooligans. Being military, it's got an emergency button calling in a gurkha special force unit in helicopters. The hooligans are heading straight for organ transplant vats. There is a tea ceremony metaphor, illustrating the pathological state of today's job market - if you can cook tea perfectly in front of an auditorium of white-coats you get the coveted job of assistant to some secret guy. on a motorbike, the young man and his girl head out of London north into the countryside, where life is still worth living and people are friendly. on the way, they have to hide in some cave and sedate themselves to avoid detection by police and their brainwave scanners. They also do some rite-of-passage by jumping through a ring of fire.
|
It was either a short story or a novel. I read it about 20 years ago, and some vague memory of it stuck. It's set in a future where everyone's allotted role is decided by a series of tests once they reach a certain age. They are then classified into a group which decides what jobs they will do. Our hero rather controversially gets a perfect score in the tests. Nobody had done that in a long time. and at first he worries about what this might mean. He is sent to work for the mysterious scientists who maintain the computer that runs society. Most people don't know they exist. He is disappointed to learn he has to be their tea boy, and learn a tea making ceremony perfectly. In the process he learns how to fool the machine, and eventually to circumvent the controls society has placed on him. He makes several visits to an area outside the control of the machine - where people are living in poverty and lawlessness. Can't remember the author, or the name, just that basic idea, and the fact that early in the book is a very grand "tea ceremony" where he must make the tea perfectly.
|
A long time ago I read about a novel, short story or possibly a movie (I can't remember what it was exactly, most likely a novel though) telling the story of a man who writes a book only to later discover that someone else has already written the exact book, word-by-word, possibly years before. I don't remember how the mystery is solved - if you know what story this is, please don't tell me how it ends. Edit to rest the duplicate hunters: there was nothing about any time machine in my recollections. I have already selected an answer. And I did say that I don't want to know how this story ends.
|
I can't remember the name of the story, and couldn't find anything on Google searches either. The story is about a science fiction writer whose story gets rejected by the publisher because it's word-by-word identical to another story published years ago. The writer then writes another story only to find out that the same author also published this story around the same time as the other one. Our writer then writes a story about a man who uses a time machine to read other people's work in the future and then publishes it in his time. Only to find out that this story was also published by the same guy years ago. The story I'm trying to find out was in the form of letter correspondence between the writer and the publisher. So, does anyone know its title?
|
I'm messing around with sed for fun and have a little function I found that replaces a few characters: sed 's/"p"$/0/;s/"e"/1/' sedtext.txt Where sedtext.txt is as follows: 1, 2, 6, 7, "p" 1, 6, 7, 2, "e" When I do the following I get the desired output: sed 's/"p"$/0/;s/"e"/1/' sedtest.txt > sedtest2.txt But when I try to overwrite the input file with the output I get a blank file: sed 's/"p"$/0/;s/"e"/1/' sedtest.txt > sedtest.txt Why is this the case?
|
I often see tutorials online that connect various commands with different symbols. For example: command1 | command2 command1 & command2 command1 || command2 command1 && command2 Others seem to be connecting commands to files: command1 > file1 command1 >> file1 What are these things? What are they called? What do they do? Are there more of them? .
|
After fully loaded the HTML DOM I am calling ajax on form submit and the result I got is: <a data-nonce="https://hypley.com?wp_nonce=2db70bc9fb" id="resend_email">here</a></strong> Now, again I want to call ajax on that link click: $("#resend_email").on("click", function (e) { e.preventDefault(); alert(1); var user_login = $("#user_login").val(); console.log( user_login ); }); But it's not working, I mean at least not showing me the alert. Do you know why, how can I solve it?
|
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 have a Qt plugin, and i have a button browse_btn to browse for an output folder. I use the QFileDialog.getExistingDirectory function and it all works fine. However if I close the plugin and open it again, then click the pushbutton to add a path, the opened window for choosing the path will re-open after I choose a path or close it. If I close the plugin a open it again the 'choose path' window will reopen 3 time and so on... The similar problem and and probably , but since there is no code provided I cannot apply it to solve my problem. The exact code is following: self.dlg.browse_btn.clicked.connect(self.set_output) def set_output(self): folder_path = str(QFileDialog.getExistingDirectory(self.dlg, u"Pick a folder")) if not folder_path: return None I think this happens because each time I open-close the plugin the separate connection is created with self.dlg.browse_btn.clicked.connect(self.set_output), and it only disconnects after I relaunch QGIS or use
|
I have a plugin with a function (triggered by a button) that selects a specific layer by name, then shows its attribute table. When I close the plugin and open it again, the attribute table pops up twice, and repeating this keeps adding another table popup. What's wrong? Code: def showTable(self): for lyrs in QgsMapLayerRegistry.instance().mapLayers().values(): if lyrs.name() == "TestFeatures": lyrTest = lyrs self.iface.showAttributeTable(lyrTest)
|
I need to prove or disprove the statement. I think the statement is true. My attempt at a proof: From the definition of convergence: $$\forall \epsilon > 0 \quad \exists N \in \mathbb{N} \quad st \quad n,m\geq N \implies \left|\frac{a_{m+1}}{1+a_{m+1}}+\dots+\frac{a_{n}}{1+a_{n}}\right|<\epsilon$$ Since there is a finite amount of denominators and $a_n>0$ we can take the maximum: $$g = \max\{1+a_{m+1}, \dots, 1+a_n\}$$ $$\frac{1}{g}\left|a_{m+1},\dots,a_n\right|\leq\left|\frac{a_{m+1}}{1+a_{m+1}}+\dots+\frac{a_{n}}{1+a_{n}}\right|<\epsilon$$ and that completes the proof since $\epsilon$ is arbitrary. Does this make sense?
|
Let $\sum\limits_{n\geq1}a_n$ be a positive series, and $\sum\limits_{n\geq1}a_n=+\infty$, prove that: $$\sum_{n\geq1}\frac{a_n}{1+a_n}=+\infty.$$
|
I am creating a feedback app where the user rates a service from 1-5 and I display the average of all the user's ratings (till date) on the next page. The average rating is coming out to be fine but I am not able to fetch the total number of users from snapshot that have rated on the app till now. Here is the code - public class Score extends AppCompatActivity { TextView avgScore; TextView totalUsers; double userCount; DatabaseReference dbRef; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); //will hide the title getSupportActionBar().hide(); // hide the title bar this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //enable full screen setContentView(R.layout.score); avgScore = findViewById(R.id.textView2); dbRef = FirebaseDatabase.getInstance().getReference().child("Users"); scoreRealTime(); } public void scoreRealTime() { dbRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { double total = 0; for (DataSnapshot ds : snapshot.getChildren()){ UserHelper helper = ds.getValue(UserHelper.class); double values = Double.parseDouble(String.valueOf(helper.rating)); // double values = Double.parseDouble(ds.child("rating").getValue().toString()); total = total + values; userCount = snapshot.getChildrenCount(); } double average = (double) total / snapshot.getChildrenCount(); avgScore.setText(String.format("%.2f", average)); //System.out.println(userCount); totalUsers.setText((int) userCount); //error occurs here } @Override public void onCancelled(@NonNull DatabaseError error) { } }); } } This is the error log - E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.feedback, PID: 26338 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(int)' on a null object reference at com.example.feedback.Score$1.onDataChange(Score.java:60) at com.google.firebase.database.core.ValueEventRegistration.fireEvent(ValueEventRegistration.java:75) at com.google.firebase.database.core.view.DataEvent.fire(DataEvent.java:63) at com.google.firebase.database.core.view.EventRaiser$1.run(EventRaiser.java:55) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) EDIT: Also, it would be really great if you could explain why the NullPointerException is occurring here or occurs in general. Thanks.
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
Hello I am creating Geoserver view to view my result and for zoom to result. My Sql Query is like SELECT * FROM geotable WHERE gid IN (%gid%) View Parameters to Query like 1,2,3 Regular Expression like '^[\w\d\s]+$' My Zoom function like function binddata(data) { myObject = JSON.parse(data.d); gid = []; for (var i = 0; i < myObject.length; i++) { gid.push(myObject[i].gid); } //var plcd = plcd1[0]; ZoomtoParcelsByAcers(gid, SearchResultsLayer); } //Function to escape comma in viewparameters String.prototype.replaceAll = function (search, replacement) { var target = this; return target.replace(new RegExp(search, 'g'), replacement); }; function EscapeCommasSemiColons(input) { return input.toString().replaceAll(",", "\\,"); } function ZoomtoParcelsByAcers(gid, SearchResultsLayer) { $.ajax({ url: 'http://localhost:8080/geoserver/plotgeo/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=plotgeo:vwnew&maxFeatures=5000&outputFormat=text/javascript', contentType: 'application/json', dataType: 'jsonp', jsonpCallback: "parseResponse", data: { viewparams: "gid:" + EscapeCommasSemiColons(gid) }, success: function (response) { search(response); } }); } When i pass multiple parameters in geoserver it is working fine. When i am using above code to zoom to result i am gettin Error like **<ServiceException> java.lang.RuntimeException: java.io.IOException java.io.IOExceptionInvalid value for parameter gid </ServiceException>** Can anyone help what is error in it.
|
I am trying to zoom plot numbers.Plot numbers like 1 10-12 13/P road 20(A) 100&102 and etc.I am able to zoom to all combination plot numbers except 1,2,3.when I pass such value its trowing error: 1 feature types requested, but found 2 view params specified geoserver sql view is: select * from plotboundary where nmindar='%nmindar%' and plno='%plno%' default values and validation are Name | Default Value | validation nmidar| Hanagawadi I A | ^[\w\d\s]+$ plno | 100,102&103 | ^[ A-Za-z0-9_ *@.\/#&+-\,()-_]*$ ajax function: $.ajax({ url: 'http://XX.168.1.XX:8089/geoserver/XX/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=XX:vwplot&maxFeatures=5000&outputFormat=text/javascript', contentType: 'application/json', dataType: 'jsonp', jsonpCallback: "parseResponse", data: { viewparams: "nmindar:" + nmindar + ";plno:" + plno } Can any one tell me how to pass value to viewparams in geoserver, value includes comma. For example as mentioned above "100,102&103" is a single value(plot number).Here comma is not a separator.
|
This may be a naive but i am not able to understand how javascript assign values to its variables. In this , i came across the following code. function greaterThan(n) { return m => m > n; } let greaterThan10 = greaterThan(10); console.log(greaterThan10(12)); How is m assigned the value 12 ? This does'nt give compile time as well as runtime error. Only if i remove m =>, i get an error that m is not defined.
|
How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves? I have seen given on Wikipedia, but unfortunately it did not help.
|
In java when we create a class singleton it create only one instance of that class per application, but rather than creating singleton class if we create all the methods and variables of that class static then also it will create only one instance of that static members. Then what is advantage of singleton class over all static members of class?
|
What real (i.e. practical) difference exists between a static class and a singleton pattern? Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?
|
I have read many posts on the pros and cons of the down-vote system. Reputation points have no real value, yet I feel insulted when a question I asked is down-voted. From a personal point of view, I feel as though my input is being rejected by an entire community. It is hard to describe how it makes me feel when I pose a question that I would want to know the answer to, only to be subjected to hostility. This may not be the intent but it's most definitely the message I receive. Should I take down-votes personally?
|
I've posted a question or an answer, and I have received one or more downvotes. I am not really sure why I was down voted, or I think I know why, but I disagree. Why did this happen, and what should I do about it?
|
I am totally new to this and I need to create this xml document for my orginization. For sure I am aware that I should use Domdocument, but I cant figure out all methods and what they are doing. What I dont understand is how to apply the first tag after the xml tag - what method in PHP should I use for that? Can someone point me in the right direction so that my XML document looks like this? <?xml version="1.0" encoding="utf-8"?> <Persons PageCount="1" PageIndex="1" ApplicationId="[ApplicationGuid]" xmlSchemaVersion="1.0" GenerationDate="2013-11-25T18:15:36" IsIncremental="true"> <!-- Add member --> <Person CreateDate="2008-08-29T08:39:44" LMDate="2014-03-14T10:47:22" OptionType="Update"> <PersonId>82</PersonId> <PersonalNumber>19471204-6310</PersonalNumber> <FirstName>Peter</FirstName> <LastName>Peterson</LastName> <BirthDate>1947-12-04</BirthDate> <Gender>male</Gender> <Organisations> <Organisation OptionType="Update"> <OrgID>31215</OrgID> <OrganisationRF_NR>45264</OrganisationRF_NR> <OrganisationNumber>802421-7948</OrganisationNumber> <Sports> <Sport OptionType="Update"> <SportID>43</SportID> <IsActive LMDate="2011-11-17T15:31:06">true</IsActive> </Sport> </Sports> </Organisation> </Organisations> </Person> </Persons> Best regards, Joakim
|
Is it possible to use PHP's SimpleXML functions to create an XML object from scratch? Looking through the function list, there's ways to import an existing XML string into an object that you can then manipulate, but if I just want to generate an XML object programmatically from scratch, what's the best way to do that? I figured out that you can use simplexml_load_string() and pass in the root string that you want, and then you've got an object you can manipulate by adding children... although this seems like kind of a hack, since I have to actually hardcode some XML into the string before it can be loaded. I've done it using the , although it's a little confusing because I'm not sure what the DOM has to do with creating a pure XML document... so maybe it's just badly named :-)
|
One of my questions on stats.stackexchange had been closed. Two users have downvoted it and the score has been reduced by 4. I would like to see the rule. If it is there.
|
Possible Duplicate: I asked a question . I explained that I am able to do these functions individually but I am looking for a way to combine them. One person understood and tried to answer. The question have then being voted down, I lost 12 reputation points on it. The question was then closed. After which I lost an additional 2 points. I believe that my question was fair enough that it should not have lost any points.
|
I apologize if this is documented somewhere, I could not find the answer using an underscore in this specific manner (an If Not, AndAlso statement). Here is what I don't understand If Not variable Is Nothing _ AndAlso Not Results.Tables.Count = 0 _ AndAlso Not Results.Tables(0).Rows.Count = 0 Then If I take away the Underscores in this code, VB2017 automatically puts a Then at the end of the first line of code and I get 2 Syntax Errors for AndAlso on both lines they are used. Can someone explain why this is? I read on StackOverflow that the Compiler doesn't care about the underscore, and I've also read MSDN's AndAlso documentation and I'm a little confused. Thank you for your help.
|
Is there a way to have a statement across multiple lines without the underscore character? It is really annoying in multi-line strings such as SQL statements, and especially queries. Beside from the ugliness and difficulty when changing a line (nothing lines up anymore), you can't use comments in the middle of the multi-line statement. Examples of my daily personal hell. dim results = from a in articles _ where a.articleID = 4 _ ' articleID - Nope, can't do this select a.articleName dim createArticle as string = _ "Create table article " & _ " (articleID int " & _ " ,articleName varchar(50) " & _ " )"
|
how do I make the result below print on a single line instead of down the column? Thanks. i = 3 while not i<=0: i-=1 print(i) expected: 2 1 0
|
I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h> int main() { int i; for (i=0; i<10; i++) printf("."); return 0; } Output: .......... In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . . In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.
|
Do you believe there should be a back button on a responsive website or should we rely on the browser's controls? If you believe there needs to be a button in the design... Would you have it appear all the time or only on small (smartphone) screens? Do you have any examples of websites that do this well? FYI I'm working on a website which is more a tool than a content website. Users will need to be logged in and they'll probably visit this website several times a week. I've found about the topic, and although the answer is interesting, I don't see any studies/articles to support the points that are made. Edit: there is a about this but it's nearly 7 years old so it's probably not relevant anymore
|
How about a website that has 4 pages with list and detail view structure? Hope most of the users will be aware of using browser back button to go back to previous screen. Or should we provide a custom back button on the website?
|
I see a spammy post every now and then in the Low Quality Posts review queue, but there isn't a relevant comment I can leave the spammer. Therefore, I have to choose 'No comment Needed'. Can we have yet another choice? This post is spam Flag this post as spam Currently I have to press the link button on the side, go the the post, mark it as spam, then go back to the queue and mark it for deletion. Quite a hassle, don't you think?
|
I guess this is an additional to previous requests like and . But I just came across review item, and was unable to flag it as spam. edit: Since I posted this, the item has been removed (deleted) here is a screenshot:
|
I have created a block in custom block library, i need to render the block on all pages except home page. Unfortunately I need to do it in twig file only because of ui issues if I enabled in the block layout UI In twig file how can I render the block in drupal 8. Thanks
|
I try to embed a view in a specific node. I found tutorials for doing this with Drupal 7 and PHP-Templates: <?php print views_embed_view('view_name'); ?> But I look for a way in Drupal 8 with twig-Templates. I tried to call the views_embed_view() function in the hook_node_view() and assign it to the node so that I can print it out in the twig-Template. But it seems that this hook never gets called. Any hints/solutions how to do this in the Drupal 8 way?
|
As you watch the video, the first visible white post is pure white. But the others that are seen next have black speckles. I have tried to remove all doubles but there weren't any to remove. So much is riding on me getting this video finished. Any help would be appreciated. Thanks so much for your time!
|
Cant figure out why the rendered image has a large black and white artifact (on the bottle on the right)? Appreciate any tips!
|
As you can see below, calendar applet does not show day in week, which I remember was not the case before. Is this a glitch or did I somehow manage to disable it somewhere in settings?
|
For several days now, the day of the week has not been displayed on the time sub-menu, as shown in the screenshot. I use Ubuntu 20.04 with Gnome. How can I fix this?
|
I am using windows 7 and ubuntu 12.04 dual boot system. In my Windows 7 some issues occurred, so i re-install windows 7. after re-installing windows 7, i lost my ubuntu os. how can i recover my ubuntu os Help me ASAP Regards, Rajesh
|
I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu. How can I get Ubuntu back?
|
Sometimes I do small gaming on my MacBook Pro and it discharges quite quickly while running games. I understand that this is normal for every laptop. But in the latest update 10.15.5, there is a "Battery Health management feature" but there is no description of what exactly it does. So, my question is Is it safe to keep MacBook plugged while it is charged? This question in my case is applicable for gaming and other heavy programs (Video editing, etc).
|
My friend told me that I need to disconnect the power cord when the battery is fully charged. Otherwise, I will shorten the life of the battery. Other people say you should drain it once a month or point out that for long term storage, you should charge it to 50% and then periodically (3 to 6 months) bring it back to 50% and store it again. I am going to use my laptop at home 90% of the time. So, I plan to have the power cord connected all the time. I'd prefer to just plugging in my MacBook Pro and letting it be on charge long term and occasionally taking it away from the charger when I'm not at home or my desk. Are these specific recommendations worth the inconvenience?
|
I have a plugin that works with QGIS 2.2 but does not work with 2.8. Only deleteFeatures() works fine, but changeAttributeValues(), changeGeometryValues() and addFeatures() not. I receive r == False on the code below. The layer is an SpatiaLite table. for feat_vias in lay_vias.getFeatures(req): if feat_vias.attributes()[idx_pkvia] == div_rowid: fid = feat_vias.id() attrs = { idx_setvia : s_geocodi } r = lay_vias.dataProvider().changeAttributeValues({ fid : attrs }) I'm using QGIS 2.8.1 - Windows In another question () I found an Matthias Kuhn's answer that solve this question too. I put the commit sentence outside the loop as below. Work fine! for feat_vias in lay_vias.getFeatures(req): if feat_vias.attributes()[idx_pkvia] == div_rowid: fid = feat_vias.id() attrs[fid] = { idx_setvia : s_geocodi } r = lay_vias.dataProvider().changeAttributeValues(attrs)
|
I'm trying to edit the value of an attribute for each feature in a layer using a QGIS Python plugin. I've found that doing this outside of editing mode is much slower than while editing (even including committing the edits). See code below (lines interchangeable at the same point in a loop). The difference in speed for my sample dataset is 2 seconds (edit mode) vs 72 seconds (not edit mode). Modifying an attribute in edit mode: layer.changeAttributeValue(feature.id(), 17, QtCore.QVariant(value)) Modifying an attribute outside of edit mode: layer.dataProvider().changeAttributeValues({ feature.id() : { 17 : QtCore.QVariant(value) } }) Is this an expected behavior? I don't need the user to be able to undo the changes, so I don't think I need to use edit mode. Edit 1: See full code below with both versions included (but commented out): def run(self): try: # create spatial index of buffered layer index = QgsSpatialIndex() self.layer_buffered.select() for feature in self.layer_buffered: index.insertFeature(feature) # enable editing #was_editing = self.layer_target.isEditable() #if was_editing is False: # self.layer_target.startEditing() # check intersections self.layer_target.select() self.feature_count = self.layer_target.featureCount() for feature in self.layer_target: distance_min = None fids = index.intersects(feature.geometry().boundingBox()) for fid in fids: # feature's bounding box and buffer bounding box intersect feature_buffered = QgsFeature() self.layer_buffered.featureAtId(fid, feature_buffered) if feature.geometry().intersects(feature_buffered.geometry()): # feature intersects buffer attrs = feature_buffered.attributeMap() distance = attrs[0].toPyObject() if distance_min is None or distance < distance_min: distance_min = distance if self.abort is True: break if self.abort is True: break # update feature's distance attribute self.layer_target.dataProvider().changeAttributeValues({feature.id(): {self.field_index: QtCore.QVariant(distance_min)}}) #self.layer_target.changeAttributeValue(feature.id(), self.field_index, QtCore.QVariant(distance_min)) self.calculate_progress() # disable editing #if was_editing is False: # self.layer_target.commitChanges() except: import traceback self.error.emit(traceback.format_exc()) self.progress.emit(100) self.finished.emit(self.abort) Both methods produce the same result, but writing via the data provider takes much longer. The function classifies proximity of building features to nearby fields (purple) using pre-created buffers (brown-ish).
|
If $d_i \in U(-1,1)$ (uniform distribution between -1 and 1 - not sure what the canonical notation is for this), then it seems intuitive that $\sum_{i=1}^n d_i \in U(-n,n)$ and thus $$P\big(\sum_{i=1}^n d_i > 0\big) = \frac{1}{2}$$. If this is true, it also seems intuitive that $P\big(\sum_{i=1}^n p_id_i\big) \in U(-n,n)$ where $p_i \in {-1,1}$. That is, we can apply the same ideas to a combination of additions/subtractions, not just a summation. I'm not classically trained in statistics and don't know if this is a standard theorem or if I am way off base here. Is this true / false? If it is true, is it provable using classical statistical techniques?
|
I've been wondering about this one for a while; I find it a little weird how abruptly it happens. Basically, why do we need just three uniforms for $Z_n$ to smooth out like it does? And why does the smoothing-out happen so relatively quickly? $Z_2$: $Z_3$: (images shamelessly stolen from John D. Cook's blog: ) Why doesn't it take, say, four uniforms? Or five? Or...?
|
As above, any tricky methods to do so? Since you cannot pass an array, I wonder how to return coordinates (x/column and y/row) to the calling object. Regards.
|
Is there a preferred way to return multiple values from a C++ function? For example, imagine a function that divides two integers and returns both the quotient and the remainder. One way I commonly see is to use reference parameters: void divide(int dividend, int divisor, int& quotient, int& remainder); A variation is to return one value and pass the other through a reference parameter: int divide(int dividend, int divisor, int& remainder); Another way would be to declare a struct to contain all of the results and return that: struct divide_result { int quotient; int remainder; }; divide_result divide(int dividend, int divisor); Is one of these ways generally preferred, or are there other suggestions? Edit: In the real-world code, there may be more than two results. They may also be of different types.
|
For almost every document that I type in LaTeX, I start by opening one of the most recent documents that I made, copying all of the packages and pre-set commands, and pasting them in the new document. This is because I have a lot of packages that I use on a regular basis. However, it gets pretty annoying and my preamble is messy. I would like to create some sort of a template that contains all of the packages and commands that I normally use so that when I decide to start a new document I can use a single command and call on a file that has all of those packages already set up. Is something like this possible? Thank you for your time
|
Since I am using (almost) the same set up for my tex documents, I wonder if there is a way to create a preamble with my default packages and to recall it anytime I want to create a tex document. If yes, how I can call this "default" preamble? Thanks in advance
|
Can anyone tell me why i can't render from the object as camera mode (meaning i select a model lets say a Suzanne for example and i want to render from that perspective). can anyone supply me with source code of this feature i am willing to work with it.
|
Often I want to just point the camera to an object or a specific area in my scene to get an idea of how it'll look in the render. What's the most painless hassle-free way to do this in blender? A quick search on the blender wiki does not lend itself to easy look-up due to all the noise in the search result. This question could probably be broken down into these two main questions: How do I point a selected camera to the current 3d-cursor location in the scene? How do I point the selected camera to the currently selected object(s) in the scene?
|
Consider the twins paradox with a slight variation: Twins A and B are in separate space ships both capable of going at the speed of light instantly (i.e. without any acceleration). Both ships are stationary relative to each other in intergalactic space facing in opposite directions. They synchronize their clocks. Then Twin A sees ship B zooms off to the "right" at the speed of light, and ship B travels a round trip of 8 years. Twin A sees ship B recede away from him at the speed of light (in fact, ship A just disappears). When ship B returns, Twin B's clock will show he has been gone 8 years. But from Twin B's perspective, it's ship A that zooms off to the "left" at the speed of light, does an 8 light year round trip, and according to Twin A's clock, he has also been gone 8 years. So they both would agree that one has been away from the other 8 years, and both have aged the same amount of time. It would seem clocks do not actually run slower as they move closer to the speed of light. So is time dilatation just an illusion?
|
It is said that we can verify time dilation by flying a very accurate clock on a fast jet or spaceship and prove that it registers less time than the clocks on earth. However, the clocks on earth would be moving relative to the clock on the spaceship, and since time always dilates and never goes faster regardless of the direction of relative motion, the clocks on earth should register less time than the clock on the spaceship. Is this true? Whenever there is a fast-moving object such as a rocket do all clocks on earth really become slow? If the rocket with the clock landed after moving at relativistic speed, would its clock and the earth's clock again show the same time since during its travel both appeared slow to each other? Or is all this just an illusion, ie. the clocks just appear to be slow to each other but in actually run at normal speed, and neither is behind when the rocket actually lands?
|
In R, I can fit a Probability Density Function to some empirical data using the following code: energy <- rnorm(30) * 20 dens <- density(energy) sum(dens$y)*diff(dens$x[1:2]) hist(energy,probability=TRUE) lines(density(energy),col="red") This produces the following graph of the Probability Density Function (PDF): Howevever, I would like to fit a student-t distribution to this data instead. I'm wondering if its possible to do this and if its possible to plot the result like in the diagram above?
|
The data I am using can be found here: The variable is called "alvsloss". I want to fit a distribution to my financial data. First of all, I started with a normal distribution. The pdf is given by: $\frac{1}{\sqrt{2\pi\sigma^2}}\operatorname{exp}\left\{-\frac{\left(x-\mu\right)^2}{2\sigma^2}\right\}$ and the log likelihood, which is to be maximized is given by $ \ln\mathcal{L}(\mu,\sigma^2) = \sum_{i=1}^n \ln f(x_i;\,\mu,\sigma^2) = -\frac{n}{2}\ln(2\pi) - \frac{n}{2}\ln\sigma^2 - \frac{1}{2\sigma^2}\sum_{i=1}^n (x_i-\mu)^2. $ which gives as a solution $ \hat{\mu} = \overline{x} \equiv \frac{1}{n}\sum_{i=1}^n x_i, \qquad \hat{\sigma}^2 = \frac{1}{n} \sum_{i=1}^n (x_i - \overline{x})^2. $ I can calculate this in R via mean(alvsloss) and sd(alvsloss) and get the values -0.0004270872 and 0.02304159 or I do library(MASS) fitdistr(alvsloss, "normal") and get the solution mean sd -0.0004270872 0.0230371244 ( 0.0004535429) ( 0.0003207033) Ok, I understand this. But now my problem arises, I tried this with the t distribution. The pdf is given by: $\textstyle\frac{\Gamma \left(\frac{\nu+1}{2} \right)} {\sqrt{\nu\pi}\,\Gamma \left(\frac{\nu}{2} \right)} \left(1+\frac{x^2}{\nu} \right)^{-\frac{\nu+1}{2}}\!$ the log likelihood can be found here: formula (17.8) (x is denoted by $\epsilon$. I am not understanding where the $h_i$ comes from in the formula, but this is not my main question.) First question: Seems to me, that there is no closed form solution? Second question: I do fitdistr(alvsloss, "t") and get the output m s df -0.0004919768 0.0130128873 2.6340459185 ( 0.0003182568) ( 0.0003453702) ( 0.1620424078) Es gab 28 Warnungen (Anzeige mit warnings()) I am not understanding, why I have three parameters now? The df is the $\nu$, but the others? What is R doing? Since there is no closed form solution, I guess it is using a iterated algorithm? Should I bother about the 28 warnings? They are: Warnmeldungen: 1: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 2: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 3: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 4: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 5: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 6: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 7: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 8: In log(s) : NaNs wurden erzeugt 9: In log(s) : NaNs wurden erzeugt 10: In log(s) : NaNs wurden erzeugt 11: In log(s) : NaNs wurden erzeugt 12: In log(s) : NaNs wurden erzeugt 13: In log(s) : NaNs wurden erzeugt 14: In log(s) : NaNs wurden erzeugt 15: In log(s) : NaNs wurden erzeugt 16: In log(s) : NaNs wurden erzeugt 17: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 18: In log(s) : NaNs wurden erzeugt 19: In log(s) : NaNs wurden erzeugt 20: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 21: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 22: In dt((x - m)/s, df, log = TRUE) : NaNs wurden erzeugt 23: In log(s) : NaNs wurden erzeugt 24: In log(s) : NaNs wurden erzeugt 25: In log(s) : NaNs wurden erzeugt 26: In log(s) : NaNs wurden erzeugt 27: In log(s) : NaNs wurden erzeugt 28: In log(s) : NaNs wurden erzeugt And how can I plot this distribution with the estimated parameters?
|
let ${f_k}$ be a sequence of integrable functions on $[a,b]$ that converges in pointwise to $f$ and converges in mean to $g$. If $f$ and $g$ are continuous, then f = g. The 'convergence in mean' means, $\lim_{k\to \infty}\int_{a}^{b} [f_k(x) - g(x)]^2 dx = 0$ . I tried to show that, if there exists some point $x_0$ s.t $f(x_0) \neq g(x_0)$, then on some neighborhood of $x_0$, $f_k-g$ is being uniformly nonzero, so that the value of integration can't be 0, so that $f_k$ can't converge in mean to $g$. However, I couldn't prove this way, since and $f_k$ is integrable, but not provided that $f_k$ is continuous. Am I trying in a correct way? give me any idea please. (This question is from elementary analysis textbook, so please assume that properties about $L_2$ convergence or almost everywhere convergence is not known)
|
Let $(f_n)_{n\in\mathbb{N}}$ be a sequence of Riemann-integrable functions on $[a, b]$. Assume that $(f_n)_{n\in\mathbb{N}}$ converges pointwise to $f$ on $[a, b]$ and converges in the mean to $g$ on $[a, b]$, where $f$ and $g$ are both continuous. Show that $f = g$. ($(f_n)_{n\in\mathbb{N}}$ converges in the mean to g on $[a , b]$ means that $\lim_{n\to\infty} d(f_n, g) = 0$, where $d$ is the $L_2$ metric.) I am studying real analysis now and want to prove this statement. But I don't know how to use condition "$(f_n)_{n\in\mathbb{N}}$ converges in the mean to g on $[a , b]$." How can I prove this?
|
I can't defeat Chapter 7 Archimonde's Ascent no matter what I try and I'm not playing on difficult.I read one guys post about putting ballistae in the trees of the human base, but sure can't figure out where he's talking about? I'm playing on slow too. I had no problem going through the entire campaign until this last mission. Any and all help would be appreciated. Thanks in advance
|
I've difficulties surviving in the last campaign mission in Warcraft 3 on the highest difficulty settings. After capturing the mines and building as much of an army as possible, I get decimated by the incoming forces faster than I can rebuild. I usually end up as sole survivor (Hu/Orc base destroyed) after 10 minutes. I tried various stuff, including building wells near the place of battle and walls of ancient protectors, but to no avail. I'm wondering if it is actually that hard, or if I just do something wrong. I was about level 30 on the solo ladder so I think my micro and macro is not utterly crappy in general.
|
For example if i have a linear operator $\ T:\mathbb{R}^n\to \mathbb{R}^n$ and some basis $\ B=\{v_1,v_2,..v_n\}$. Let $\ [T]_B$ be the representation matrix of $\ T $ with respect to the basis $\ B$. for example if I do $\ [T]_B*v_2 $ do I get the coordinates of $\ v_2$ in the standard basis?
|
Given the basis $\beta = \{ (1, 1, 0),\ (1, 0, -1),\ (2, 1, 0)\}$ and the matrix: $$ A = \begin{bmatrix} 1 & 1 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} $$ with respect to $\beta$. How to change this matrix with respect to standard basis?
|
I have been reviewing close voted questions for a while now. And I am not feeling encouraged to close questions since the numbers are just growing. I feel really responsible for allowing SO to have so many badly formatted questions to be around. May I request that we review our close vote policy to make the following changes Should need about 2-3 votes utmost to decide if a question is closed If someone with a reputation / minimum gold badges closes a question, it should not need more than one more person to vote to close. Overall, that would help bring down that 84.1k questions down. More over, the number of clicks it takes to close a question is too much, 4 now (worst case). I suggest making this a 2 click process. At least until we can get some control on that huge 84.1k questions. Edit : OR lets just start a campaign to close and bring that huge number down. In short it annoys me to see such a huge number of questions under review :). Edit 30th Jan 2014 : The number of questions have increased dramatically, there by reducing the quality of our system. I urge the moderators to make closing of questions easier. Today, frankly, the correct reasons are not chosen since its easier to say "Unclear what you are asking", in one click. Its really painful to close. The number of votes needed is REALLY high. I suggest that we systematically make changes. Blanket close all questions that have 4 votes No reopening of questions, a bad question has under gone 4 mins of review, is bad enough Prioritize 3 votes for all reviewers (line them up earlier) Once we have lesser than 5% questions with 4 votes, reduce the votes needed to 3 votes At this time prioritize 2 vote questions for reviewers. My point is, it used to be hard to get into SO. Now its easy, and easy to get away, we have 112k questions for review. And I have stopped reviewing, its just too painful. Edit 1st Feb 2014 : Close votes increase 1k every day 112.6k now. Wake up, SO is the only community that is high quality, lets keep it that day. WAKE UP!!
|
Today, the size of the close-votes queue is 55k questions and growing. Is that a problem? Which action could be taken to clean it up? It seems to be growing faster than Stack Overflow members are capable to handle it.
|
I have the code below, and I'd like it to make it save as jpeg file format, instead of bmp. Bitmap current = (Bitmap)_latestFrame.Clone(); using (SaveFileDialog sfd = new SaveFileDialog()) { sfd.Filter = "*.bmp|*.bmp"; if (sfd.ShowDialog() == DialogResult.OK) { current.Save(sfd.FileName); } } current.Dispose(); } Do you have any idea on what I should change to make it? I tried using Image.Format, but that didn't work.
|
Is there any way to convert a bmp image to jpg/png without losing the quality in C#? Using Image class we can convert bmp to jpg but the quality of output image is very poor. Can we gain the quality level as good as an image converted to jpg using photoshop with highest quality?
|
$f$ is real valued function on $[0,\infty)$ such that $f''(x)>0$ for all $x$ and $f(0)=0$ Then $h(x)={f(x)\over x}$ is decreasing or increasing or both over $[0,\infty)$ $h'(x)={xf'(x)-f(x)\over x^2}$ What I can conclude from here?
|
Suppose $f(0) =0 $ and $0<f''(x)<\infty (\forall$ $x>0)$, then $\frac{f(x)}{x}$ strictly increases as $x$ increases. I have shown that $f'(x)-\frac{f(x)}{x} = \frac{1}{2}xf''(c)$, for some $c\in (0,x)$. How do I proceed from here?
|
I have many crons that run at different intervals. I need to configure them all to not run between two specific time ranges. How can I configure a unix cron to run exclusive of 11:45-13:00 and 14:45-16:00? If the minutes is not possible, 12:00-13:00 and 15:00 - 16:00 would suffice. Thanks!
|
This is a about using cron & crontab. You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question. The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below. This addresses the cron system with the crontab highlighted.
|
I would like to print a code in my document in the format that is very common to see online in many websites like this: But when I try to compile, a fatal error occurs. The problem is in the command to print some text inside the square aligned to the left... \documentclass[a4paper, 11pt]{article} \usepackage{lipsum} %This package just generates Lorem Ipsum filler text. \usepackage{fullpage} % changes the margin \usepackage[utf8]{inputenc} \usepackage{array} \usepackage{gensymb} \usepackage{graphicx} \usepackage{mwe} \usepackage{indentfirst} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows, shapes.arrows,decorations.pathmorphing, matrix,chains,scopes,positioning,fit,shapes.gates.logic.US, shapes.gates.logic.IEC, calc, decorations.markings,arrows.meta,bending} \usepackage{courier} \definecolor{red}{HTML}{FF0000} \definecolor{blue}{HTML}{0000FF} \definecolor{lavender}{HTML}{E6E6FA} \definecolor{lightgray}{HTML}{D3D3D3} \begin{document} \begin{tikzpicture} \fill[lavender, draw=lightgray] (0,0.2) rectangle (14,3.8); \node at (-0.25,6*4/7) {1}; \node at (-0.25,5*4/7) {2}; \node at (-0.25,4*4/7) {3}; \node at (-0.25,3*4/7) {4}; \node at (-0.25,2*4/7) {5}; \node at (-0.25,1*4/7) {6}; %\node at (2.5,6*4/7) {\texttt{\#include $<$iostream$>$}}; %\node at (2.3,5*4/7) {\texttt{\#include $<$string$>$}}; %\node at (2.2,4*4/7) {\texttt{\#include "math.h"}}; %\node at (2.6,3*4/7) {\texttt{using namespace std;}}; %\node at (1.7,1*4/7) {\texttt{int main ()\{ }}; \draw (0.25, 0.25) node[above left, align=left] {\texttt{\#include $<$iostream$>$}\par \texttt{\#include $<$string$>$} \par \texttt{\#include "math.h"} \par \texttt{using namespace std;} \par \par \texttt{int main()}}; \end{tikzpicture} \end{document} With the commands in commentary in the above code, the output is like the bigger picture attached. However, If I do this way, I have to adjust the horizontal space for each line I might add in the program. (If someone also knows how can I make the letters darker(not bold) it would very good!)
|
I'm participating in a programming contest and we are allowed to prepare a team reference document which must not exceed 25 pages. Typically we will prepare many code templates and this year I'm trying to use latex to typeset these C++ codes and I want to know what's the best way to do that. Some requirements: Since there is a page length limit I want to typeset my codes as compact as possible. I want to have the C++ codes syntax highlighted. If it is possible to generate a compact table of content in front, it would be best.
|
Let $M$ and $N$ be $R-$modules, and $$0\longrightarrow M\overset{\iota}{\longrightarrow} N\overset{\pi}{\longrightarrow} N/M\longrightarrow 0$$ an exact sequence. Let $M$ and $N/M$ finitely generated. Show that $N$ is finitely generated. I know how to prove it, but I wanted to do as following if it's possible. Since $M$ and $N/M$ are finitely generated, then there is a surjection $$\sigma :R^{\oplus s}\longrightarrow M$$ and a surjection $$\tau : R^{\oplus t}\longrightarrow N/M.$$ What I want to show is that there is a surjection $$R^{\oplus s}\oplus R^{\oplus t}\longrightarrow N.$$ If $$\pi_1:R^{\oplus s}\oplus R^{\oplus t}\longrightarrow R^{\oplus s}$$ and $$\pi_2: R^{\oplus s}\oplus R^{\oplus t}\longrightarrow R^{\oplus t}$$ are the projection, we have that $\sigma \circ \pi_1$ and $\tau\circ \pi_2$ are onto, but ow can I do better ?
|
I know this must be easy. I'm new to modules, so perhaps I must be missing something important. Let $M$ be an $R$-module. Show that if there exists a submodule $N$ such that $N$ and $M/N$ are finitely generated, then $M$ is finitely generated. If the exact sequence $0 \longrightarrow N \longrightarrow M \longrightarrow M/N \longrightarrow 0 $ (where the second and third arrows are inclusion and projection respectively) splits then $M$ would be isomorphic to the direct sum of $M$ and $M/N$ and the conclusion would follow (I think). But I can't show that it splits. Thank you.
|
So I'm working on a website uptime monitor that should check thousands of websites per minute by doing a simple http call to them and checking the received status code. I've tested it using multiple processes of a node.js implementation to ensure that the bottleneck is not a programming or processing one. Anyways I've hit a wall. The maximum number of sites I'm able to check is roughly 2000 per minute. This number doesn't change if I run 1 instance or 10 instances of the code. If I run multiple processes, the throughput of each process reduces so that the total output is still 2000 sites checked per minute. The actualy network bandwidth doesn't seem to be too high. I mean 2000 websites would mean roughly 1 mb of data (and that's being generous). So it's probably an issue somewhere else and i'm trying to pinpoint that. Tested on digital ocean. Thanks in advance.
|
This is a about capacity planning for web sites. Related: What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.
|
If I have no wireless connection, can I connect to the internet using the usb on the computer, or some other way?
|
I know it's possible to tether iphones to use their internet connection on the computer, but can it be used the other way? I want to use the computer's network connection on my Ipod Touch through the usb cable. Is it possible? Thank you!
|
Hello everybody, // Create element const li = document.createElement('li'); // Add class li.className = 'collection-item'; // Add attribute li.setAttribute('title', 'New Item'); // Create text node and append li.appendChild(document.createTextNode('Hello World')); // Create new link element const link = document.createElement('a'); // Add classes link.className = 'delete-item secondary-content'; // Add icon html link.innerHTML = '<i class="fa fa-remove"></i>'; // Append link into li li.appendChild(link); // Append li as child to ul document.querySelectorAll(".btn")[0].addEventListener("click", function(){ document.querySelector('ul.collection').appendChild(li); }) This the the code I use to append an element which i created to an unordered list. It works fine when I click on the button the first time, but then nothing more happens. I expected that a new element would be added, whenever i click the button. Why does it only append the element one time? Can you guys help me?
|
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.
|
In 8.0.17 INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS is not prepopulated with ORGANIZATION="EPSG" records, leaving the table with only a single record, that for the default SRID=0. A count in INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS of 1 record instead of the 5152 records found in 8.0.15. It's breaking my load scripts with the following error due to the previously available spacial reference systems being omitted. ERROR 3548 (SR001) at line 1: There's no spatial reference system with SRID 4326. Is this a documented intentional change, or am I missing something? This is not mentioned in the release notes: My installations are both default AWS RDS installations made at different times resulting in different mysql versions. The reference systems are present on the prior installation but missing on the second. version 8.0.15 innodb_version 8.0.15 SELECT count(*) FROM INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS; 5152 version 8.0.17 innodb_version 8.0.17 SELECT count(*) FROM INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS; 1
|
On aws RDS I have an mysql 8.0.16 instance running. My problem is now, that the INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS table is empty. This is a problem for me because I would like to create the following table: CREATE TABLE my_table ( ... coordinates POINT NOT NULL SRID 4326 ... ); But this leads to an error message that says There's no spatial reference system with SRID 4326. Whats going on here? Why is the table empty? I would expect it to contain at least one entry for the SRID 4326.
|
My dog only likes people food. My dog likes only people food. My dog likes people food only. In each of these sentences, how does "only" affect it (i.e. emphasis and meaning)? Are any of them incorrect? My understanding is that the first sentence conveys my dog liking people food and nothing else (not limited to food). The second sentence is slightly different - my dog doesn't dislike everything, but when it comes to food the only food he likes is people food. Is there a good rule for the placement of "only" in sentences? Which is the most grammatical and comprehendible/unambiguous?
|
Which is grammatically correct? I can only do so much in this time. or I can do only so much in this time.
|
I am writing a script in bash and I can remove a string from a sentence using the code below: echo 'This is a foo test' | sed 's/\<foo\>//g' OUTPUT: 'This is a test' However, I want to be able to replace the foo with a variable. I tried the command below but it does not remove the values from the sentence. temp="foo" echo 'This is a foo test' | sed 's/\<$temp\>//g' OUTPUT: 'This is a foo test'
|
I tried the following code to replace QQ with ZZ, but it doesn't do what I want: var1=QQ sed -i 's/$var1/ZZ/g' $file However, this code does what I want: sed -i 's/QQ/ZZ/g' $file How do I use variables in sed?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.