body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
The table produced by this code always goes out off the width of my page. I want the table to fit within the width of the page. I tried giving extra \\ in between but it made it worse only. \begin{tabular}{|l|l|} \hline LocationProvider & Description \\ \hline network & Uses the mobile network or WI-Fi to determine the best location.Might have a higher precision in closed rooms than GPS. \\ \hline gps & Use the GPS receiver in the Android device to determine the best location via satellites. Usually better precision than network. \\ \hline passive & Allows to participate in location of updates of other components to save energy \\ \hline \end{tabular} The result:
|
I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met: The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction. What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?
|
I am preparing for a job interview as a JS developer and I bumped into this closure definition: A closure is a function defined inside another function (called the parent function), and has access to variables that are declared and defined in the parent function scope. Let's consider two different pieces of code: function a() { const temp = 1; function b() { console.log(temp); } } So obviously function b is a closure, because it was declared inside function a and has access to its variable temp. But what if I declare just a function just like that, without an IIFE: function c() { alert("Hi") // a function taken from the global scope } My c function wasn't declared inside any function, yet it has access to the global scope. Can it be called a closure, or should it be specifically declared inside another function to be called one?
|
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.
|
I can't play "Dr. Strangelove" on VLC... it just comes up on the screen and then does nothing. Pressing play does nothing. using Ubuntu 15.10
|
I still can't seem to play movie DVDs on my Ubuntu 11.10 even after installing restricted extras and after trying This[a] is the error message that I get with movie player. VLC doesn't play the DVD either. What gives [a]Could not read DVD. This may be because the DVD is encrypted and a DVD decryption library is not installed.
|
Intuitively, it seems to me that $|\mathbb{R}^{2}| > |\mathbb{R}|$. My intuition says something to the effect of: There exists a bijection between $\mathbb{R}$ and $\{(x,0) : x \in \mathbb{R}\}$, and the second set is a subset of $\mathbb{R}^{2}$. But I remember reading somewhere that $|\mathbb{R}^{2}| > |\mathbb{R}|$ is not true, though I may be mistaken. I know only the very basics about countable sets which are infinite. I also know that $\mathbb{R}$ is uncountable. To be clear, I am looking for: Is $|\mathbb{R}^{2}| > |\mathbb{R}|$? Why? Any quick resource/lecture notes to quickly brush up on related concepts. The most relevant question I could find was:
|
I am working on this exercise for an introductory Real Analysis course: Show that |$\mathbb{R}$| = |$\mathbb{R}^2$|. I know that $\mathbb{R}$ is uncountable. I also know that two sets $A$ and $B$ have the same cardinality if there is a bijection from $A$ onto $B$. So if I show that there exists a bijection from $\mathbb{R}$ onto $\mathbb{R}^2$ then I beleive that shows that |$\mathbb{R}$| = |$\mathbb{R}^2$|. Let $x_i \in \mathbb{R}$, where each $x_i$ is expressed as an infinite decimal, written as $x_i = x_{i0}.x_{i1}x_{i2}x_{i3}...,$. Each $x_{i0}$ is an integer, and $x_{ik} \in \left \{ 0,1,2, 3, 4, 5, 6, 7, 8, 9 \right \}$. Then, let $$f(x_i)=(x_{i0}.x_{i1}x_{i3}x_{i5}... ,x_{i0}.x_{i2}x_{i4}x_{i6}...)$$ What should I do to show that $f: \mathbb{R} \to \mathbb{R}^2$ is an injective function? Any suggestions or help with the question would be appreciated.
|
is a local rescaling of the metric tensor $$ g_{ab}\rightarrow e^{-2\omega(x)}g_{ab} $$ maps to a theory under arbitrary differentiable coordinate transformations (Diffeomorphism is an isomorphism of smooth manifolds. It is an invertible function that maps one differentiable manifold to another such that both the function and its inverse are smooth.) Question 1: Is Weyl transformation part of diffeomorphism? It seems that the answer would be yes, if this $e^{-2\omega(x)}$ is arbitrary differentiable and if the starting manifold with a $g_{ab}$ is differentiable. Question 2: Because Is this correct to say that the gravitational anomaly capture also the anomaly due to Weyl transformation? p.s. I asked more additional details in a previous post , but I got no answer. So let us zoom into a specific case. I hope someone can give a definite correct answer this time.
|
I see that the weyl transformation is $g_{ab} \to \Omega(x)g_{ab}$ under which Ricci scalar is not invariant. I am a bit puzzled when conformal transformation is defined as those coordinate transformations that effect the above metric transformation i.e $x \to x' \implies g_{\mu \nu}(x) \to g'_{\mu \nu}(x') = \Omega(x)g_{\mu \nu }(x)$. but any covariant action is clearly invariant under coordinate transformation? I see that what we mean by weyl transformation is just changing the metric by at a point by a scale factor $\Omega(x)$. So my question is why one needs to define these transformations via a coordinate transforms. Is it the case that these two transformations are different things. In flat space time I understand that conformal transformations contain lorentz transformations and lorentz invariant theory is not necessarily invariant under conformal transformations. But in a GR or in a covariant theory effecting weyl transformation via coordinate transformations is going to leave it invariant. Unless we restrict it to just rescaling the metric? I am really confused pls help.
|
I am trying to display a basic clock from system time. I don't understand why this is crashing. I am hoping someone can help me to understand my error here. At this point the form is just a label with short time displayed. I am trying to just make it update the label text on its own. The label shows the time just fine on load. But when the timer_elapsed occurs the error is thrown private void Form1_Load(object sender, EventArgs e) { lblClock.Text = DateTime.Now.ToShortTimeString(); timer = new System.Timers.Timer(); timer.Interval = 1000; timer.Elapsed += timer_Elapsed; timer.Enabled = true; timer.Start(); } void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { lblClock.Text = DateTime.Now.ToShortTimeString(); } The error is InvalidOperationException was unhandled by user code Why does this work on load but not on update? This was marked as a duplicate, but I have to disagree. Based on the linked duplicate thread the questions aren't the same. This question refers to why the exact same method works on load but not on call. The other thread is simply asking in general how to update a UI.
|
Which is the simplest way to update a Label from another Thread? I have a Form running on thread1, and from that I'm starting another thread (thread2). While thread2 is processing some files I would like to update a Label on the Form with the current status of thread2's work. How could I do that?
|
QUESTION CONTEXT: The universe is roughly 14B years while its diameter 93B light years, making radius 46.5B ly. If I understand correctly if we froze everything, go on the one side, then go to the other by the speed of light while everything else would be frozen, it would take us 93B ly. From the spectator POV however, the Big Bang happened 'only' 14B years ago. Is this caused by time dilation/relativity of time of observer to moving objects or spacetime expansion and if the former is true, then no two particles in universe ever moved relative to each other FTL, right? if the latter is true, how is that exactly different to two objects moving FTL to each other (with omitted relative time compensation)?
|
The observable universe is approximately 13.7 billion years old. But yet it is 80 billion light years across. Isn't this a contradiction?
|
I know the whole language is confusing, but I am having trouble understanding assignments with command substitutions: x=Example sentence #1 fails due to space x='Example sentence' #2 ok echo $x #3 ok [ -n $(echo $x) ] && echo foo #4 fails due to space [ -n "$(echo $x)" ] && echo foo #5 ok y=$x #6 ok y=$(echo $x) #7 ok, not like 1? [ -n $y ] #8 fails due to space With practice, I have learned that command substitutions in tests should always be surrounded by quotes (e.g. [ -n "$(cmd)" ]), and that quotes can be used inside the substitution without interfering with outside quotes. Quoting a substitution seems to capture stdout, but not stderr (unless redirected). Q1. But what happens when the substitution is not quoted (cases 4 and 7)? Specifically, I am confused with the apparent difference in behaviour between assignments x=$(cmd), which seem to work fine with spaces, versus tests [ -n $(cmd) ], which seem to always be truthy. Q2. Is it bad practice to assign command substitutions without quotes x=$(cmd)? Should I always quote them x="$(cmd)"?
|
I've read that you need double quotes for expanding variables, e.g. if [ -n "$test" ]; then echo '$test ok'; else echo '$test null'; fi will work as expected, while if [ -n $test ]; then echo '$test ok'; else echo '$test null'; fi will always say $test ok even if $test is null. but then why don't we need quotes in echo $test?
|
Im Kinda A Noob With PHP, I want to keep my page accessible only from a link etc. I only want to allow people who clicked a link to my page from example.com and others like from google.com to redirect to another page on my site etc. a error message How Could I Do This?
|
What is the most reliable and secure way to determine what page either sent, or called (via AJAX), the current page. I don't want to use the $_SERVER['HTTP_REFERER'], because of the (lack of) reliability, and I need the page being called to only come from requests originating on my site. Edit: I am looking to verify that a script that preforms a series of actions is being called from a page on my website.
|
I was just reading regarding the appropriate place to post questions about WAMP (XAMPP in my case, but the same question): It seems to suggest the proper place to ask my XAMPP question would be Super User. Then I was curious if my question would get more exposure on Stack Overflow, so I looked up how many questions about XAMPP are on either site. There are 63,394 questions tagged 'XAMPP' on Stack Overflow, and only 1,357 questions on Super User. So there is apparently more activity for XAMPP questions on SO, so it would appear that the appropriate place to ask a XAMPP question is not where my question would get the most exposure. As someone looking to find a solution to a problem as quickly as possible, I would be inclined to ask the same question in both Stack Overflow, and Super User. That doesn't seem right to have to ask in both places. LET ME BE ABSOLUTELY CLEAR THAT I AM NOT ADVOCATING FOR ANYONE TO POST A QUESTION IN TWO PLACES. I'm saying as a matter of (possibly) self preservation, in some cases — NOT necessarily my example — it might be or seem to be more likely to yield more results, and that INEVITABLY people will choose that option. And that I believe that is a fault in the system. Is there any established way to handle this issue? I looked at , but I think my question differs, in that I believe Stack Overflow would not be the appropriate place for my question, but I feel like I might put it there anyways, just to get a solution faster. I'm no expert, but it seems to me like there should be a way to take any question, and be able to select and/or change which sites the question gets posted to. That way there would only need to be one question, and one place to edit or answer it. I do not believe my question to be a duplicate of as this issue was a bit of a side note, and the actual question was in the next paragraph. Also, the answer does not seem to address my specific question. So this paragraph: So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe. ...is related to my question, but: My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow? ...is the specific question that the answer seems to address.
|
There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers. What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment. I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network? I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions. So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe. My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow? Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.
|
Im looking for an element in $\ell^p$ which is not in $\ell^q$ for all $1\leq q<p$. Does anybody know such a series?
|
For every $p\in [1,\infty)$, consider the set $\ell^p$ of real sequences $x=(x_n)=(x_1,x_2,\ldots)$ such that $\sum_{n=1}^\infty |x_n|^p<\infty$. This is a Banach space with the norm $\Vert x\Vert_p=(\sum|x_n|^p)^{1/p}$. I have the following problem: Is it true that $\ell^p=\bigcup_{1\leq q<p}\ell^q$ for $p>1$? I don't think it is true, but I'm having problems to show this. Clearly, the statement is true for some $p>1$ iff it is true for every $p>1$. I'm trying to find a sequence $(a_n)$ such that $\sum |a_n|^s$ converges iff $s\geq 1$. I've tried many sequences (such as $(n^{1+1/n})$, involving $\log$, etc...), but none of them worked.
|
I have two random variables whose PDF are parameterized by an unknown constant as follows: P(A;d) P(B;d) apparently, these two are not independent, so to find P(A+B;d) one cannot use convolution. 1- Do you have any idea how to procede? 2- is my statement about independence correct? Thanks
|
I know, I can't use convolution. I have two random variables A and B and they're dependent. I need Distributive function of A+B
|
I am having trouble understanding probability density functions. What exactly is a probability density function? Does it give you the probability of a value occurring? See my MATLAB code below: x = randn(1000,1); % generates 1000 numbers from the standard normal distribution y = normpdf(x,0,1); So what y tells me is basically what is the probability of an element in X occurring right? No, it is basically the f(x) value for x, for the Gaussian Density function right? In this (wikipedia), it says: In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function that describes the relative likelihood for this random variable to take on a given value. The probability of the random variable falling within a particular range of values is given by the integral of this variable’s density over that range—that is, it is given by the area under the density function but above the horizontal axis and between the lowest and greatest values of the range. So what is the difference of the relative likelihood vs probability? Also if somebody wants to accurately calculate the probability of a random variable, then he can just take a really small integral area right (close to zero)?
|
On the , there is this line: $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.) How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?
|
I've looked and didn't quite find similar to what I'm dealing with. Hopefully a solution, or offer for better implementation. I have a class that may be passed with an optional parameter that is preserved to the instance created. I then have a derived class with similar optional parameter, but in its non-parameter constructor does other preparation stuff regardless of the optional parameter. What would be the correct way to have it call the base-class parameter constructor, yet still do the non-parameter constructor of the derived. public class MyBaseClass { protected object preserveParm; protected int someValue; public MyBaseClass() { someValue = 1; } public MyBaseClass( object SomeParm ) : this() { preserveParm = SomeParm; } } public class DerivedClass : MyBaseClass { private int customSecondaryProp; private DateTime when; public DerivedClass() { customSecondaryProp = 10; someValue = 5; } public DerivedClass( object SomeParm ) : base( SomeParm ) { when = DateTime.Now; } } So, if I do a DerivedClass test = new DerivedClass( "testing" ); I need it to hit the base class to preserve the parameter, yet ALSO hit the derived class's non-parameter to set the sample bogus values. As it stands now, the Derived parameter method is hit, which then hits the base class's parameter constructor which calls the "this()" of the base class, and returns up the chain to the DerivedClass parameter constructor, finishes itself, but never hits the DerivedClass constructor. Is there a way to force both the baseclass parameterless AND the DerivedClass parameterless constructor?
|
I have two classes, Foo and Bar, that have constructors like this: class Foo { Foo() { // do some stuff } Foo(int arg) { // do some other stuff } } class Bar : Foo { Bar() : base() { // some third thing } } Now I want to introduce a constructor for Bar that takes an int, but I want the stuff that happens in Bar() to run as well as the stuff from Foo(int). Something like this: Bar(int arg) : Bar(), base(arg) { // some fourth thing } Is there any way to do this in C#? The best I have so far is putting the work done by Bar() into a function, that also gets called by Bar(int), but this is pretty inelegant.
|
I want to add another bounty (or increase it) on a question that already has a bounty which is newer than 48 hours. If this is possible, please explain how?
|
I think that some question can start by one person offer bounty let say +50, and some other can offer +50 (total +100). This way more than one person can share the cost of the bounty and at the same time show the interesting for a better answer.
|
When I install openssh-server with apt-get install on my ubuntu 18.04.2 LTS server an error occures when kpgk processes the package. The server is a cloud machine with 1 VCPU, 2 GB RAM, 20 GB Disk (4 GB still available). dpkg --print-architecture: amd64 dpkg --print-foreign-architectures: i386 name -a: Linux [computer-name] 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux Here is the exact command and full output: apt-get install: Reading package lists... Done Building dependency tree Reading state information... Done The following packages werde automatically installed and are no longer required: linux-image-4.15.0-42-generic linux-modules-4.15.0-42-generic Use 'apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 1 not fully installed or removed After this operatoin, 0 B of additional disk space will be used. Setting up openssh-server (1:7.6p1-4ubuntu0.3) ... /var/lib/dpgk/info/openssh-server.postinst: 95: /var/lib/dpkg/info/openssh-server.postinst: tempfile: Exec format error dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 2 Errors were encountered while processing: openssh-server E: Sub-process /usr/bin/dpkg returned an error code (1) The dpkg status of the package is now "install ok half-configured" Maintainer is Ubuntu Developers can someone give me a push in the right direction on how to solve this?` Thanks
|
I went to install bsnes the other day and, for whatever reason, the installation failed. Now, I cannot update, install new packages, or do basically any apt-get commands as they all try to process this broken package and fail. Attempting to install a new package also just dooms it to the same fate. The error I get is: Setting up google-chrome-stable (33.0.1750.152-1) ... /var/lib/dpkg/info/google-chrome-stable.postinst: 124: /var/lib/dpkg/info/google-chrome-stable.postinst: update-alternatives: not found dpkg: error processing google-chrome-stable (--configure): subprocess installed post-installation script returned error exit status 127 Setting up bsnes (0.088-7) ... /var/lib/dpkg/info/bsnes.postinst: 5: /var/lib/dpkg/info/bsnes.postinst: update-alternatives: not found dpkg: error processing bsnes (--configure): subprocess installed post-installation script returned error exit status 127 Errors were encountered while processing: google-chrome-stable bsnes E: Sub-process /usr/bin/dpkg returned an error code (1) I have been searching on Google and here on Ask Ubuntu but have not found a working solution. The commonly suggested fix is to run the following: sudo apt-get clean && sudo apt-get autoremove sudo apt-get -f install sudo dpkg --configure -a This however does not work. The apt-get commands all fail with the same error as above and the dpkg command just doesn't help. The other thing they often suggest to purge it via Synaptic or the command line, which also fails.
|
I really hope I am posting in the right forum and location. My apologies if it is incorrect. Essentially, I have a strange problem that occurs when the first use of an acronym happens to be in plural form. In that case, an 's' is appended in front of the short form as well as in the end. This happens not only for this particular one, but also several other acronyms I use, and I have not managed to work around it by using 'short-plural', 'short-plural-form', 'long-plural', or 'long-plural-form'. Any help is appreciated. See below for an MWE and the result I get from that exact code. \documentclass[a4paper,11pt]{report} \usepackage{acro} \DeclareAcronym{bc}{short =BC, long = boundary condition} \begin{document} Then, \acp{bc} are applied. \end{document} Thank you very much!
|
I have an acro first use that must be plural, but I am getting an erroneous "s" when I shouldn't be. I'm getting (sIMFs) when it should be (IMFs). See picture and code below. The problem only occurs on the first call and it does so for all my acronyms. Thanks in advance. \documentclass[12pt,twoside]{report} \usepackage{acro} \DeclareAcronym{IMF}{ short = IMF, long = Intrinsic Mode Function, class = abbrev} \begin{document} \acp{IMF} \acresetall \ac{IMF} \acp{IMF} \acfp{IMF} \end{document}
|
I get the following message: adb: error: failed to copy '/data/misc/wifi/wpa_supplicant.conf' to '.\wpa_suppl icant.conf': remote Permission denied I can not copy nothing from my android to recover my password of mi wifi
|
I have Android phone which is non-rooted. How can I know the saved WiFi passwords in my phone?
|
The currently detectable interval of black hole mergers is on the order of seconds or fractions of seconds. So each black hole merger, no matter how long the end to end process, is only detectable by LIGO for this tiny interval of time. How often are such intervals thought to happen in the observable unverse?
|
My question is a more detailed version of the one found , which elicited some good information but the question was never really answered. From table 4 in a we see the estimated rate of BH-BH mergers ranged from $10^{-4}$ to $0.3 \rm \,Mpc^{-3} Myr^{-1}$. This corresponds to $10^{-10}$ to $3\times10^{-7} \rm\,Mpc^{-3} yr^{-1}$. They write: For BH–BH inspirals, horizon distances of ...2187 Mpc are assumed. These distances correspond to a choice of ... 10M for BH mass. In the left panel of figure 4 found in there is a plot of BH mass vs horizon distance. For 2015-2016 sensitivity levels and 10M mass, the horizon distance is 300 Mpc. So we need to multiply the above numbers by $300^3=2.7\times10^{7}$. This gives a range of $2.7\times10^{-3}$ to $8.1$ detectable mergers per year, given the prior assumptions that a typical signal would come from black holes with ~10 solar masses. Also, in the we find: We present the analysis of 16 days of coincident observations between the two LIGO detectors from September 12 to October 20, 2015. Therefore the duration of the experiment was $16/365$ years. This gives an expected rate ranging from $1.18\times10^{-4}$ to $3.55\times10^{-1}$ mergers during the experiment. As far as I can tell, this can be taken as an upper bound, since not all of these events will really be detected (due to non-optimal location, coincident noise, etc). Are there other factors to take into account?
|
There is a however that question asks why $3 |p^2$. Here the question is about $ 3 | p^2 \rightarrow 3 | p$. It is a simple exercise (1.2.1) from Abbot's "Understanding Analysis". $\nexists p,q \in \mathbb{N} : \left(\dfrac{p}{q}\right)^2 = 3$ $p$ and $q$ have no common factors, otherwise they would cancel each other out. Contradiction: $p^2 = 3q^2$ The troublesome part for me is From this, we can see that $p^2$ is a multiple of 3 and hence $p$ must also be a multiple of 3. Why is that? The proof goes on with $p = 3 r$ $q^2 = 3r^2 \rightarrow q = 3 \lambda$. It concluses now that $q$ and $p$ have common factors, which invalidates the original statement. How can I prove $p^2 = 3q^2 \rightarrow p = 3 r$? If this is not true, then I don't see how the contradiction proves the statement, since it only invalidates it for such $p,q$ that have common factors. What if $p^2 = 3q^2$ and $p \ne 3 r$?
|
Assume that $$3 = \frac{p^2}{q^2}$$ So, $$ 3 q^2 = p^2$$ So $p^2$ is divisible by $3$. How we can conclude this?
|
Not a huge griefing problem but annoying nonetheless. Someone joined a channel I was in yesterday and started randomly starring and unstarring chat messages over and over. There was no way to stop them without a mod or channel owner so we just had to keep asking whomever was doing it to stop. After a few minutes they did, but it begs the question why there was no limit to what they were doing. I can only assume since they didn't hit the overall cap the system can't take any action (and you can't see who is doing it to report them). I'd like to see some sort of short term rate limit on stars. Say 2 stars in a 30 second time period. And deleting the star doesn't reset the timer. Doesn't stop anyone from bulk starring, it just slows them down to where someone else can catch on.
|
It appears that you get to blink stars on any message as frequently as you want, as long as you want. Some child on The Bridge has just found out about this and the only approach I can think of - banning people at random until the abuse stops - is not something I feel like applying right now. Please fix this, either through rate limiting, not counting unstar events towards your 30 star/day limit, shadow star bans or whatever means necessary and super-linear combination thereof.
|
I'm trying to solve the following problem: Given an analytic function $f: D \subset \mathbb{C} \to \mathbb{C}$, if $f^{(n)}(z) = 0$ for some $n \in \mathbb{N}$ and for all $z \in \mathbb{D}$, then $f$ is a polynomial of degree less than $n$. I wanted to use induction to solve this problem. I managed to show that this is true for the base case of $f' = 0$. I then wanted to prove the inductive step holds. To do this, I define the function $F = f'$, so that $f^{(n+1)} = F^{(n)}$ and I can apply the induction hypothesis on $F$. By doing this I get that $$ F = \sum_{k=0}^{n-1} a_kz^k = \sum_{k=0}^{n-1} \alpha_k r^k \cos(k\theta) + i \sum_{k=0}^{n-1} \alpha_k r^k + \sin(k\theta) \tag{1} $$ for some $a_k \in \mathbb{C}$ (possibly equal to $0$), $r = |z|$ and $\theta = \arg(z)$. From here I just need to recover $f$ to finish the problem, but here's where I ran into trouble. The only way I know I can relate $f$ and $F$ is by using the Cauchy-Riemann equations, i.e., if $f = u(r, \theta) + iv(r, \theta)$, then \begin{align} F = f' &= \frac{\partial}{\partial r}\left(\left[\cos(\theta)u + \sin(\theta)v\right] + i \left[\cos(\theta)v - \sin(\theta)u\right]\right)\tag{2}\\ &= \frac{\partial}{\partial \theta}\left(\frac{1}{r}\left[\sin(\theta)v + \cos(\theta)u\right] + i \frac{1}{r}\left[\cos(\theta)v - \sin(\theta)u\right]\right)\tag{3} \end{align} Note: These last equations can be obtained from the polar C-R equations as in . After this, I tried combining equations $(1), (2)$ and $(3)$ to get a system of differential equations from where I could solve for $u$ and $v$ explicitly, and therefore solving for $f$ since $f = u + iv$. The problem I encountered was that I couldn't solve for the values of the constants of integration. As much as I tried I just kept getting expressions that I couldn't simplify. Is my approach correct? Or alternatively, does anyone know a simpler method I could use to prove this? Thank you!
|
Suppose $f$ is entire and that in every power series $f(z)=\sum_{n=0}^\infty c_n(z-a)^n$ at least one coefficient is $0$. Prove that $f$ is a polynomial.
|
I am trying to create a custom class Student, which contains 2 fields, Name and Marks. I read on the internet that I need Getters & Setters to do so. So, I wrote the following code but it is giving me a NullPointerException. import java.util.*; class Student { public String name; public int marks; public int getMarks() { return this.marks; } public void setMarks(int marks) { this.marks = marks; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } } public class getterSetter { public static void main(String[] ab) { Scanner s = new Scanner(System.in); int n = s.nextInt(); int x; Student[] student = new Student[n]; String[] inputs = new String[n]; s.nextLine(); for(int i = 0; i < n; i++) { String xx = s.nextLine(); inputs[i] = xx; } for(int i = 0; i < n; i++) { String[] words = inputs[i].split("\\s+"); student[i].setName(words[0]); student[i].setMarks(Integer.parseInt(words[1]) + Integer.parseInt(words[2]) + Integer.parseInt(words[3])); } for(int i = 0; i < n; i++) { System.out.println(student[i].getName()); System.out.println(student[i].getMarks()); } } } The console screen is : java getterSetter 3 abc 10 10 10 def 10 10 10 ghi 10 10 10 Exception in thread "main" java.lang.NullPointerException at getterSetter.main(getterSetter.java:58)
|
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?
|
Both at home and at work I there are multiple Wi-Fi access points nearby with the same SSID and security settings. My Samsung GS2 used to switch to the strongest available access point quite quickly. Now that I have ICS 4.0.3 installed it seems that my phone is sticking to the previous access point too long. This causes my network speed to very often be too slow as I'm consistently connected to "the previous hallway". What are the solutions available to fix this issue? Is there a system setting I've missed? Is there an app that can help?
|
I have a wireless router (D-Link) in room A and a repeater (TP-Link WA750RE) in room B, both having the same SSID. Sometimes, when I go to room B and back into room A, my Nexus 5 (Android version 4.4.3) doesn't switch to the router although it has a stronger signal. It stays connected to the repeater instead. The "Tplink" and "Dlink" are only aliases. Both actually have the same SSID. When I switch the Wi-Fi off and on again, it connects to the router. which provides much better speed. How can I force Android to always switch to the strongest signal? Is there a setting for it, or an app?
|
I'm working om a simple program that creates rooms in a house according to a map. For every room, i list the connected rooms. The thing is, this cannot compile. Any idea why ? typedef struct s_room { char *name; int nbr; int x; int y; bool start; bool end; int ants; int current; t_room *connect; int visited; } t_room; I think it comes from the t_room *connect, but I can't figure out how to solve this.
|
How can I have a pointer to the next struct in the definition of this struct: typedef struct A { int a; int b; A* next; } A; this is how I first wrote it but it does not work.
|
I am trying to format add a zero to any value less than 10, so 09. So at the end of the loop, the "total" value will format to numbers less than 10 with a zero. Here is my code but it still isn't working : int total = 0; String holder = val + "-" + s + "-" + frame + "-"; for (int i = 0; i < holder.length(); i++) { int mod = holder.charAt(i); total += mod; total = total%100; //get remainder } string totalchk = String.format("%02d", total);
|
How do you left pad an int with zeros when converting to a String in java? I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).
|
For a while now, I've been trying to think of a way to install some distro of Ubuntu on an old tower I have. The tower is running dual Xeons, with a Quadros graphics card, 4GB RAM and SCSI type hard drives. It originally came with Windows XP installed, and might be 32 bit. I attempted loading a Live image of Ubuntu 14.04, but it failed. I'm under the impression that 14.04 is too new for the machine. Anyone have suggestions? Edit: The machine in question is an IBM IntelliStation Z Pro, Type 6221-47U. Components: CPU: x2 Xeon 3.06 GHz RAM: 2 GB DDR (1? 2?) GRAPHICS: unspecified It does have a DVD drive (two actually) so booting from a disc shouldn't be an issue. If I remember correctly, that's what I tried before. A couple specific questions I have: Does Ubuntu have any trouble handling multi-CPU systems, or should I expect it to work as normal? Does Ubuntu natively support SCSI drives? This machine will hopefully be used for a CNC mill control station, so it just needs basic functionality.
|
For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and such as: with a lighter desktop than the usual Gnome and Unity with the even lighter LXDE desktop Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?
|
Every time I talk to jorleif about buying hjerim, there is no dialogue options menu or anything. I have completed the stormcloaks storyline and blood on the ice but nothing. I didn't get a quest to become thane but I don't know if that's a thing or not. I've spent hours trying to fix this but I am unable to get this resolved.
|
I've finished the Stormcloak storyline, and now cannot become a Thane of Windhelm without buying Hjerim. The Steward keeps saying something has happened and he can't sell it right now. What the heck am I missing? I've been doing every random little quest from people in town I can find, hoping to unlock the house. I'm well over the 5/5 requirement of helping people. Any ideas?
|
I'm a noob to android development and I am trying to split a string multiple times by its multiple line breaks. the string I'm trying to split is pulled from a database query and is constructed like this: public String getCoin() { // TODO Auto-generated method stub String[] columns = new String[]{ KEY_ROWID, KEY_NAME, KEY_QUANTITY, KEY_OUNCES, KEY_VALUE }; Cursor c = ourDatabase.query(DATABASE_TABLE, columns, null, null, null, null, null); String result = ""; int iRow = c.getColumnIndex(KEY_ROWID); int iName = c.getColumnIndex(KEY_NAME); int iQuantity = c.getColumnIndex(KEY_QUANTITY); int iOunces = c.getColumnIndex(KEY_OUNCES); int iValue = c.getColumnIndex(KEY_VALUE); for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()){ result = result + /*c.getString(iRow) + " " +*/ c.getString(iName).substring(0, Math.min(18, c.getString(iName).length())) + "\n"; } c.close(); return result; result.getCoin reads as this: alphabravocharlie I want to split the string at the line break and place each substring into a String Array. This is my current code: String[] separated = result.split("\n"); for (int i = 0; i < separated.length; i++) { chartnames.add("$." + separated[i] + " some text" ); } This gives me an output of: "$.alpha bravo charlie some text" instead of my desired output of: "$.alpha some text, $.bravo some text, $.charlie some text" Any help is greatly appreciated
|
I'm trying to split text in a JTextArea using a regex to split the String by \n However, this does not work and I also tried by \r\n|\r|n and many other combination of regexes. Code: public void insertUpdate(DocumentEvent e) { String split[], docStr = null; Document textAreaDoc = (Document)e.getDocument(); try { docStr = textAreaDoc.getText(textAreaDoc.getStartPosition().getOffset(), textAreaDoc.getEndPosition().getOffset()); } catch (BadLocationException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } split = docStr.split("\\n"); }
|
I have two MySQL databases that are very similar to each other. How can I find out the differences in tables, and the differences in columns in each table? the databases are in different schema. It's only the structure I want to compare, not the data.
|
To automate the backup process of one of my MySQL databases, I would like to compare the structure of two tables (current version vs old version). Can you think of a query that can compare two tables? Here are some example tables that you can compare. CREATE TABLE product_today ( pname VARCHAR(150), price int, PRIMARY KEY (pname) ); CREATE TABLE product_yesterday ( pname VARCHAR(150), price int, PRIMARY KEY (pname) ); CREATE TABLE product_2days_back ( pname VARCHAR(15), price int, PRIMARY KEY (pname) ); The first two tables have identical structures. The last one is different. I just need to know whether two tables have different structures or not. I'm not interested in the how they differ.
|
I am a bit confused with the 2 lines below. MyClass myobj[]; myobj = new MyClass[numberVariable]; i would expect in line 1 something like: MyClass[] myobj; But the code works and there is not error. What is the explanation?
|
I have recently been thinking about the difference between the two ways of defining an array: int[] array int array[] Is there a difference?
|
This should be a common issue on this site, but I did not find the information I needed. Why did not my images follow the sequence I tried to define? \documentclass[11pt,fleqn]{book} \usepackage[portuguese]{babel} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage[]{titlesec} \usepackage[many]{tcolorbox} \usepackage{tikz} \usepackage{enumitem} \begin{document} %---------------------------------------------------------------------------------------- % PARTE 1 %---------------------------------------------------------------------------------------- \part{Parte 1} %--------------------------------------------------------------------------------------- % Capítulo 1 %--------------------------------------------------------------------------------------- \chapter{Conhecendo o SolidWorks} %--------------------------------------------------------------------------------------- % Seções %--------------------------------------------------------------------------------------- \section{Introdução} Quando você abre o aplicativo SOLIDWORKS pela primeira vez, a tela que você vê é a seguinte: \begin{figure} \centering \includegraphics[width=14cm]{1.png} \caption{Tela inicial} \label{fig:1} \end{figure} \section{Interface do Usuário} Abra no botão Novo: \begin{figure} \centering \includegraphics[width=14cm]{2.png} \caption{Botão novo} \label{fig:2} \end{figure} \section{Comandos da Interface do usuário} \begin{enumerate} \item Barra de menus \item Barras de ferramentas \item Gerenciador de comandos (CommandManager) \item Gerenciador de configurações \item Gerenciador de propriedades \item Filtro da árvore de projeto \item Trilhas de seleção \item Árvore de projeto do FeatureManager \item Barra de status \item Barra de ferramentas transparente \item Painel de tarefas \item Área de gráficos \end{enumerate} \end{document} 1.png 2.png
|
Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?
|
Let $X_1, X_2, ..., X_n$ be normally distributed with mean $\mu$ and variance $\sigma ^2$, then $\frac{(n-1) S^2}{ \sigma^2}$ has a Chi-Square distribution with $n-1$ degrees of freedom. How come it's chi-square distributed? Attempt: $S^2 = \frac{1}{n-1} \sum(X_i-\overline X)^2 = \frac{1}{n-1}(\sum X_i ^2 - (\sum X_i)^2)$. Here, the first term $\sum X_i^2$ is chi-squared. But you also need to subtract the second term (which is normal distributed with mean $\mu$, and variance $\frac{\sigma^2}{n}$. How does it make it chi-square distributed?
|
It's a standard result that given $X_1,\cdots ,X_n $ random sample from $N(\mu,\sigma^2)$, the random variable $$\frac{(n-1)S^2}{\sigma^2}$$ has a chi-square distribution with $(n-1)$ degrees of freedom, where $$S^2=\frac{1}{n-1}\sum^{n}_{i=1}(X_i-\bar{X})^2.$$ I would like help in proving the above result. Thanks.
|
Lets consider normalized variables X and Y. Slope of a lm(Y~X) is Cor(Y,X)*sd(Y)/sd(X) and for lm(X~Y) its Cor(X,Y)*sd(X)/sd(Y). Since sd(X) = sd(Y) = 1. The slopes of lm(Y~X) and lm(X~Y) are always bound to be equal. That would mean the regression lines for both of the models will be, $Y = mX$ and $X = mY$. Lets take an example. x = rnorm(20) y = rnorm(20) x = (x-mean(x))/sd(x) y = (y-mean(y))/sd(y) lm(x~y) Call: lm(formula = x ~ y) Coefficients: (Intercept) y 4.333e-17 -1.272e-01 lm(y~x) Call: lm(formula = y ~ x) Coefficients: (Intercept) x -4.333e-17 -1.272e-01 Suppose we have two normalized variables X and Y as shown above. They have Cor(X,Y) = Cor(Y,X) = -0.127. If I use X as a predictor variable of Y, I get Y = -0.127X; then, I expect X = -1/0.127 Y. If I use X as a predictor variable of Y, I get Y = -0.127X; It looks like both statements are inconsistent. How to interpret this result?
|
The Pearson correlation coefficient of x and y is the same, whether you compute pearson(x, y) or pearson(y, x). This suggests that doing a linear regression of y given x or x given y should be the same, but I don't think that's the case. Can someone shed light on when the relationship is not symmetric, and how that relates to the Pearson correlation coefficient (which I always think of as summarizing the best fit line)?
|
I want to add an equation number in a formula, but I've got an error: "You can't use `\eqno' in math mode.". This is my code: $e_{33} = 0 \eqno(4.4)$ How I can fix it?
|
I searched the internet but I cant find a solution for my problem. I want a numbered and labelled equation inside the text.Something like: The equation a+1=b (2.1) does ... The equation a+1=b shouldn't be in a new line like usual The equation a+1=b (2.2) does...
|
Error: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.vinicius.chatandroid/com.example.vinicius.chatandroid.Janela}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference; code: public void sendMessage(View view) { EditText ip = (EditText) findViewById(R.id.txtIp); EditText porta = (EditText) findViewById(R.id.txtPorta); String txtIp = ip.getText().toString(); String pota = porta.getText().toString(); int txtPorta = Integer.parseInt(pota); Intent intent = new Intent(this, Janela.class); intent.putExtra("ip", txtIp); intent.putExtra("porta", txtPorta); startActivity(intent); } new activity public Janela() { Intent intent = getIntent(); String ip = intent.getStringExtra("ip"); int porta = intent.getIntExtra("porta",0); this.conexao = new Conexao(ip, porta); conexao.addObserver(this); escreve("Chat iniciado com " + conexao.getIp() + ":" + conexao.getPorta()); }
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
I need to prove that for every integer $a>0$ there is a unique representation $a=r*s^2$ where $r$ is not dividable by any square: there is no $d>1$ such that $d^2|r$ What I tried is to show a as a unique multiplication of primes and then show the case that a is odd or not, but didn't get anywhere.. any help will be appriciated
|
I am trying to prove that for every integer $n \ge 1$, there exists uniquely determined $a > 0$ and $b > 0$ such that $n = a^2 b$, where $b$ is squarefree. I am trying to prove this using the properties of divisibility and GCD only. Is it possible? Let me assume that $n = a^2 b = a'^2b'$ where $a \ne a'$ and $b \ne b$'. Can we show a contradiction now?
|
I ask because I came across this comment about putting gay characters in games: The necessity of exposing the larger playerbase to the homosexual tendencies of two of its cast mates is never really expounded upon by ScreenRant. That’s not to mention that only a tiny percentage of people even identify as on the LGBTQ spectrum, even according to Gallup, which puts the national average at 4.5%. So why exactly would Blizzard force the majority of their straight players to have to engage with the homosexual tendencies of two of its non-straight characters? () And here: So what better way to get back at the core gamers who dropped one-liners and zingers that have become memes of legend, than to strip away from gamers the last remaining normal character in Overwatch? Most people figured Soldier 76 would be safe. He’s a patriotic military man, a hard-fighting soldier with undying loyalty, and a code of honor. He’s the perfect representation for what the majority of gamers like to see out of a hero. And besides, you need at least one normal sized, healthy, properly muscled straight, white male with all of his limbs intact to cater to the majority of your playerbase. Right? … RIGHT?! The average male gamer typically gravitates toward a game where there’s a character who looks like he can kick butt and take names, and Soldier 76 was that guy. .... The last bastion for masculinity in a game that’s constantly bleeding testosterone faster than the Overwatch League bleeds viewership, () It's obvious that this guy thought that 76 was straight before this. So his outrage that his face character was revealed to be gay when there was no evidence to say otherwise beforehand is pretty sad. Beyond this there is a point he makes that is interesting. Is a characters sexuality really that important? Yes most gamers are straight, but does that automatically mean that every game character needs to be straight? Or is this an appeal to the majority fallacy?
|
As we all know, the inclusion of LGBT characters has been a mighty controversial topic in recent film and literature (). Some love it with every fiber of their being, while others absolutely detest the very thought of it. Now, keep in mind that I am not here to start a political firestorm nor am I here to preach my own personal beliefs regarding this, I'm simply asking the question: will the inclusion of LGBT characters decrease potential sales? In our game, a pseudo-'90s JRPG, one of our main story writers added two (of a civilization with heavy Roman influence, but with different laws), both female, married. Originally hailing from an area in which LGBT relationships are looked down upon, I was quick to note that it may be too much controversy, but it truly depends on where you live—for him it was almost completely normal. As I see it, we have three choices. We can keep the characters just as they are. We can keep the characters, but only imply their relationship. We can alter the relationship entirely, changing one to a male. Right now, our main goal is to satisfy the general public while still strongly appealing to those who actually played JRPG's such as Dragon Quest or Final Fantasy back in the day. Which of these three options should we choose to best enhance our sales, or, if it's not up there, what is the wisest way to go about doing this? I am looking for facts and data if possible and/or applicable. EDIT: Our target audience is Everyone! Like we said, we’re aiming to satisfy the general public while still appealing to those who played JRPG’s back in the ‘90s. EDIT II: Wow. Every almost answer here contained a wealth of information, and I'd like to formally thank all that contributed. I will be using the information from just about all of these answers, and I'm sure may others facing this issue may as well. EDIT III: If you have comments that aren’t answers or you’d like to further discuss this, please refer to the as opposed to commenting. Thanks!
|
I'm trying to create a plot with pgfplots from CSV file using semicolon as separator and comma as period. I've tried parsing /pgf/number format/read comma as period as parameter to both \axis and \addplot. When used in \axis the parameter is ignored and error occurs, indicating need of read comma as period argument. When used in \addplot I receive : I'm using MixTex 2.9.6888. My code: \documentclass{article} \usepackage{tikz, pgfplots,siunitx} \usepackage[lotdepth]{subfig} \RequirePackage{filecontents} \begin{filecontents*}{data.csv} Column1;MERENI;FI2;URMS2 ;1;3,006;17,86 ;2;3,997;20,49 ;3;5,006;22,86 ;4;6,009;25,31 ;5;7,001;27,85 ;6;8,005;30,52 ;7;9,014;33,19 ;8;10,001;35,99 ;9;11,01;38,73 ;10;12,005;41,52 \end{filecontents*} \begin{document} \begin{figure} \begin{tikzpicture} \begin{axis} [ width=\linewidth, grid=major, grid style={dashed,gray!30}, title={mytitle}, ylabel=$U_[ef]$, xlabel=$f$, %/pgf/number format/read comma as period, y unit=\si{\volt}, x unit=\si{\hertz}, ymin = 0, xmin = 0 ] \addplot table[x=FI2, y=URMS2, col sep=semicolon, /pgf/number format/read comma as period] {data.csv}; \end{axis} \end{tikzpicture} \end{figure} \end{document}
|
I am trying to plot data from data files which are using the comma as decimal separator instead of a point (as is normal in SI style (French version): ). However, even after excessive search I cannot find an option that would actually tell pgfplots to read the table with the comma as decimal separator. Minimal (not) working sample: \documentclass[paper=a4,12pt,version=last,landscape]{scrartcl} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \centering \begin{tikzpicture} \begin{axis}[ width=0.9\textwidth, height=0.5\textheight, xlabel={Standardweg~[mm]}, ylabel={Standardkraft~[N]}, grid=major, ] \addplot table[x=Standardweg, y=Standardkraft] {Messwerte.TRA}; \end{axis} \end{tikzpicture} \end{document} Messwerte.TRA: Standardweg Standardkraft 0,000000000000e+000 1,960904836655e+000 -2,349615044750e-004 3,081407308578e+000 -2,349615044750e-004 4,164415359497e+000 -2,349615044750e-004 5,441759109497e+000 -2,349615044750e-004 6,443712234497e+000 -2,349615044750e-004 7,598009109497e+000 -2,349615044750e-004 8,951524734497e+000 -6,029571522959e-001 1,002574348450e+001 -2,349615044750e-004 1,122496223450e+001 -2,349615044750e-004 1,252183723450e+001 On compilation, I get the error: ! Package PGF Math Error: Could not parse input '-2,349615044750e-004' as a floating point number, sorry. The unreadable part was near ',349615044750e-004'.. for every single number in the .TRA-file. I know that I could find and replace every , with a . in the files, but that is not an option considering the amount of files I have to evaluate. Also, I tried stuff like /pgf/number format/use comma, set decimal separator={{,}}, \pgfkeys{/pgf/number format/.cd,fixed,precision=2,use period} and use comma, but none of that helped and I am pretty much running out of options. The documentation for pgfplots did not give any other ideas, either. So: How do I convince pgfplots to actually read the comma as decimal separator and to not search for the point?
|
I need help selecting data where the date is in the previous 3 months. (note: I'm not asking for the last 3 months i.e. DATEADD(MONTH, -3, GETDATE()) ) The reason I don't want to use the DATEADD method is that this query could be run in the middle of the month and I don't want it to return data leading up til that point
|
I have a query going that gets data for an ID for the last 3 months. I need to tweak it so I get the highest value for each of the three months. I've tried a couple of things with the aggregate function MAX, but I'm not getting anywhere. I'm trying to get the max value for each of the past months .... Here's the data from the query, currently sorted by date (asc): ID Date Value 12410 01/03/2017 12:17 0.000178 12410 01/10/2017 11:36 0.000186 12410 01/17/2017 11:27 0.000189 12410 01/24/2017 13:09 0.000182 12410 01/31/2017 10:37 0.000169 12410 02/07/2017 11:03 0.000214 12410 02/14/2017 11:52 0.000176 12410 02/21/2017 10:51 0.000200 12410 02/28/2017 12:29 0.000194 12410 03/07/2017 08:39 0.000206 Here's the query: select AnalysisID as "ID" , AnalysisDateTime as "Date", AnalysisValue as "Value" from AnalysisValueTbl where AnalysisID = 12410 and DatePart(m, AnalysisDateTime) = DatePart(m, DateAdd(m, -3, getdate())) and DatePart(yyyy, AnalysisDateTime) = DatePart(yyyy, DateAdd(m,-3, getdate())) or AnalysisID = 12410 and DatePart(m, AnalysisDateTime) = DatePart(m, DateAdd(m, -2, getdate())) and DatePart(yyyy, AnalysisDateTime) = DatePart(yyyy, DateAdd(m,-2, getdate())) or AnalysisID = 12410 and DatePart(m, AnalysisDateTime) = DatePart(m, DateAdd(m, -1, getdate())) and DatePart(yyyy, AnalysisDateTime) = DatePart(yyyy, DateAdd(m,-1, getdate())) order by AnalysisValue desc
|
I came across many of the highly rated questions are "closed as not constructive". For example . This question has 146 upvoted, 105 favourites; will be most valuable question. I could understand this question may be not programming related; but still related the best way of code design. Since we don't have stack for programming design; I think we can use stackoverflow here. Now My concern is; what is the objective of closing a question? At one point of time are we planing to cleanup those questions from the DB? if yes we could loose such valuable question rit? And How we are planing to differentiate really not constructive question from design based question which is highly voted?
|
Useful threads are being closed as "not constructive:" This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the . For example, was very useful for me since I am new to obfuscation and the question gave me a start. Also that question has lots of votes and bookmarks - these alone are the markers of usefulness. The question is closed anyway. No idea why. Same happened to my question, , which received one bookmark immediately. I was waiting for an answer with the two products downloaded and installed. I desired that experienced people would share their thoughts and point me to the better one. No. Closed. I.e. I must go to some other forum and ask there or I must search on Google and write down the pros and cons of each myself. I am not asking questions just because I have tons of time and want to chat; I need an answer, that's why I am asking. I am asking because I think that SO has the most professional people to answer and because I didn't find a good answer in Google. I saw other questions closed which I myself found to be useful and I bookmarked some of the closed questions. UPDATE If I want people who have an experience which I do not have with some software products and I want to see which product is better in the terms of usability and reliability, not just better in terms of the price or has a better official website or better described on the official website, how do I ask this question? Or is this a question which I cannot ask on SO? I.e. this sort of information is not available on SO? Is this one breaking the rules as well: ?
|
I need to Install Ubuntu on a Flash Drive because I don't have enough space on my Laptop to Dual-Boot. I need to Fully Install Ubuntu on a flash drive.
|
If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about. I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install. To do this, I need to install the nVidia drivers first (sigh). To do this, I need changes to persist a reboot. To do this, I need to really install Ubuntu on a USB key. How do you do that? What I tried I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu: sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso ...but the installer didn't detect the disk properly.
|
I recall that X11 provided a number of "fun" programs accessible via unix. For instance, if you use the command xeyes, an interface will pop up of cartoon-like eyes which follow your cursor everywhere. This still works on my most update version of X11. But I remember so many more of these fun little commands. For instance, there is: (A) xsnow which causes snow to fall on your desktop, with the santa option (B) xsol which would begin a solitaire GUI you could interact with (C) xmille was something similar, and allow you to play the game Mille Borne (D) xroach caused cockroaches to crawl all over your screen, with the squish option allow you to click/squish these buggers (E) xphoon would show the moon as it appears today (F) xpenguins has penguins appear (G) oneke had something to do with cats and dogs Question 1: Does anyone else still use these? The only command which still works for me is xeyes. Which updates do I need to use the others? Question 2: Have I forgotten any of these types of X11 commands?
|
I recall that X11 provided a number of "fun" programs accessible via unix. For instance, if you use the command xeyes, an interface will pop up of cartoon-like eyes which follow your cursor everywhere. This still works on my most update version of X11. But I remember so many more of these fun little commands. For instance, there is: (A) xsnow which causes snow to fall on your desktop, with the santa option (B) xsol which would begin a solitaire GUI you could interact with (C) xmille was something similar, and allow you to play the game Mille Borne (D) xroach caused cockroaches to crawl all over your screen, with the squish option allow you to click/squish these buggers (E) xphoon would show the moon as it appears today (F) xpenguins has penguins appear (G) oneko had something to do with cats and dogs Question 1: Does anyone else still use these? The only command which still works for me is xeyes. Which updates do I need to use the others? Question 2: Have I forgotten any of these types of X11 commands?
|
Why does a wave reflect on the edge of an open tube? There is nothing solid to make the wave bounce. Then why is it reflected?
|
How can standing waves be produced in an open organ pipe even though both of its ends are open? Can someone explain with more clarity?
|
Let $(A_n)$ be a decreasing sequence of sets. I am looking for an example that if $\mu^*(A_1) = \infty$, $$\mu^*(\cap_{n \in N} A_n)\not= \lim_{n\to \infty}\mu^*(A_n).$$ I saw from another that if we define sets to be $A_1 = [0, \infty)$ and $A_n =\emptyset$ for $n \ge 2$, this sequence of sets can be an example which satisfies the above conditions. But, I do not understand why. I think that $\lim_{n\to \infty}\mu^*(A_n)= 0$ as $A_n$ is empty set for $n \ge 2$. But, I also think that $\cap_{n \in N} A_n = \emptyset$. That is, $\mu^*(\cap_{n \in N} A_n)=0$ as well. Could you elaborate on this?
|
I was wondering if someone could please give me an example of a sequence of decreasing sets where the first set has infinite Lebesgue measure; i.e., $\{B_{n}\}_{n=1}^{\infty}$ such that $m(B_{1}) = \infty$ but $m(\cap_{n=1}^{\infty} B_{n}) \neq \lim_{n \to \infty}m(B_{n})$? thank you.
|
Pls, have got this DVD-ROM I need installed on my Ubuntu 16.04. I'm pretty new to Linux system so I don't know how to go about this. In windows, I just have to put in the CD slot and install from there. I have tried sound juicer but that seems not to be helpful.
|
Can .exe and .msi files (Windows software) be installed in Ubuntu?
|
From what I understand, QM is all about uncertainty. The wavefunction (or rather $|\Psi|^2$) gives us a probability of finding a particle at a certain point. Then, we measure the particle, and find what point it is at. Now, here's my trouble - QM states that before we measured this particle, it was in a superposition of many states and did not have a definite position. This also implies the wave function is "perfect" because it gives as accurate information as possible about the position particle before we measure it. So, how do we know this? Why can't there be a function $\phi$ that doesn't give probability distributions, but instead gives definite locations of particles, and we just haven't found a way of expressing or computing it? Why do we know that the position of particles is physically uncertain, and not just unknown to the experimenter? Sure, Quantum Mechanics works out beautifully and fits the results, but perhaps it is simply a very good theory of probability when we have a much more elegant and simple theory?
|
It was mentioned to me that it can be shown that there is no classical explanation for the uncertainty in Quantum Mechanics -- i.e. that there are no hidden workings that we have just not yet seen, which could be explained classically and would explain the probabilistic nature of Quantum events in a 'deterministic' fashion. Can someone explain how this is known please?
|
I am asking to use central limit theorem to solve this quesion. In an election between two candidates, A and B, one million individuals cast their vote. Among these, 2000 know candidate A from her election campaign and vote unanimously for her. The remaining 998000 voters are undecided and make their decision independently of each other by flipping a fair coin. Approximate the probability pA that candidate A wins up to 3 significant figures. I got my mean = np = (1000000-2000) * 0.5 = 499000, my sd =$\sqrt {np*(1-p)}$= $\sqrt {998000*0.5*(1-0.5)}$, then apply CLT, my new sd = $\frac{sd}{\sqrt{998000}}$, and X = $\frac{1000000}{2}$+1-2000 = 498001. Then apply normal distribution. Am I right?
|
I am asked to solve the following question using central limit theorem. In an election between two candidates, A and B, one million individuals cast theirvote. Among these, 2000 know candidate A from her election campaign and vote unanimously for her.The remaining 998000 voters are undecided and make their decision independently of each other byflipping a fair coin.Approximate the probability pA that candidate A wins up to 3 significant figures. It's easy to solve directly. PA = $\frac{0.5(10000-2000)+2000}{10000}$ = 0.501. However, I am quite confused about how to solve this problem by central limit theorem.
|
I need to make selected option 17 using JQuery I can't use value, because it's always different. So is there any solution to use number of 'select' child or somthing? Thank you. <select name="size" id="size"> <option value="1430">17</option> <option value="1429">19</option> <option value="1428">20</option> <option value="1427">16</option> <option value="1426">15</option> <option value="1425">18</option> </select>
|
I have a select control, and in a javascript variable I have a text string. Using jQuery I want to set the selected element of the select control to be the item with the text description I have (as opposed to the value, which I don't have). I know setting it by value is pretty trivial. e.g. $("#my-select").val(myVal); But I'm a bit stumped on doing it via the text description. I guess there must be a way of getting the value out from the text description, but my brain is too Friday afternoon-ed to be able to work it out.
|
i have a sets of images A Each image (a_i) is a slice of an huge computer generated map-image M_A. Each image a_j in A overlaps with at least one other image a_k in A. There is no distortion, blur or color difference they overlap pixel perfect and are completely planar. i need to stitch them together = map M_A. After that i need to find the difference between M_A and an other map-image M_B (gimp) the last part is no problem: I can put them in 2 layers in Gimp an set one to 'Differece' the tricky part is the lossless stitching so: How do i stitch the overlapping images together without blurring or deformation? i tried Hugin () - i like it - but it seems it is all about inexact images (taken by Cameras). It forced me to choose a focal length. And after 3h of computation i ended up with a projection of planar objects on a sphere, witch were then projected back to a plane for rendering...
|
I can create a collection of pictures giving a 360-degree view from a certain spot, just taking a bunch of photographs from the same spot but in a different direction. However, what software could I use (on Windows) to stitch these images together to get one big image? I prefer something that would stitch them together without showing any seams.
|
-edit 2. Tested this on my mobile works as intended. Stupid android avd I am getting a error and i am not quite sure how to fix it. I could remove the need for caching the image but that would increase the bandwidth needed for the application. My current code should work but it is throwing a NullPointerException here is the error java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File android.content.Context.getCacheDir()' on a null object reference at android.content.ContextWrapper.getCacheDir(ContextWrapper.java:232) at com.program.programmy.application.FileCache.<init>(FileCache.java:18) and this is the code causing the problem is the one surrounded by ** line 18 public FileCache(Context context) { // Find the dir to save cached images if (android.os.Environment.getExternalStorageState().equals( android.os.Environment.MEDIA_MOUNTED)) cacheDir = new File( android.os.Environment.getExternalStorageDirectory(), "ParseListViewImgTxt"); else **cacheDir = context.getCacheDir();** if (!cacheDir.exists()) cacheDir.mkdirs(); } if someone could help out with this one little thing my program should work no problem. cheers -Edit This is only when i try to leave the list intent to look at a single object. Here is some more code from the area that prompts the error view.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(context, SingleItemView.class); context.startActivity(intent); } }); Also here is a link to something similar that i am doing except no one is having the problem i am
|
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?
|
If $X\sim N(0, \sigma^2)$, how can I compute $\operatorname{Var}(X^2)$? Here is my idea... but I cannot get there. $$\operatorname{Var}(X^2) = E(X^4) - (E(X^2))^2$$
|
What is the mean and variance of Squared Gaussian: $Y=X^2$ where: $X\sim\mathcal{N}(0,\sigma^2)$? It is interesting to note that Gaussian R.V here is zero-mean and non-central Chi-square Distribution doesn't work. Thanks.
|
I am designing a board and the problem I am facing on the board hardware is that the core power supply and ground has very low impedance of around 0.3 Ohm. This is leading to a conclusion of two nets as if these are shorted together. Although the current drawn for that particular assembly for core power supply is 9A the impedance would be low(may be around 4-5 Ohm).But is 0.2 Ohm a correct value. We have done the x-ray analysis of BGA, and no solder bridging is observed. Can anyone suggest what could be the issue?
|
Note that this is a theoretical question - there is no schematic I can show. I will show some schematic, but it will be a very simplified version of an actual circuit, only for illustration purposes. Assume I have a voltage converter that takes as an input my main voltage (from a power supply) and outputs a certain voltage, for example 1.8V. It would look something like this: – Schematic created using When connecting my circuit to the P.S, I notice it draws too much current (the P.S shows that). Since I have multiple voltage converters in my circuit (not shown here), I check resistance between each output of each converter to ground. I see that the resistance between 1.8V to ground is almost 0 Ohms. Now I know the fault is either in the voltage converter or one (or more) of the other components drawing power from that 1.8V. I desolder the resistor shown in the image to disconnect the converter from the other components and see that the converter is fine, but checking resistance from the point connected to all those components still shows 0 Ohms. My question is - how would you check which component is the faulty one, without desoldering each suspicious component? As you can see in the image, the 1.8V supply is connected directly to the components, without a resistor/bead. For the sake of this question, assume I have access to whatever equipment needed (no matter how pricey). I wouldn't want solutions to be limited due to availability of equipment. Thank you!
|
I am trying to do a general Assert.AreEqual call on some details in a table header, however I am struggling figuring out how to successfully format the expected results. The return value on the GetTableHeader call is as follows: "× •••\r\nAcme Health Fund\r\nBalance Date: 9/27/2017" I ONLY want to assert that the Acme Health Fund text is present. My current call is this: Assert.AreEqual("/.*Acme Health Fund.*/" , GetTableHeader() ); How can I format my first parameter in the AreEqual call to ONLY expect "Acme Health Fund"?
|
For example, this regex (.*)<FooBar> will match: abcde<FooBar> But how do I get it to match across multiple lines? abcde fghij<FooBar>
|
$ sudo > syslog -bash: syslog: Permission denied $ ls -la syslog -rw-r----- 1 syslog adm 11673034092 2016-09-01 16:55 syslog What's going on here?
|
When using sudo to allow edits to files, I regularly get 'permission denied'. For example, my mouse is jittery and sluggish, so I want to disable polling: sudo echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf I'm prompted for a password, and then get: bash: /etc/modprobe.d/local.conf: Permission denied So I tried to do a temporary change to disable polling by using: sudo echo N> /sys/module/drm_kms_helper/parameters/poll Yet again the system responded with: bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied Any ideas?
|
How does FaceTime determine which contact method to use when FaceTiming with a contact? For example, if I have one contact on my iPhone. The contact has 2 email addresses, [email protected] & [email protected]. Each of those email addresses is associated with a different Apple ID & FaceTime account. The only overlap is the contact on my local device. If I tap FaceTime for that contact, which Apple ID will take priority and be called via FaceTime?
|
I have a friend with two iPhones, two different numbers. When I call her with FaceTime audio, only phone A rings. How can I call phone B? The phones have two separate Apple ID addresses, but they are both set to receive Facetime calls on their 10 digit phone numbers. I have both numbers listed in my contacts as 'Home' and 'Work' for the same person.
|
My university mathematics is kind of poor. But as I am learning advanced mathematics this becomes a major shortcoming. I tried to integrate $\int$$\sin^3\theta$$\cos^2\theta$d$\theta$ = $\int$(-3$\cos^3\theta$$\sin$$\theta$d$\theta$)$\left(-\frac13\right)$$\sin^2\theta$ = $\int$$\left(-\frac13\right)$($\sin^2\theta$)d($\cos^3\theta$) = $\left(-\frac13\right)$($\sin^2\theta$$\cos^3\theta$) - $\left(-\frac13\right)$$\int$$\cos^3\theta$d$\sin^2\theta$ = $\left(-\frac13\right)$($\sin^2\theta$$\cos^3\theta$) - $\int$(-2)$\cos^4\theta$d$\theta$ = $\left(-\frac13\right)$($\sin^2\theta$$\cos^3\theta$) + $\left(\frac2{15}\right)$$\cos^5\theta$ But this certainly is wrong. Why?
|
Is this correct? I thought it would be but when I entered it into wolfram alpha, I got a different answer. $$\int (\cos^3x)(\sin^2x)dx = \int(\cos x)(\cos^2x)(\sin^2x)dx = \int (\cos x)(1-\sin^2x)(\sin^2x)dx.$$ let $u = \sin x$, $du = \cos xdx$ $$\int(1-u^2)u^2du = \int(u^2-u^4)du = \frac{u^3}{3} - \frac{u^5}{5} +C$$ Plugging in back $u$, we get $\displaystyle\frac{\sin^3 x}{3} - \frac{\sin^5 x}{5}$ + C
|
I'm using the pow function and found out I had a bug in my code because == and is were not having the same behavior. Here goes an example: pow(3, 47159012670, 47159012671) == 1 returns True but pow(3, 47159012670, 47159012671) is 1 returns False. I'd like to know what is it that I'm not getting.
|
Why does the following behave unexpectedly in Python? >>> a = 256 >>> b = 256 >>> a is b True # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False # What happened here? Why is this False? >>> 257 is 257 True # Yet the literal numbers compare properly I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100. Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?
|
I was wondering what the best way to go about updating a semi old version of R to the latest version, which I believe is 3.2.2-1. I havent needed it for a while but now will need it more with a few features that are only on the latest version.
|
Most of the "Software" I install on my server needs to be the latest release (Java, Tomcat, MySQL-Cluster). So I never have the luck, that there are pre-built Debian packages (in the distribution) available. Therefore all the software is downloaded from the project-webpage and built from source. Now my question is, what is the correct way to install them on my Debian system? My main problem is, when installing them directly from the source, they are not included in the package management (with aptitude). Checkinstall seems to not really be suggested to be used and equiv also has drawbacks. Is the only correct way to handle this by building my own packages with dh_make and dpkg-buildpackage? What are you doing if you always need the latest version?
|
I have code that manipulates data of a file that I currently have hard-coded in the script. I want to be able to prompt the user to chose the input file rather than having to hard-code it. Here is what I have for input. Instead of always using myfile.txt, I'd like the user to be able to choose the file: with open('myfile.txt', 'rU') as input_file:
|
How do I have a Python script that a) can accept user input and how do I make it b) read in arguments if run from the command line?
|
Trying to find this book. In it, over eons of time, a sun actually begins to think. He becomes self-aware, and then, one day MOVES itself, and its system. I read this approximately 10-15 years ago, in paperback format, I believe. Any help is appreciated!
|
One of whom destroys the Earth, perhaps accidentally, while fighting another... the plot also involves a human colony ship or planet that loses contact with the Earth; I think a small boy is also involved with the plot, although it's been 20-30 years since I read this story. Any help would be appreciated! It's driving my brother and me a bit batty. Here's the batty brother's take: the main being has created others who are now at war, exploding stars. To escape, the main being accelerates the star of the human colony as a decoy. However, most of the story centers on some guy who winds up living forever, as they keep sticking him in cryogenic sleep and reawakening him. If memory serves me right, they abandon the colony planet for a while and move to asteroids as the star is weakening because it is using it's energy to accelerate. When it decelerates, it is the only star left in the universe. The one "being" was almost reduced to living off the energy of a black hole when it appears, and he sees it and sets off to go there, with a cryptic ending that the humans very well might fight him off.
|
Could someone explain to me how the material exchange works in the actually destiny game. The two vendors I'm told to go to give me material in exchange for marks. Am I missing something? I'm also playing on Xbox One of that changes anything.
|
I have the option of trading in some Spirit Bloom (or any of the other materials—Spinmetal, Helium Filaments, Relic Iron) with the Crucible Quartermaster (I believe some other vendor does it too), but it gives me no indication what I'd get in exchange. I imagine it's some amount of rep and perhaps marks, but what is it? And if it's variable, what are its deciding factors? Do all kinds of elements have the same conversion rate? Note: As of the material exchanges now work in the opposite direction, where marks are used to purchase materials. What is the exchange rate for marks to materials?
|
Are sufficiently large key sizes enough to deter quantum attacks for symmetric key ciphers such as AES?
|
We know speedup brute-force attacks two times faster in block ciphers (e.g brute-forcing 128-bit keys take $2^{64}$ operations, not $2^{128}$). That explains why we are using 256-bit keys to encrypt top secrets. But on AES shows brute-forcing AES-256 take $2^{100}$ operations. Does this attack work with Grover's search to make AES cipher quantum unresistant?
|
Task is to get files(pdf) from a local directory, by date. In my scenario we have bulk of pdf files in a directory with different date modified(past few years). I'm trying to write a loop(which iterate for each day for a year) where i would like get files for each date. can someone help with How to read files on directory based on Date using Java. Any help is appreciated.
|
I want to get a list of files in a directory, but I want to sort it such that the oldest files are first. My solution was to call File.listFiles and just resort the list based on File.lastModified, but I was wondering if there was a better way. Edit: My current solution, as suggested, is to use an anonymous Comparator: File[] files = directory.listFiles(); Arrays.sort(files, new Comparator<File>(){ public int compare(File f1, File f2) { return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified()); } });
|
I have a list with a images. When i click the image i want to highlight it. I also have a upload new image button, which uploads in list a new image. But when i click the uploaded images they don't highlight. This is the code in snippet. function changePhoto(input) { if (input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { var source = e.target.result; $(".list").append("<li><img src=" + source + " class='image'></li>") } reader.readAsDataURL(input.files[0]); } } $("#addPhoto").change(function() { changePhoto(this); }); $('.image').click(function(){ $('.selected').removeClass('selected'); $(this).addClass('selected'); }); .image { height: 100px; width: 100px; cursor:pointer; } .selected { border: 1px solid blue; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <form action=""> <input type="file" value="Add new image" id="addPhoto"> </form> <ul class="list"> <li><img src="https://blog.shareaholic.com/wp-content/uploads/2015/06/shortlink.png" alt="" class="image"></li> <li><img src="http://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png?v=c78bd457575a" alt="" class="image"></li> </ul> And
|
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.
|
If time has slowed down for one person and if other person who is observing an action done by person for whom time got slowed down then the action Which took place at a particular instant be observed by both observers at that same instant while time for both is not same? If we see things moving then we say that time is passing how far is it correct? If nothing literally nothing in universe is dynamic or moving then will the time exist?
|
Please will someone explain what time dilation really is and how it occurs? There are lots of questions and answers going into how to calculate time dilation, but none that give an intuitive feel for how it happens.
|
What's a noun that means a correction/amendment/addition made to a text after the text has been "finalised" JK Rowling's many ______s posted on twitter
|
A clarification of a European building code has been issued, therefore a separate correction for the book is released. What would this correction be called? I have had the words amendment and addendum suggested from different sources.
|
I know I've been asking a lot of questions lately about tenses. But please bear with me here. NASA scientists have decided to delay the space shuttle's launch in order to determine whether recently repaired parts will cause damage if they break off in orbit. So for the above example, I know will is correctly used. But I don't understand why there needs to be Present Perfect. Since this happened in the past shouldn't there be Simple Past? Is this because NASA's decision is continuing into the present?
|
Non-native speakers often get confused about what the various tenses and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter. I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be incorporated into the diagram. Nota bene: What this is not is a discussion of whether there are more than two tenses in English. , to which this question is not intended to supply arguments one way or the other. Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better. Breaking News There is now an excellent ELU blog article titled . It is highly recommended reading.
|
I understand that you need a deflector shield to clear a path in front of your starship when travelling at relativistic speeds, such as under impulse drive. However, since the idea of warp drive is that you create a warp bubble around your ship and compress the space in front of you while expanding it behind you (basically moving the bubble of space that you're sitting in through space) then why do you need a deflector shield? You're not moving relative to the space you're occupying. Any particle in your path would just get pushed out of the way temporarily as you pass by. That particle wouldn't even move relative to the space it's occupying... the space it's occupying would just get warped. Now I can't imagine it's good for matter to exist in a highly warped area of space. I imagine any macroscopic bit of matter entering a highly curved area of space would have a lot of internal stresses and absorb a lot of heat, perhaps becoming plasma, so perhaps the deflector shield actually deflects particles out of the path of the warp bubble itself. That energy has to come from somewhere, which has to be the warp drive itself. If it didn't take energy to warp through matter then you could theoretically warp right through a planet or a star without worrying about it, but that's clearly not possible. Are there any canon explanations for why a deflector shield is needed at warp?
|
Like something going at warp hits a planet, star, another ship, moon, satellite, alien, tribble, etc.... Basically, can stuff in subspace (warped stuff) hit stuff in real space (not warp)? Star Trek: The Voyage Home shows us clearly that entering warp speed within Earth's atmosphere has no adverse consequences for the starship or the environment. HMS Bounty went through miles of atmosphere, dust, birds, and clouds and nothing entered to hit her. Enterprise did this again by dropping out of warp in Titan's atmosphere. which explains some tech used, but now we have to ask if there is even a hazard of collision at warp. Has there ever been a collision in the franchise - any normal object being hit at warp speed? (This obviously doesn't include things traveling at warp together, like photon torpedoes from one ship to another). Closest example I found: In Enterprise attempts warp before balancing their warp drives and creates a wormhole instead. They nearly collide with an asteroid which was already inside the wormhole, but neither the ship not the asteroid were traveling at warp. Compressing Space Real-world (non-canon) attempts to explain ST warp technology rely on compressing space itself in front of the vessel. The image sequence below from Star Trek: Into Darkness (canon) shows Enterprise warping past the USS Vengeance and confirms that Enterprise actually gets smaller (or compresses the space around it). The light on Vengeance shows that at the instant the two ships are side-by-side Enterprise looks like a toy beside it. (Large image needed for detail - sorry): Thus objects at warp occupy less real space - possibly none at - because , which according to Memory-Alpha is implied to be the medium which FTL travel happens. Normally subspace and real space do not interact. When they do it is called a . Also, objects inside the warp bubble are not moved by the warp drive: The observer(spaceship) is still immersed in the interior of the warp bubble and this bubble is carried out by the spacetime ”stream” at faster than light velocities with the observer at the rest with respect to its local neighborhoods (p. 25) It is my belief that to be consistent with warp bubble physics derived from the Einstein Field Equations in general relativity, the ST interpretation of warp speed travel should not allow collisions between n-space objects and objects within a warp bubble and remove the phenomenon from any plotlines such that warp travel is intrinsically safe for the traveller, but possibly greatly impactful for the normal world outside. But has it happened? Points of clarification raised by comments Deflector Shields: Yes, ships have them. Gene Roddenberry envisioned Navigational Shields which would deflect anything in front of the ship, from a single hydrogen atom to an asteroid (see his notes below). It's important to note that much of what he had in this guide was changed in final production. In fact, based on this guide we could write an entire episode on a simple deflector sabotage resulting in them hitting a hydrogen atom. Real science calculations tell us that even hitting a photon of light would release incalculable energy. These notes very much explain the many questions asking why ships don't go to warp inside a solar system. Solar systems are FULL of particles and debris, which would require a great deal of energy to deflect. Interstellar space simply draws less power because the shields work less.
|
My website sitelinks are only working when I Google example.com. If I Google search just the site name, it returns my site as number 1 but without the site links. Is there any way I can make sitelinks appear for my site even when you Google only the site name?
|
My website used to have sitelinks and now it doesn't. It's very possible that it's due to changing the website to a sidebar design instead of having an "interstitial" type landing page which limited the number of choices, but I'm not sure. Here is how sitelinks might look for a site: What are some things that I can do to improve my chances of getting sitelinks?
|
Existing superconducting quantum computers need to be cooled near absolute zero. For example, some of D-Wave's machines are cooled to about $20 \ \mathrm {mK}$. Their design uses a dilution refrigerator. Are there any other cooling methods for superconducting quantum computers besides dilution refrigerators which are capable of achieving such low temperatures? Are there any specific commercial quantum computer designs or research projects using these other cooling methods?
|
Is a dilution refrigerator the only way to cool superconducting qubits down to 10 millikelvin? If not, what other methods are there, and why is dilution refrigeration the primary method?
|
I'm trying to dynamically add input fields based on an input field value. After adding fields, I want to add events on these dynamically added input fields, and this's what I did, but I'm not getting the result I want. Here's what I tried using jquery. html file : <input class='cls1' id='num' /> <div id="samp"></div> script file function add() { var num = $("#num").val() data = "" for (i = 0; i<num; i++) { var id_name = "input_" + i data += "<input class='cls2' id='" + id_name + "' /><br>" } $("#samp").show().html(data) } $(".cls1").on("change keyup paste", function (event) { console.log("chng1") // this's logging add() // this adds input fields }) $(".cls2").on("change keyup paste", function (event) { console.log("chng2") // not logging }) $("input[id^='input_']").on("change keyup paste", function (event) { console.log("chng2") // not logging }) Any help would be 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 am a beginner in Java. I need to compare two arrays of string and find out if any value from the first array matches any value in second array? Here is my function which does not work as expected, public static boolean CheckStatAppearinLeftAndRight1(String[] array1, String[] array2) { boolean b = false; for (int i = 0; i < array2.length; i++) { for (int a = 0; a < array1.length; a++) { if (array2[i] == array1[a]) { b = true; break; } else { b = false; } } } return b; } Can someone please point out the issue here?
|
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?
|
After detecting a collision between two convex shapes by using separating axis theorem and calculating MTV. How can I calculate the contact points?(for applying torque to the rigid body).
|
The Separating Axis Theorem (SAT) makes it simple to determine the Minimum Translation Vector, i.e., the shortest vector that can separate two colliding objects. However, what I need is the vector that separates the objects along the vector that the penetrating object is moving (i.e. the contact point). I drew a picture to help clarify. There is one box, moving from the before to the after position. In its after position, it intersects the grey polygon. SAT can easily return the MTV, which is the red vector. I am looking to calculate the blue vector. My current solution performs a binary search between the before and after positions until the length of the blue vector is known to a certain threshold. It works but it's a very expensive calculation since the collision between shapes needs to be recalculated every loop. Is there a simpler and/or more efficient way to find the contact point vector?
|
I have a long math file where $$ $$ was used for display math. I want to change these to \[ \] to make it look neater. I don't know whether I can use the find/replace function in TeXworks to alternate between replacing by \[ and \], and I'm not enough of a programmer to solve this with a batch program. Is there an easy fix?
|
Is there an editor or IDE (or a script) for substituting the TeX-Commands $ and $$ for opening and closing math regions into the corresponding LaTeX-Commands \(,\) and \[,\]? I'm sure there is a tool - and I'm searching for. I think, this will result in better readable code. A simple search and replace wont do that - but with regular expressions, that should not be problem. I simply do not want to invent the wheel a second time.
|
When inserting a block of code, several lines, previously copied with CTRL/C, and pasted with CTRL/V, I have do "down" "home" four "space"s, over and over. Please, is there a way to record these keystrokes and re-play them with a single key? Of course marking up a many lined block of code may be already allowed for, but I could not locate it in the Help. Even so, it would be a useful feature, and is found in emacs and probably other text editors.
|
How do I post text so that it is formatted as code? What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax highlighting? For more information, see "" in the .
|
I have already tried putting it into a new document. I haven't used Blender before this and have been following a tutorial.
|
A scene I made is not rendering, at all. This grey screen stays the same and nothing changes. Here are my settings: [
|
I read this book about ten years ago, I unfortunately don't remember much about the general plot but I do remember some odd specific details. Firstly, although it was definitely a stand-alone book, I read it in a collection titled something along the lines of "Exciting Stories for Boys". I think the first Guardians of Ga'Hoole book was included in this collection but I might be wrong. The book itself was a YA story about a high school boy who lived on earth shortly before it got struck by a meteor; a lot of the book was him going about normal high school business, but at some point he learns that the world is going to end and only a certain number of important people and their families got to board a ship to another planet (his dad was a VIP for some reason I think). I remember that when he boards, there was a child on the ship who wanted to bring a teddy bear, but wasn't allowed to because they didn't have room. Eventually, they put some tubes in the protagonist to put him in some sort of cryo, and then the book ends giving us a depressing description of most of the characters we met during the book dying to a meteor impact (including the main character's crush who we saw a lot of). I know this isn't a lot to go off of, but I believe the book was relatively popular and had some sequels (though I didn't read any).
|
Looking for the name of a book series I read in middle school, 2001-2004 roughly. All I can remember about it was that there were a handful of teenagers who somehow ended up on an alien planet that they eventually found out to be a ship. They have to fight for survival against multiple different enemies, I think one of the kids could communicate with part of the ship telepathically. Some of the aliens were either blue or I think even transparent. There really isn't too much to work off of, but I figured someone might know what it is.
|
I have upgraded from 16.10 to 17.04 and now I am not able to connect to any WiFi Hotspots that I create. Anytime I click on the connect button, it says Configuring but does not connect. At times it tries to connect and soon after deactivates the connection.
|
I recently upgraded from Ubuntu 16.10 to 17.04. In Ubuntu 16.10, I could setup a WiFi hot-spot to give Internet access to my Android phone using the trick mentioned in this article . I can connect to WiFi now using the fix mentioned in answer to this question: . But when I click on "Connect to Hidden WiFi Network" and choose to start the hot-spot setup, I see this notification and it doesn't start. How should I resolve this?
|
How do I horizontally flip the display, in order for everything to look mirrored?
|
For strange reasons best not asked, I have a projector plugged into my computer that is pointed at a mirror. So the computer image is displayed on a wall, but it is mirrored. In Linux(ubuntu) I can go to display preferences and set the external monitor to have a rotated image. Is there a clever way I could have it set to rotate/flip the image?
|
Here's the error I keep getting: ~$ sudo apt install --install-recommends winehq-staging Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: winehq-staging : Depends: wine-staging (= 4.5~cosmic) E: Unable to correct problems, you have held broken packages. I've downloaded and installed the libfaudio0 packages as suggested on the . It's a fresh Ubuntu machine, so no previous versions of Wine are installed. Tried running through the commands listed on the wiki page several times, tried both stable branch and staging, but i receive the same error with both.
|
After upgrading from 10.04 to 12.04 I am trying to install different packages. For instance ia32-libs and skype (4.0). When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message. Output of commands: sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. After running this: sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
|
In my abstract algebra class we discussed the idea that for a finite field $F$, that the characteristic of $F$ is a prime number. The proof would go more or less like : Suppose that $char(F) = nm$ for $n,m \in \Bbb Z$ and $n,m \geq 2$. Then $nm(1_F)=n(1_F)m(1_F)=0$ implying that either $n(1_f)=0$ or $m(1_f)=0$ since $F$ is an integral domain, but this contradicts the minimality of $char(F)$. This lead me to two questions: $1$)What effect does $char(F)$ have on the size of $F$ $2$)Are there finite fields of cardinality $k$ for any $k\in \Bbb Z, k \geq 2$
|
Let $F$ be a finite field. How do I prove that the order of $F$ is always of order $p^n$ where $p$ is prime?
|
I know that implementing/overriding equals() without also overriding hashCode() violates the equals/hashCode contract. But what if a class implements only hashCode() and not equals()?
|
What issues / pitfalls must be considered when overriding equals and hashCode?
|
So I know if you have a face selected in the 3D Viewport, its UV will pop up in the UV editor. What I want to know is, is there a way to highlight a face in the 3D viewport if you have its corresponding UV selected in the UV editor? Sometimes it's hard to tell where exactly the face of the UV is if it's small or if you have a lot of similarly shaped polygons/uv islands.
|
I have a model in blender, and when I unwrap it, I noticed that there is a lot of stretch in one section. How can I tell what section of the model this is from? As you can see, there is one Huge green area that shows a many more vertex's than I was expecting to see. Also, those boxes look huge. Is everything the same scale?
|
I'd like to warn somebody of one of their harmful managers, or even a so-called fake friend, so I say it like this: Don't trust him! He is nothing but a cunning person who is trying to harm you/put you down, with his special ability , so gradually, *smoothly,softly, wisely, and, secretly* via a pre-planned plot that you won't even notice or suspect his intentions. What idiom, phrase, term, ... could be used for describing this wise person/ fake friend/whatever you name it, -or his ability-*while focusing on using his wisdom for doing his hidden harmful actions smoothly! P.S 1: I have found "back-stabber"; "two-faced"; "a snake in the grass"; "a wolf in sheep's clothing"; but none of them cover all those attributes as a whole. -(there is an idiom in my country which says" Don't trust him! He cuts off the throats/ heads with cotton!) -( these people are potentially good politicians!, so you can use this idiom even for countries or politicians who achieve their goals by acting in this way!) Note: my question has been marked as "duplicate", but the answer I'm looking for, has nothing to do with answer which user87131 is looking for, he/she is focusing on a liar fake friend, and me, on some other attributes and actually maybe this person is not necessarily a friend, maybe he is someone whom I am obliged to deal with,!!. Please reopen my question, if possible! -(Sorry, Everybody! I had to edit my question!) P.S2: I just found these political terms: "Soft War", "soft power"! And both can totally convey the meaning I am looking for, so Can I use them In non-political cases, too? , Like: , "Don't trust him, he is good at soft war!/ he is good at applying soft power"?
|
What do you call someone who pretends to be your friend but is actually your enemy? A friend suggested spy for me, but that does not nearly describe the word I need for an English project. The character is very good at manipulating how people see him. He's a good liar. And pretends to be your friend but actually is your enemy.
|
Imagine a home network of several computers connected via router to an ISP. Computer A wants to request a webpage from a remote website, 10.234.12.8. The address is not in its ARP cache, so it consults its routing table and finds a match in the form of the default gateway (the router). It sends the packet to the router with the router's MAC. I know that when the router receives the outgoing request, it must do some enveloping and address re-writing, but I don't know the details. When the response comes back to the router from the 10.234.12.8, how does the router know that the inbound packet should be forwarded to Computer A? In other words, what does the router put in the request to 10.234.12.8 that 10.234.12.8 will include in its response so that the router can determine that the response should go to A? Is it A's MAC address? Or is it A's subnet IP? My guess is the later (A's subnet IP). Is A's LAN address enveloped in the inbound packet? My guess (hope) is that A's MAC address is never seen by anyone on the other side of the router. I know the router is receiving in-bound web responses all the time and doling them out to the correct local nodes. Is it doing this with enveloped MACs or enveloped LAN IP's, or with some other technique?
|
my question does not concern how it moves through the internet, but how it moves through the router to a certain device. All devices connected to a router in a home network have the same external IP. Say device A is loading a page and packets are sent from an external source to the router because the packets know the external IP of device A and they are able to get to the router. But now, how does it get to device A? How does the router know to send it to device A instead of device B? I think this involves the NAT, but i'm just looking for a logical explanation of what NAT does to accomplish this.
|
I know about blender for android but that's just blender player and no export/publish for android. Is there any way for build a single android apk from blender game? No Gamekit, is there another way ?
|
Can BGE games be built for mobile platforms? (Android/iOS)? If not, is support planned?
|
I'm a member of , and . However, I thusfar only contributed to Stack Overflow, where I have a reputation of 166 (based on a total of 30 aswered questions) at the time of my writing this. When I tried to submit an ad for my open source project as an answer to the question , I noticed it was protected by a background user to allow only users with a minimum of 10 reputation points to respond: protected by 30 mins ago This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site. While I understand and support the protection of questions by means of a reputation system, I don't think it makes much sense not to consider ones reputation on or other Stack Exchange communities as it restricts users who already have a good reputation in one Stack Exchange community posting in other communities, which -- at least IMO -- doesn't make much sense for a community dedicated to Meta Stack Overflow discussions. Why doesn't the "protected by" flag consider statistics from other Stack Exchange sites? EDIT 1: I just noticed the same restriction also applies to upvotes and other privileges. EDIT 2: I understand that someone's reputation points at would be considered irrelevant to , but I do not understand how one's reputation points at would be considered irrelevant for one's privileges at . IMO, reputation points at other communities should at least be considered when those communities deal with related subjects.
|
I registered on only to post an answer to . However, since it's a protected question, I am not allowed to answer it. (I found this info from ). Worth to mention, I can comment on the above question, just not post an answer. I was under the impression that the whole point of association bonus was to bypass such limits, so why isn't that the case for answering protected questions?
|
I am relatively new to qgis. I have GPS coordinates of two types of sites in csv format, (water point site and sanitation site). I wanted to find out if it is possible to create a 100 meter radius on all the water point sites to find out how many of the sanitation sites are outside the 100 meters.
|
I'm very new to the GIS world, so my problem could be very stupid, but I'm going to try anyway. Objective Given a list of coordinates in longitude/latitude, stored as a .csv file, I want to create a buffer with distance of x km around those coordinates. (In case this is relevant, these coordinates are locations of the societies in the . These societies scatter all around the world.) Problem I'm only able to create buffers with distance in radial degrees, but I want to do them in (kilo)meters. I'm aware of the following Q&A's, but following what's suggested therein doesn't seem to solve my problem: What I have tried... I start QGIS (v2.4), and Add delimited text layer choose my .csv file and the x/y fields, click OK select WGS 84 as my CRS (also tried NAD83 but didn't make a difference), click OK right-click on layer and select Save As..., in the dialog box, choose the following and click OK: add sccs_meter.shp as layer to the current project Select Vector > Geoprocessing Tools > Buffers > set buffer distance as 10 The result is a buffer with radius of approximately 1068km, which suggests that buffer distance is 10 degrees rather than 10 meters. What did I do wrong here?
|
This is a Trigger that will send an email when the same Account has 8 cases created in the last 5 days. I am receiving a SOQL error: System.UnexpectedException: field 'Client_Advisor_Email__c' can not be grouped in a query call However when I remove 'Client_Advisor_Email__c' from the search I receive a total opposite message: System.UnexpectedException: field 'Client_Advisor_Email__c' can not be grouped in a query call This is a field I will need further into the code as you will see. Any assistance is appreciated. trigger CaseHandlerCountAlert on Case (after insert) { List<AggregateResult> AggregateResultList = [SELECT AccountId, Account.Name name, COUNT(Id) co, Project__r.Implementation_status__c, Project__r.Client_Advisor_Email__c FROM Case WHERE CreatedDate = LAST_N_DAYS:5 AND Id IN :Trigger.New GROUP BY AccountId, Account.Name HAVING COUNT(Id) >= 8]; for(AggregateResult aggr:AggregateResultList){ Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage(); if(aggr != Null && Project__r.Implementation_status__c == 'LIVE - TRANSITION'){ //Set Outgoing Email to Implementation Coordinator message.toAddresses = new String[] { Project__r.Client_Advisor_Email__c }; } else if (aggr != Null && Project__r.Implementation_status__c == 'Live - Closed Project'){ //Private method getAddresses() retrieves email address from Customer_Success_Managers Public Group message.toAddresses = new String[] { getAddresses() }; } message.Subject = 'Subject Test Message'; message.PlainTextBody = 'Account name: ' + aggr.get('name') + ' has ' + (Integer)aggr.get('co') + ' cases opened in the last 8 days.'; Messaging.SingleEmailMessage[] messages = new List<Messaging.SingleEmailMessage> {message}; Messaging.SendEmailResult[] results = Messaging.sendEmail(messages); System.debug('Account Name: ' + aggr.get('name')); } private List<String> getAddresses(){ List<User> UserList = [SELECT id, name, email FROM User WHERE id IN (SELECT userorgroupid FROM groupmember WHERE group.name = 'Customer Success Managers')]; List<String> emailString = new List<String>(); for(User u: UserList){ emailstring.add(u.email); } return (emailString); } }
|
I need to get Account names and asset count for each account. From Asset table I can get AccountId and asset count. But I need to get Account names also. This is where I stuck. How to use Ids, from aggregate query and get Account names by Id.
|
I need to insert a line between two particular items in a list. The way I do it (below) creates too much vertical space around the line, and the line is not in the middle between bottom of previous item and top of next item. How can I fix it? \begin{itemize} \item text \item text\\ \rule[0cm]{8cm}{0.4pt} \item text \item text \end{itemize} I'd like the horizontal line to be evenly spaced between bottom of previous item and top of next item. The vertical distance between items separated by line can be increased a bit to accommodate the line.
|
This is a follow up to . I would like to control the length of the horizontal line to be the same widths as the widest \item in the list. Below, I am manually passing in the text on which to base the length. While that is an acceptable workaround, I thought I'd see if there was some easy way to eliminate the parameter to \sepitem. Code: \documentclass{article} \usepackage{enumitem} \usepackage{xcolor} \usepackage{calc} %% Adapted from %% https://tex.stackexchange.com/questions/341614/ %% insert-small-line-above-an-item-in-a-list-without-adding-extra-space \newcommand\sepitem[1]{\item\raisebox{1.90ex}[0pt]{\rlap{\color{orange}\rule{\widthof{#1}}{0.8pt}}}} \newcommand{\ShortText}{Short text.} \newcommand{\LongText}{Somewhat wider text.} \begin{document} \begin{enumerate}[noitemsep] \item \ShortText \item \ShortText \sepitem{\ShortText}A \end{enumerate} %% ------------------- \begin{enumerate}[noitemsep] \item \LongText \item \ShortText \sepitem{\LongText}A \end{enumerate} \end{document}
|
One trick to catch a thief is to intentionally leave something of value out in an effort to entice a thief to steal. For example, you might leave a sparkly set of cuff links out on your desk at work to see if anyone has stick fingers. Two-part question: Is there a word which identifies the item left out to entice the thief? "Bait" comes to mind, but I hope for a word more specific to this situation. Is there a word/phrase/idiom which identifies this technique? The action of leaving something out to entice a thief to steal.
|
I'm having trouble understanding the rationale behind the meaning of an American English phrase of which I just became aware. That phrase is: You catch more flies with honey than you do with vinegar From what I understand now, this phrase would indicate that You make more friends by being nice than by being rude. Please correct me if I'm wrong. My confusion comes from the fact that no one catches flies in order to do anything nice to them (Well, I suppose some people do. But it's not common!). When I first read it, I actually thought the phrase meant You'll have more success luring people into a trap by being nice than by being rude. This didn't make much sense in context, though, which led me to ask around about the phrase. Where does this phrase come from? More importantly, why does it have such a counter-intuitive meaning?
|
Find all prime number $p$ for which $p! + p$ in a perfect square. Of course $p=2$ and $p=3$ are solutions. I think there are not other solutions, but I can’t prove it!
|
Find all prime numbers $p$ such that $p!+p$ is a perfect square. I think the only ones are when $p!+p=p^2$, i.e. $p\in \{2,3\}$. Any ideas at all?
|
The following doesn't work, probably because packages is a list of strings. Is there any way to have such a loop in python? packages=['numpy','scipy'] for p in packages: import p
|
I'm writing a Python application that takes as a command as an argument, for example: $ python myapp.py command1 I want the application to be extensible, that is, to be able to add new modules that implement new commands without having to change the main application source. The tree looks something like: myapp/ __init__.py commands/ __init__.py command1.py command2.py foo.py bar.py So I want the application to find the available command modules at runtime and execute the appropriate one. Python defines an __import__ function, which takes a string for a module name: __import__(name, globals=None, locals=None, fromlist=(), level=0) The function imports the module name, potentially using the given globals and locals to determine how to interpret the name in a package context. The fromlist gives the names of objects or submodules that should be imported from the module given by name. Source: So currently I have something like: command = sys.argv[1] try: command_module = __import__("myapp.commands.%s" % command, fromlist=["myapp.commands"]) except ImportError: # Display error message command_module.run() This works just fine, I'm just wondering if there is possibly a more idiomatic way to accomplish what we are doing with this code. Note that I specifically don't want to get in to using eggs or extension points. This is not an open-source project and I don't expect there to be "plugins". The point is to simplify the main application code and remove the need to modify it each time a new command module is added.
|
Suppose we use a 9V battery. Then the voltage between these two terminals is 9V. In other words, it would take 9 J of energy to move +1C of charge from the (+) to the (-) terminal by the electric field established by the battery. So exactly how can electrical components "reduce" this voltage? How can we say that the potential difference between a resistor connected to a battery is 9V? This would obviously imply that the voltage would have to "move" in the circuit, such that right before the resistor, the potential is 9 V. Then after the current passes the resistor, the potential at this point immediately after the resistor, it is somehow 0 V. But this is wrong by definition, because it is +9V at the + terminal of the battery, and 0V at the - terminal of the battery. I am confused?
|
I'm having trouble conceptualizing why the voltage drop between two points of an ideal wire (i.e. no resistance) is $0~V$. Using Ohm's Law, the equation is such: $$ V = IR \\ V = I(0~\Omega) \\ V = 0$$ However, conceptually I can't see how there is no change in energy between these two points. It is my understanding that the electrical field of this circuit produces a force running counterclockwise and parallel to the wire which acts continuously on the electrons as they move through the wire. As such, I expect there to be a change in energy equal to the work. Voltage drop is the difference in electric potential energy per coulomb, so it should be greater than $0~V$: $$ \Delta V = \frac{\Delta J}C \\ \Delta J > 0 \\ \therefore \Delta V > 0 $$ For example, suppose I have a simple circuit consisting of a $9~V$ battery in series with a $3~k\Omega$ resistor: If the length from point 4 to point 3 is $5~m$, I would expect the following: $$ W = F \cdot d \\ W = \Delta E \\ F > 0 \\ d = 5 > 0 \\ \therefore W > 0 \\ \therefore \Delta E > 0$$ Since work is positive for any given charge, the change in energy for any given charge is positive -- therefore the voltage drop must be positive. Yet, according to Ohm's Law it is $0~V$ since the wire has negligible resistance. Where is the fault in my logic?
|
I have 16Gb and have installed 64-bit background processing, but ArcMap seems to only be able to access 4Gb. I can use more in total with other programs. Is there a setting somewhere in Windows or ArcGIS that is only allowing it to access 4GB? Thanks.
|
I am exporting 36"x48" label intensive maps as PDF. For urban areas, ArcMap 10 hangs or kicks back an error saying it could not complete the operation. I have a quad processor with 4 GB ram. I also increased cache size to 100GB and have a large pagefile size, etc. Will increasing physical RAM to 6GB help, or is this a software limit to how much labeling it can handle?
|
Let's say I have a huge project with a rendering time of 1000 hours or more. I don't want my PC to work non-stop for that long. I want to say something like, 'Please stop rendering now and continue where you have left off later when I tell you to.'
|
I would like to pause a render that I have started, with the intention of resuming it at a later time (but during the same Blender session). How can I do this?
|
I recently noticed that when i open a program (that opens a window), the window has a border on top, naming the app. For example, on Firefox it says: "ask Ubuntu - Mozilla Firefox" that has the regular 3 buttons(minimize, maximize and close) and a forth one that just minimizes the window while also letting the "ask Ubuntu - Mozilla Firefox", with those 4 buttons on. This annoys me tbh. Does anyone know any way of getting rid of it and why it has appeared?
|
How do I remove the top bar of applications (title-bar), The one bar that usually displays minimize, maximize and close? See attached screenshot:
|
From: Suppose $f$ is a real function on $(0, 1]$ and $f \in \mathscr{R}$ on $[c,1]$ for every $c>0$. Define $\int_0^1 f(x)dx=\lim_{c\to 0} \int_c^1 f(x)dx$ if this limit exists (and is finite). If $f \in \mathscr{R}$ on $[0,1]$, show that this definition of the integral agrees with the old one. Can I use the fundamental theorem of calculus to prove this problem? $$|\int_c^1 f(x)dx-\int_0^1 f(x)dx|=|\int_0^c f(x)dx|$$, and define $$F(c)=\int_0^c f(x)dx$$ is continuous so $$\lim_{c\to 0}|\int_0^c f(x)dx|=|\lim_{c\to 0}F(c)|=0$$
|
Here is Prob. 7, Chap. 6, in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition: Suppose $f$ is a real function on $(0, 1]$ and $f \in \mathscr{R}$ on $[c, 1]$ for every $c > 0$. Define $$ \int_0^1 f(x) \ \mathrm{d} x = \lim_{c \to 0} \int_c^1 f(x) \ \mathrm{d} x $$ if this limit exists (and is finite). (a) If $f \in \mathscr{R}$ on $[0, 1]$, show that this definition of the integral agrees with the old one. (b) Construct a function $f$ such that the above limit exists, although it fails to exist with $\lvert f \rvert$ in place of $f$. Here I'll only attempt Part (a): My Attempt: Here is the link to a post of mine here on Math SE where I've copied the definition of the Riemann and Riemann-Stieltjes integral that Rudin uses (i.e. Definitions 6.1 and 6.2 in Baby Rudin, 3rd edition): As $f \in \mathscr{R}$ on $[0, 1]$, so $\int_0^1 f(x) \ \mathrm{d} x$ exists in $\mathbb{R}$. According to the statement of the problem, we only need to show that $$ \lim_{c \to 0+} \int_c^1 f(x) \ \mathrm{d} x = \int_0^1 f(x) \ \mathrm{d} x. \tag{0}$$ Let $\varepsilon > 0$ be given. We need to find a real number $\delta> 0$ such that $$ \left\lvert \int_c^1 f(x) \ \mathrm{d} x \ - \ \int_0^1 f(x) \ \mathrm{d} x \right\rvert < \varepsilon \tag{1} $$ for any real number $c$ such that $0 < c < \delta$. Now let's choose a real number $\delta_0 \in (0, 1)$, and let us choose $c$ such that $0 < c < \delta_0$. Then as $f \in \mathscr{R}$ on $[0, 1]$ and as $c \in (0, 1)$, so by Theorem 6.12 (c) in Baby Rudin $f \in \mathscr{R}$ on $[0, c]$ and on $[c, 1]$, and $$ \int_0^c f(x) \ \mathrm{d} x \ + \ \int_c^1 f(x) \ \mathrm{d} x = \int_0^1 f(x) \ \mathrm{d} x. \tag{2} $$ Here is the link to my Math SE post on Theorem 6.12 (c) in Baby Rudin, 3rd edition: In the light of (1) and (2), we can conclude that we now only need to show that there exists a real number $\delta > 0$ such that $$ \left\lvert \int_0^c f(x) \ \mathrm{d} x \right\rvert < \varepsilon \tag{3} $$ for any real number $c$ such that $0 < c < \delta$, and we now also know that $ 0 < c < \delta_0 < 1$. As $f \in \mathscr{R}$ on $[0, 1]$, so $f$ is also bounded on $[0, 1]$ and hence also on $[0, c]$. Let $M \colon= \sup \{ \ f(x) \ \colon \ 0 \leq x \leq c \ \}$. Then by Theorem 6.12 (d) in Baby Rudin, we have $$ \left\lvert \int_0^c f(x) \ \mathrm{d} x \right\rvert \leq M c. \tag{4} $$ Here is the link to my Math SE post on Theorem 6.12 (d) in Baby Rudin, 3rd edition: So if we choose our $\delta$ such that $$0 < \delta < \min \left\{ \ \delta_0, \frac{\varepsilon}{M+1} \ \right\}, $$ then, for any real number $c$ such that $0 < c < \delta$, we have $0 < c < \delta_0$ so that $c \in (0, 1)$ and from (4) we also have $$ \left\lvert \int_0^c f(x) \ \mathrm{d} x \right\rvert \leq M c \leq \frac{M \varepsilon}{M+1} < \varepsilon, $$ which by virtue of (3) implies that (1) holds. Since $\varepsilon > 0$ was arbitrary, therefore (0) holds as well, as required. Is this proof correct and rigorous enough for Rudin? If not, then where is it lacking? Is this proof the same as the proof asked for by Rudin?
|
I have drawn the boxes A to F and the arrows. What I do not know is how to draw the two outer blocks - block1 covering blocks A to D and block2 covering E and F. I would really appreciate some help.
|
I understand that there are some questions here regarding the block diagrams. However, I am strongly interested in one particular style shown as below: This is a picture from a paper. As can be seen, the text can be selected there. So it is not an attached picture. I suppose it is done by LaTeX. Could anyone point me to the right direction to achieve this? (I specially LOVE the colored "thin grid"! It is much more beautiful than the fully filled color!)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.