qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
65,168,365
MATLAB states on [their website](https://www.mathworks.com/help/matlab/math/creating-and-editing-delaunay-triangulations.html): > > It is more efficient to edit a delaunayTriangulation to make minor modifications as opposed to recreating a new delaunayTriangulation from scratch > > > Are there any algorithms for ...
2020/12/06
[ "https://Stackoverflow.com/questions/65168365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11844141/" ]
There's a whole family of algorithms for constructing a Delaunay triangulation by inserting points one at a time. And there's a pretty good algorithm for removing points described by Devillers, O. (2002). "On deletion in Delaunay triangulations", International Journal of Computational Geometry \* Applications 12.3. You...
Yes. You can. For example, you can find an algorithm in [this article](https://ieeexplore.ieee.org/document/1056738) (Dynamic Voronoi Diagrams) to update a given Delaunay triangulation (DT) in `O(n)` for each deletion or insertion. As the time complexity of constructing a DT is in `O(n log(n))`, absolutely updating the...
2,040,266
What are the differences between [SQLite](http://www.sqlite.org/) and [DISQLite](http://www.yunqa.de/delphi/doku.php/products/sqlite3/index) and why would I want to pick one over the other? My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple ta...
2010/01/11
[ "https://Stackoverflow.com/questions/2040266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30176/" ]
AFAIR, DISQLite uses the obj files of Sqlite, and compile them with Delphi and produce more features than the original one, and using the same sqlite DB format, hence you can read the DISQLite database file by it by other languages that has support for Sqlite drivers. Also one more feature with DISQLite you don't have...
I can suggest you writing your own implementation. If you don't need complex SQL queries, the simplest (and probably the fastest) implementation is file-based storage.
2,040,266
What are the differences between [SQLite](http://www.sqlite.org/) and [DISQLite](http://www.yunqa.de/delphi/doku.php/products/sqlite3/index) and why would I want to pick one over the other? My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple ta...
2010/01/11
[ "https://Stackoverflow.com/questions/2040266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30176/" ]
I can suggest you writing your own implementation. If you don't need complex SQL queries, the simplest (and probably the fastest) implementation is file-based storage.
DISQLLite has two versions with the free one limited to personal and non-commerical usage. So this could be one of the deciding factor as SQLite is free opensource implementation without free/paid versions. Both of the database would be able to handle data ranging in GBs. SQLite is available in pre-compiled binary i....
2,040,266
What are the differences between [SQLite](http://www.sqlite.org/) and [DISQLite](http://www.yunqa.de/delphi/doku.php/products/sqlite3/index) and why would I want to pick one over the other? My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple ta...
2010/01/11
[ "https://Stackoverflow.com/questions/2040266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30176/" ]
I can suggest you writing your own implementation. If you don't need complex SQL queries, the simplest (and probably the fastest) implementation is file-based storage.
Note that the DISQLLite personal version has some limitations and I don't think that the price for the professional version (Euro 149.99 without source) is worth it when anyone can just implement a SQLite wrapper for free. I was using DISQLite personal for a freeware product and had to implement a database change in ...
2,040,266
What are the differences between [SQLite](http://www.sqlite.org/) and [DISQLite](http://www.yunqa.de/delphi/doku.php/products/sqlite3/index) and why would I want to pick one over the other? My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple ta...
2010/01/11
[ "https://Stackoverflow.com/questions/2040266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30176/" ]
I can suggest you writing your own implementation. If you don't need complex SQL queries, the simplest (and probably the fastest) implementation is file-based storage.
Take a look at our [SynBigTable unit](http://blog.synopse.info/category/Open-Source-Projects/Synopse-BigTable). It's will be [much faster than SQLite](http://synopse.info/forum/viewtopic.php?pid=1011#p1011), and seems to fit exactly your purpose. And if you need a native SQLite implementation, take a look at our [SQLi...
2,040,266
What are the differences between [SQLite](http://www.sqlite.org/) and [DISQLite](http://www.yunqa.de/delphi/doku.php/products/sqlite3/index) and why would I want to pick one over the other? My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple ta...
2010/01/11
[ "https://Stackoverflow.com/questions/2040266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30176/" ]
AFAIR, DISQLite uses the obj files of Sqlite, and compile them with Delphi and produce more features than the original one, and using the same sqlite DB format, hence you can read the DISQLite database file by it by other languages that has support for Sqlite drivers. Also one more feature with DISQLite you don't have...
DISQLLite has two versions with the free one limited to personal and non-commerical usage. So this could be one of the deciding factor as SQLite is free opensource implementation without free/paid versions. Both of the database would be able to handle data ranging in GBs. SQLite is available in pre-compiled binary i....
2,040,266
What are the differences between [SQLite](http://www.sqlite.org/) and [DISQLite](http://www.yunqa.de/delphi/doku.php/products/sqlite3/index) and why would I want to pick one over the other? My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple ta...
2010/01/11
[ "https://Stackoverflow.com/questions/2040266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30176/" ]
AFAIR, DISQLite uses the obj files of Sqlite, and compile them with Delphi and produce more features than the original one, and using the same sqlite DB format, hence you can read the DISQLite database file by it by other languages that has support for Sqlite drivers. Also one more feature with DISQLite you don't have...
Note that the DISQLLite personal version has some limitations and I don't think that the price for the professional version (Euro 149.99 without source) is worth it when anyone can just implement a SQLite wrapper for free. I was using DISQLite personal for a freeware product and had to implement a database change in ...
2,040,266
What are the differences between [SQLite](http://www.sqlite.org/) and [DISQLite](http://www.yunqa.de/delphi/doku.php/products/sqlite3/index) and why would I want to pick one over the other? My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple ta...
2010/01/11
[ "https://Stackoverflow.com/questions/2040266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30176/" ]
AFAIR, DISQLite uses the obj files of Sqlite, and compile them with Delphi and produce more features than the original one, and using the same sqlite DB format, hence you can read the DISQLite database file by it by other languages that has support for Sqlite drivers. Also one more feature with DISQLite you don't have...
Take a look at our [SynBigTable unit](http://blog.synopse.info/category/Open-Source-Projects/Synopse-BigTable). It's will be [much faster than SQLite](http://synopse.info/forum/viewtopic.php?pid=1011#p1011), and seems to fit exactly your purpose. And if you need a native SQLite implementation, take a look at our [SQLi...
38,902
Quite a while ago, I heard about a statement in measure theory, that goes as follows: > > Let $A \subset \mathbb R^n$ be a Lebesgue-measurable set of positive measure. Then we follow that $A-A = \{ x-y \mid x,y\in A\}$ is a neighborhood of zero, i.e. contains an open ball around zero. > > > I now got reminded of ...
2011/05/13
[ "https://math.stackexchange.com/questions/38902", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10856/" ]
Assume $A$ is the set contained in [0,1] with positive measure, say $m(A) > 0$ with $m$ the Lebesgue measure on $[0,1]$. Let Q be the set of all rational numbers in $[0,1]$ Since $\mathbb{Q}$ is countable, it can be presented as $$\mathbb{Q}=\{p\_1, p\_2, ..., p\_n, ...\}$$ Let $$A\_n = A+ p\_n = \{x+p\_n\mid x\in ...
If you need to find information on the subject, the first proof of the fact that the set of differences contains a neighbourhood of the origin is (for Lebesgue measure on the line) due to Steinhaus. There is a substantial collection of generalizations of the result.
38,902
Quite a while ago, I heard about a statement in measure theory, that goes as follows: > > Let $A \subset \mathbb R^n$ be a Lebesgue-measurable set of positive measure. Then we follow that $A-A = \{ x-y \mid x,y\in A\}$ is a neighborhood of zero, i.e. contains an open ball around zero. > > > I now got reminded of ...
2011/05/13
[ "https://math.stackexchange.com/questions/38902", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10856/" ]
Assume $A$ is the set contained in [0,1] with positive measure, say $m(A) > 0$ with $m$ the Lebesgue measure on $[0,1]$. Let Q be the set of all rational numbers in $[0,1]$ Since $\mathbb{Q}$ is countable, it can be presented as $$\mathbb{Q}=\{p\_1, p\_2, ..., p\_n, ...\}$$ Let $$A\_n = A+ p\_n = \{x+p\_n\mid x\in ...
We need to use the following lemma: $$Lemma \quad m(E)>0,\forall \ 0 \lt \alpha \lt 1,\exists \left(a,b\right)\subseteq \left[0,1\right] s.t. m\left(E\cap (a,b)\right)\ge \alpha \left(b-a \right)$$ For some $\alpha \in (\frac{3}{4},1), \exists I=(a,b)\ s.t.\ m((a,b)\cap E)\ge\alpha (b-a)$ Next, we prove that $O(0,\fra...
38,902
Quite a while ago, I heard about a statement in measure theory, that goes as follows: > > Let $A \subset \mathbb R^n$ be a Lebesgue-measurable set of positive measure. Then we follow that $A-A = \{ x-y \mid x,y\in A\}$ is a neighborhood of zero, i.e. contains an open ball around zero. > > > I now got reminded of ...
2011/05/13
[ "https://math.stackexchange.com/questions/38902", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10856/" ]
Here's an attempt at a hint for the first result you ask about: Assume without loss of generality that $A$ has finite measure. Let $f$ be the characteristic function of $A$ and let $\tilde{f}$ be the one of $-A$. The [convolution](http://en.wikipedia.org/wiki/Convolution) $g = f \ast \tilde{f}$ is continuous and $0$ is...
If you need to find information on the subject, the first proof of the fact that the set of differences contains a neighbourhood of the origin is (for Lebesgue measure on the line) due to Steinhaus. There is a substantial collection of generalizations of the result.
38,902
Quite a while ago, I heard about a statement in measure theory, that goes as follows: > > Let $A \subset \mathbb R^n$ be a Lebesgue-measurable set of positive measure. Then we follow that $A-A = \{ x-y \mid x,y\in A\}$ is a neighborhood of zero, i.e. contains an open ball around zero. > > > I now got reminded of ...
2011/05/13
[ "https://math.stackexchange.com/questions/38902", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10856/" ]
If you need to find information on the subject, the first proof of the fact that the set of differences contains a neighbourhood of the origin is (for Lebesgue measure on the line) due to Steinhaus. There is a substantial collection of generalizations of the result.
We need to use the following lemma: $$Lemma \quad m(E)>0,\forall \ 0 \lt \alpha \lt 1,\exists \left(a,b\right)\subseteq \left[0,1\right] s.t. m\left(E\cap (a,b)\right)\ge \alpha \left(b-a \right)$$ For some $\alpha \in (\frac{3}{4},1), \exists I=(a,b)\ s.t.\ m((a,b)\cap E)\ge\alpha (b-a)$ Next, we prove that $O(0,\fra...
38,902
Quite a while ago, I heard about a statement in measure theory, that goes as follows: > > Let $A \subset \mathbb R^n$ be a Lebesgue-measurable set of positive measure. Then we follow that $A-A = \{ x-y \mid x,y\in A\}$ is a neighborhood of zero, i.e. contains an open ball around zero. > > > I now got reminded of ...
2011/05/13
[ "https://math.stackexchange.com/questions/38902", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10856/" ]
Here's an attempt at a hint for the first result you ask about: Assume without loss of generality that $A$ has finite measure. Let $f$ be the characteristic function of $A$ and let $\tilde{f}$ be the one of $-A$. The [convolution](http://en.wikipedia.org/wiki/Convolution) $g = f \ast \tilde{f}$ is continuous and $0$ is...
We need to use the following lemma: $$Lemma \quad m(E)>0,\forall \ 0 \lt \alpha \lt 1,\exists \left(a,b\right)\subseteq \left[0,1\right] s.t. m\left(E\cap (a,b)\right)\ge \alpha \left(b-a \right)$$ For some $\alpha \in (\frac{3}{4},1), \exists I=(a,b)\ s.t.\ m((a,b)\cap E)\ge\alpha (b-a)$ Next, we prove that $O(0,\fra...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Sandboxing Lua -------------- Setting hooks is not sufficient *at all* to prevent unintended waste of resources, let alone abuse- here's a simple example (the time is spent during string pattern matching- no debug hooks get called): `s=('a'):rep(20000):match('.-b')` **The only reliable way to force time/memory const...
I suggest handling it just like any other Lua error. In other words, threat the code above as if the user had just written ``` error("Script execution has been cancelled after stalling for too long") ``` (I'm assuming that you detect infinite loops by assuming that no script should take more than a fixed amount of t...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Put the Lua loop inside a coroutine and at the end of every loop, just use `Yield return null` to wait for a frame (Allowing the worker thread to be executed).
I suggest handling it just like any other Lua error. In other words, threat the code above as if the user had just written ``` error("Script execution has been cancelled after stalling for too long") ``` (I'm assuming that you detect infinite loops by assuming that no script should take more than a fixed amount of t...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Sandboxing Lua -------------- Setting hooks is not sufficient *at all* to prevent unintended waste of resources, let alone abuse- here's a simple example (the time is spent during string pattern matching- no debug hooks get called): `s=('a'):rep(20000):match('.-b')` **The only reliable way to force time/memory const...
I have used two techniques to address this issue. The first is to call the DoFile or DoString method inside a separate Task. That way you can abort the thread. I do not know of any technique (say from within a hook) to exit the interpreter. Another way would be to setup a separate [Appdomain](http://msdn.microsoft.co...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Sandboxing Lua -------------- Setting hooks is not sufficient *at all* to prevent unintended waste of resources, let alone abuse- here's a simple example (the time is spent during string pattern matching- no debug hooks get called): `s=('a'):rep(20000):match('.-b')` **The only reliable way to force time/memory const...
What about setting line hook *before* running lua code? I don't know is it possible in C#, but it is possible in original C lua. Is yor loop detector already run in different C# task? * If yes, use C# variable with C# hook. In this case your loop detector set and hool check C# variable like `terminateLua` and throw l...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Sandboxing Lua -------------- Setting hooks is not sufficient *at all* to prevent unintended waste of resources, let alone abuse- here's a simple example (the time is spent during string pattern matching- no debug hooks get called): `s=('a'):rep(20000):match('.-b')` **The only reliable way to force time/memory const...
Put the Lua loop inside a coroutine and at the end of every loop, just use `Yield return null` to wait for a frame (Allowing the worker thread to be executed).
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Sandboxing Lua -------------- Setting hooks is not sufficient *at all* to prevent unintended waste of resources, let alone abuse- here's a simple example (the time is spent during string pattern matching- no debug hooks get called): `s=('a'):rep(20000):match('.-b')` **The only reliable way to force time/memory const...
You can do it like this, if you want to detect if a loop is still running. ```lua local detect = false detect == true goal = 5 star = 0 function loop() while detect == true do print("Still running") else print("Loop stopped running") end end Spawn(loop) while true do if star > goal then ...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Put the Lua loop inside a coroutine and at the end of every loop, just use `Yield return null` to wait for a frame (Allowing the worker thread to be executed).
I have used two techniques to address this issue. The first is to call the DoFile or DoString method inside a separate Task. That way you can abort the thread. I do not know of any technique (say from within a hook) to exit the interpreter. Another way would be to setup a separate [Appdomain](http://msdn.microsoft.co...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Put the Lua loop inside a coroutine and at the end of every loop, just use `Yield return null` to wait for a frame (Allowing the worker thread to be executed).
What about setting line hook *before* running lua code? I don't know is it possible in C#, but it is possible in original C lua. Is yor loop detector already run in different C# task? * If yes, use C# variable with C# hook. In this case your loop detector set and hool check C# variable like `terminateLua` and throw l...
10,352,092
I use lua interfaces to get lua support in my C# program, the worker thread will freeze if the user submits code like this ``` while true do end ``` I have a way to detect if a infinite loop is running, but I need a nice way of exiting the DoString method from the Worker thread. Any ideas? edit: @kikito, Yes Im det...
2012/04/27
[ "https://Stackoverflow.com/questions/10352092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/548048/" ]
Put the Lua loop inside a coroutine and at the end of every loop, just use `Yield return null` to wait for a frame (Allowing the worker thread to be executed).
You can do it like this, if you want to detect if a loop is still running. ```lua local detect = false detect == true goal = 5 star = 0 function loop() while detect == true do print("Still running") else print("Loop stopped running") end end Spawn(loop) while true do if star > goal then ...
3,834,940
We proved by definition that the sequence $a\_n := \frac{2n^3 +n^2 +3}{n^3-4}$ converges. Let $\epsilon > 0$. Choose $N := \lceil \frac{24}{\epsilon} \rceil + 2 $. Then for all $n \geq N$ it holds, that $$|a\_n - 2| = \big |\frac{2n^3+n^2+3}{n^3-4} - \frac{2n^3-8}{n^3-4} \big | = \big | \frac{n^2+11}{n^3-4} \big | =...
2020/09/21
[ "https://math.stackexchange.com/questions/3834940", "https://math.stackexchange.com", "https://math.stackexchange.com/users/642739/" ]
Since $A\subset B$, we obtain: $$P(A\cap B)=P(A).$$ Id est, $$P(A^c\cap B)=\frac{1}{2}.$$
**Hint:** $A\subset B$ so $A\cap B=A.$
3,834,940
We proved by definition that the sequence $a\_n := \frac{2n^3 +n^2 +3}{n^3-4}$ converges. Let $\epsilon > 0$. Choose $N := \lceil \frac{24}{\epsilon} \rceil + 2 $. Then for all $n \geq N$ it holds, that $$|a\_n - 2| = \big |\frac{2n^3+n^2+3}{n^3-4} - \frac{2n^3-8}{n^3-4} \big | = \big | \frac{n^2+11}{n^3-4} \big | =...
2020/09/21
[ "https://math.stackexchange.com/questions/3834940", "https://math.stackexchange.com", "https://math.stackexchange.com/users/642739/" ]
Since $A\subset B$, we obtain: $$P(A\cap B)=P(A).$$ Id est, $$P(A^c\cap B)=\frac{1}{2}.$$
If $A \subset B$ then $P(A \cap B)=P(A)$ Thus $$P(\overline{A}\cap B)=P(B)-P(A)=\frac{3}{4}-\frac{1}{4}=\frac{1}{2}$$
3,834,940
We proved by definition that the sequence $a\_n := \frac{2n^3 +n^2 +3}{n^3-4}$ converges. Let $\epsilon > 0$. Choose $N := \lceil \frac{24}{\epsilon} \rceil + 2 $. Then for all $n \geq N$ it holds, that $$|a\_n - 2| = \big |\frac{2n^3+n^2+3}{n^3-4} - \frac{2n^3-8}{n^3-4} \big | = \big | \frac{n^2+11}{n^3-4} \big | =...
2020/09/21
[ "https://math.stackexchange.com/questions/3834940", "https://math.stackexchange.com", "https://math.stackexchange.com/users/642739/" ]
If $A \subset B$ then $P(A \cap B)=P(A)$ Thus $$P(\overline{A}\cap B)=P(B)-P(A)=\frac{3}{4}-\frac{1}{4}=\frac{1}{2}$$
**Hint:** $A\subset B$ so $A\cap B=A.$
1,330,108
On this Windows 10 machine, from time to time the clipboard goes really wonky. Not only can I not paste anything, but just trying to copy can cause apps like Edge to blow up. Restarting the machine solves the problem, but feels like overkill to me. I'm one of those people who has a lot of things open that I will "get t...
2018/06/10
[ "https://superuser.com/questions/1330108", "https://superuser.com", "https://superuser.com/users/41443/" ]
The clipboard becoming inaccessible is usually because some app is holding exclusive access to it. You may test it by, first, logging in and out, then by selectively killing tasks. If the clipboard becomes accessible again, then you have verified that this is indeed the cause. Microsoft products such as Word do not n...
If you are just trying to clear the clipboard you can use either of the below Command Prompt : `echo off | clip` PowerShell : `Set-Clipboard` Above two commands will clear the clipboard contents but can't promise this will really solve the problem.
29,111,225
I have a `JComboBox` that takes up too much room my GUI because of the long `String`s it contains. I only need to see their full length while making a selection. So, I'd like the `JComboBox` to be full size only then and shorter otherwise. The following code seems to work. But, since I'm very much a Java newbie, I'm j...
2015/03/17
[ "https://Stackoverflow.com/questions/29111225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4513908/" ]
> > The following code seems to work > > > Not really because you change the size of the combo box which would cause the combo box to overwrite any component display on the right of it. Also, the combo box arrow is drawn in the middle of the combo box. Check out [Combo Box Popup](https://tips4java.wordpress.com/2...
![enter image description here](https://i.stack.imgur.com/29l21.png) Small hack to get pop up menu size bigger enough to show items even though the combo box size could be smaller Source: <http://www.jroller.com/santhosh/entry/make_jcombobox_popup_wide_enough> ``` import java.awt.Dimension; import java.util....
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
Ketchup, OED, 1711 ------------------ The OED says: > > Etymology: apparently < Chinese (Amoy dialect) *kôechiap* or *kê-tsiap* brine of pickled fish or shell-fish (Douglas *Chinese Dict*. 46/1, 242/1). Malay *kēchap* (in Dutch spelling *ketjap*), which has been claimed as the original source (Scott *Malayan Wds. in...
### Etymology: First, the Amoy pronunciation of *鮭汁* is *kê-chiap*, meaning *salmonidae juice*. Then, the pronunciation travels to Malaysia, and use the spelling *kechap*, and changes the meaning into *tomato sauce*. Next, the pronunciation travels to the Netherlands, and spells as *ketchup*. Finally, English use t...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
Supposed to be a maritime-related deal, with traders from the British East India company returning to the West from Malaysia bringing a recipe for something called kicap (pronounced: "kee-chap," with variable spellings and ingredients). Circa 17th cent. Of note is that the original was probably the same thing now avail...
Ketchup 果子汁is a Taiwanese word that means fruit juice. The name was brought back to Europe by the Dutch in the early 17th Century when Taiwan was a Dutch colony. Along with ketchup, tea was brought back to Europe, the word "tea" came from Taiwanese. * Taiwanese *te* * Dutch *thee* * German *tee* * French *the* * Spa...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
To supplement @The Raven's solid answer, I offer these: * [Etymonline](http://www.etymonline.com/index.php?term=ketchup): > > **ketchup** > 1711, from Malay *kichap*, from Chinese (Amoy dialect) *koechiap* "brine of fish." *Catsup* (earlier *catchup*) is a failed attempt at Anglicization, still in use in U.S. Ori...
This is undocumented, but I heard that the term 'ketchup' originated with spice traders who travelled in Southeast Asia/ Hong Kong/ Canton province. In Cantonese, the term 'chup' means literally 'sauce'. In the provincial areas of Canton, tomatoes are called "Fan Ke". In a slang phrase, Ke-Chup or Ket-Chup means tomato...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
Ketchup, OED, 1711 ------------------ The OED says: > > Etymology: apparently < Chinese (Amoy dialect) *kôechiap* or *kê-tsiap* brine of pickled fish or shell-fish (Douglas *Chinese Dict*. 46/1, 242/1). Malay *kēchap* (in Dutch spelling *ketjap*), which has been claimed as the original source (Scott *Malayan Wds. in...
This is undocumented, but I heard that the term 'ketchup' originated with spice traders who travelled in Southeast Asia/ Hong Kong/ Canton province. In Cantonese, the term 'chup' means literally 'sauce'. In the provincial areas of Canton, tomatoes are called "Fan Ke". In a slang phrase, Ke-Chup or Ket-Chup means tomato...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
This is undocumented, but I heard that the term 'ketchup' originated with spice traders who travelled in Southeast Asia/ Hong Kong/ Canton province. In Cantonese, the term 'chup' means literally 'sauce'. In the provincial areas of Canton, tomatoes are called "Fan Ke". In a slang phrase, Ke-Chup or Ket-Chup means tomato...
Ketchup 果子汁is a Taiwanese word that means fruit juice. The name was brought back to Europe by the Dutch in the early 17th Century when Taiwan was a Dutch colony. Along with ketchup, tea was brought back to Europe, the word "tea" came from Taiwanese. * Taiwanese *te* * Dutch *thee* * German *tee* * French *the* * Spa...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
Supposed to be a maritime-related deal, with traders from the British East India company returning to the West from Malaysia bringing a recipe for something called kicap (pronounced: "kee-chap," with variable spellings and ingredients). Circa 17th cent. Of note is that the original was probably the same thing now avail...
To supplement @The Raven's solid answer, I offer these: * [Etymonline](http://www.etymonline.com/index.php?term=ketchup): > > **ketchup** > 1711, from Malay *kichap*, from Chinese (Amoy dialect) *koechiap* "brine of fish." *Catsup* (earlier *catchup*) is a failed attempt at Anglicization, still in use in U.S. Ori...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
Supposed to be a maritime-related deal, with traders from the British East India company returning to the West from Malaysia bringing a recipe for something called kicap (pronounced: "kee-chap," with variable spellings and ingredients). Circa 17th cent. Of note is that the original was probably the same thing now avail...
This is undocumented, but I heard that the term 'ketchup' originated with spice traders who travelled in Southeast Asia/ Hong Kong/ Canton province. In Cantonese, the term 'chup' means literally 'sauce'. In the provincial areas of Canton, tomatoes are called "Fan Ke". In a slang phrase, Ke-Chup or Ket-Chup means tomato...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
Supposed to be a maritime-related deal, with traders from the British East India company returning to the West from Malaysia bringing a recipe for something called kicap (pronounced: "kee-chap," with variable spellings and ingredients). Circa 17th cent. Of note is that the original was probably the same thing now avail...
Ketchup, OED, 1711 ------------------ The OED says: > > Etymology: apparently < Chinese (Amoy dialect) *kôechiap* or *kê-tsiap* brine of pickled fish or shell-fish (Douglas *Chinese Dict*. 46/1, 242/1). Malay *kēchap* (in Dutch spelling *ketjap*), which has been claimed as the original source (Scott *Malayan Wds. in...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
To supplement @The Raven's solid answer, I offer these: * [Etymonline](http://www.etymonline.com/index.php?term=ketchup): > > **ketchup** > 1711, from Malay *kichap*, from Chinese (Amoy dialect) *koechiap* "brine of fish." *Catsup* (earlier *catchup*) is a failed attempt at Anglicization, still in use in U.S. Ori...
Ketchup, OED, 1711 ------------------ The OED says: > > Etymology: apparently < Chinese (Amoy dialect) *kôechiap* or *kê-tsiap* brine of pickled fish or shell-fish (Douglas *Chinese Dict*. 46/1, 242/1). Malay *kēchap* (in Dutch spelling *ketjap*), which has been claimed as the original source (Scott *Malayan Wds. in...
24,530
What is the etymology of the word *ketchup*? I've tried searching on Google without a definitive answer.
2011/05/09
[ "https://english.stackexchange.com/questions/24530", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8355/" ]
To supplement @The Raven's solid answer, I offer these: * [Etymonline](http://www.etymonline.com/index.php?term=ketchup): > > **ketchup** > 1711, from Malay *kichap*, from Chinese (Amoy dialect) *koechiap* "brine of fish." *Catsup* (earlier *catchup*) is a failed attempt at Anglicization, still in use in U.S. Ori...
Ketchup 果子汁is a Taiwanese word that means fruit juice. The name was brought back to Europe by the Dutch in the early 17th Century when Taiwan was a Dutch colony. Along with ketchup, tea was brought back to Europe, the word "tea" came from Taiwanese. * Taiwanese *te* * Dutch *thee* * German *tee* * French *the* * Spa...
37,208,691
I'm looking at the official [angular2-quickstart](https://angular.io/docs/ts/latest/quickstart.html#!#package-json)... Looking at **package.json**, I see : ``` "dependencies": { "@angular/common": "2.0.0-rc.1", "@angular/compiler": "2.0.0-rc.1", "@angular/core": "2.0.0-rc.1", "@angular/http": "2.0.0-rc.1"...
2016/05/13
[ "https://Stackoverflow.com/questions/37208691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6240666/" ]
The `angular2` name in modules names is for versions before RC (release candidate) versions (beta ones) and the `@angular` one for RC versions. RC versions are really fresh so most of tutorials use beta versions...
AFAIK `@angular` is the Angular namespace name in the NPM repository.
978,410
The schema: (psuedocode) I have a bean, called BaseEntity... ``` @Entity class BaseEntity { @OneToMany @CascadeType.ALL List [Property] properties; //the use angled braces ommited for the stackoverflow editor to show up properly } ``` Property is another bean... ``` @Entity class Property { @ManyToOne ...
2009/06/10
[ "https://Stackoverflow.com/questions/978410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/106974/" ]
The performance problem looks like it is in your sub selects. What about breaking it up a bit ``` select entity from BaseEntity as entity join entity.properties as property where property.category.name in ( 'FOO','BAR' ) ``` This would get you the list of Base Entities with a property of FOO or BAR then if you wan...
Do you override the default fetch types for the associations? Usually this leads to the issue. Can you post the query Hibernate generates?
978,410
The schema: (psuedocode) I have a bean, called BaseEntity... ``` @Entity class BaseEntity { @OneToMany @CascadeType.ALL List [Property] properties; //the use angled braces ommited for the stackoverflow editor to show up properly } ``` Property is another bean... ``` @Entity class Property { @ManyToOne ...
2009/06/10
[ "https://Stackoverflow.com/questions/978410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/106974/" ]
The performance problem looks like it is in your sub selects. What about breaking it up a bit ``` select entity from BaseEntity as entity join entity.properties as property where property.category.name in ( 'FOO','BAR' ) ``` This would get you the list of Base Entities with a property of FOO or BAR then if you wan...
It was absolutely ccclark's answer that got me in the direction, and my good friend helped too... ``` select entity.id as entityId, entity.type as entityType, p1.value as Vendor, p2.value as Weight from BaseEntity as entity join entity.properties as p1 join entity.properties as p2 where p1.category.name = 'Vendor'...
978,410
The schema: (psuedocode) I have a bean, called BaseEntity... ``` @Entity class BaseEntity { @OneToMany @CascadeType.ALL List [Property] properties; //the use angled braces ommited for the stackoverflow editor to show up properly } ``` Property is another bean... ``` @Entity class Property { @ManyToOne ...
2009/06/10
[ "https://Stackoverflow.com/questions/978410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/106974/" ]
The performance problem looks like it is in your sub selects. What about breaking it up a bit ``` select entity from BaseEntity as entity join entity.properties as property where property.category.name in ( 'FOO','BAR' ) ``` This would get you the list of Base Entities with a property of FOO or BAR then if you wan...
That query looks reasonable to me. So the question is: What SQL is hibernate producing for that HQL? What query plan is the database producing for that SQL? In Sybase or MS SQL Server: "set showplan on". In Oracle use SQLDeveloper/Toad and select the plan/Ambulance. It is likely that you need to use an index on cat...
43,421,386
I am using a dropdown menu code as given below. The code worked fine when the image for menu was used normally. However, I wish to place the dropdown menu relatively, to flow right the menu icon even when browser window is resized (responsive web design). So i wrapped the image element in a div element so I could use a...
2017/04/15
[ "https://Stackoverflow.com/questions/43421386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6504436/" ]
Normally, Ruby will give the name of the Class that the missing method is from. For example if I'm in irb and I create, instantiate, and then call a missing method, Ruby will give me more details than Rails. ``` class Widget def initialize @widget = 42 end end ``` Then I instantiate the class: ``` test = Wid...
Suppose we write the following. ``` class C end C.class_method #=> NoMethodError: undefined method `class_method' for C:Class c = C.new #=> #<C:0x007fe12bd1eb10> c.instance_method # NoMethodError: undefined method `instance_method' for #<C:0x007fe12bd1eb10> ``` No surprises there. Now let's do the same but c...
46,459,180
I am trying to add a splash screen to an xcode project? It may potentially be an animation with sound effects. Can anyone help? Thank you guys.
2017/09/28
[ "https://Stackoverflow.com/questions/46459180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8634577/" ]
According to apple's guideline it is not possible to use gif as splash screen or launch image. If you are using story board for launch screen (> ios 7) then you can use jpg but below or equal version to ios 7, you have only option is png. You can achieve animation kind of startup by making your first view controller ...
Basically - you can't make animated splash screen. However - you can duplicate it (LaunchScreen) in storyboard and make it as entrance VC of your app. Than when view gets loaded - start your animation. As a final result you will have "animating splash screen": App starts -> static launch screen -> transition to entran...
46,459,180
I am trying to add a splash screen to an xcode project? It may potentially be an animation with sound effects. Can anyone help? Thank you guys.
2017/09/28
[ "https://Stackoverflow.com/questions/46459180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8634577/" ]
According to apple's guideline it is not possible to use gif as splash screen or launch image. If you are using story board for launch screen (> ios 7) then you can use jpg but below or equal version to ios 7, you have only option is png. You can achieve animation kind of startup by making your first view controller ...
You can't make splash screen animated with sound effect. But it is possible if you make a fake splash screen that you will have full ability to make any animation and sound effect. For example, add a real splash screen with white background color, and make your fake splash screen appear after with white background ...
43,640,591
I have an array of arrays containing subnets, one of the subnets is wrong (is missing one octet) and I would like to merge them and ignore the wrong one. I have the following code: ``` subnets = ["149.62.168.0/24"], ["134.247.2.0/24"], ["159.226.92.0/24","159.8.57/22"] require 'netaddr' subnet.each do |net| begin...
2017/04/26
[ "https://Stackoverflow.com/questions/43640591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7499654/" ]
You need to install these libraries first : ``` sudo apt-get install libpq-dev postgresql postgresql-contrib ``` **Configuration** in settings.py ``` DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'db_name', 'USER': 'db_user', ...
Glad you're coming on board with Django! It's a great language with plenty of useful features, you won't regret learning it. To connect to an existing database, check out the docs [here](https://docs.djangoproject.com/en/1.11/howto/legacy-databases/). This explains how to use your existing db to create models in your...
46,694,481
I tried the installation on two different Windows 10 machines, both with admin privileges and node v8.6.0. + python 3.6.3 amd64. Both failed with the same errors: ``` C:\Users\kians>npm install -g node-inspector > v8-profiler@5.7.0 preinstall C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules...
2017/10/11
[ "https://Stackoverflow.com/questions/46694481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1838191/" ]
According to thread <https://github.com/node-inspector/node-inspector/issues/1010#issuecomment-306972510>, node inspector is not working with node 8.X. you can use the built-in debugger tools. <https://nodejs.org/en/docs/inspector/>
To begin with this error seems to be related with the `node-gyp` package. According to their documentation [page](https://github.com/nodejs/node-gyp#on-windows) in github there are 2 setup options for Windows. Option 1 is to run: ``` npm install --global --production windows-build-tool ``` Which you have already do...
13,978,402
I have TestNG tests that are grouped with the (groups = "unit") annotation as unit or integration and run using the following Maven config: ``` <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.7.2</version> ...
2012/12/20
[ "https://Stackoverflow.com/questions/13978402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1023959/" ]
You can do: ``` >>> 'Hello'[::-1] 'olleH' ``` [Sample](http://ideone.com/19T5EI)
As **Mike Christensen** above wrote, you could easily do `'Hello'[::-1]`. However, that's a Python-specific thing. What you could do in general if you're working in other languages, including languages that don't allow for negative list slicing, would be something more like: ``` def getbackwards(input_string): out...
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
This does not look very good but seems close to what your code is attempting to do, where I use `\cline{}` to draw the horizontal line, and `\phantom{y=}` to push the minus sign to the left ![enter image description here](https://i.stack.imgur.com/BCBAd.png) --- Recomended Solution: -------------------- However, I ...
My two-cents worth, using more of a textual representation and an `array`: ![enter image description here](https://i.stack.imgur.com/JpWBp.png) ``` \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document} \[ \begin{array}{l@{\quad}cr@{}l} && y & {}= 2x+5 \\ \text{minus} && ...
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
This does not look very good but seems close to what your code is attempting to do, where I use `\cline{}` to draw the horizontal line, and `\phantom{y=}` to push the minus sign to the left ![enter image description here](https://i.stack.imgur.com/BCBAd.png) --- Recomended Solution: -------------------- However, I ...
Here is my solution: ![enter image description here](https://i.stack.imgur.com/HLkh2.png) ``` \documentclass[]{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4} &y&=&&2x&&+&5\\ -\hspace*{.5em}&y&=&&3x&&+&10\\[-2.5ex]\cline{2-8}\\[-4.8ex] &0&=&&-x&&-&5 \end{alignat*} \end{document}...
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
This does not look very good but seems close to what your code is attempting to do, where I use `\cline{}` to draw the horizontal line, and `\phantom{y=}` to push the minus sign to the left ![enter image description here](https://i.stack.imgur.com/BCBAd.png) --- Recomended Solution: -------------------- However, I ...
I write it like this: ``` \[\frac{\begin{matrix} y=2x+5\\ y=3x+10 \end{matrix}}{0=-x-5}\ -\] ```
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
This does not look very good but seems close to what your code is attempting to do, where I use `\cline{}` to draw the horizontal line, and `\phantom{y=}` to push the minus sign to the left ![enter image description here](https://i.stack.imgur.com/BCBAd.png) --- Recomended Solution: -------------------- However, I ...
Stealing the idea with `\frac` from [this answer](https://tex.stackexchange.com/a/137587/19356) but replacing the `matrix` with `aligned`. Is it a cute idea? I hope so! ``` \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \[ \frac { ...
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
My two-cents worth, using more of a textual representation and an `array`: ![enter image description here](https://i.stack.imgur.com/JpWBp.png) ``` \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document} \[ \begin{array}{l@{\quad}cr@{}l} && y & {}= 2x+5 \\ \text{minus} && ...
Here is my solution: ![enter image description here](https://i.stack.imgur.com/HLkh2.png) ``` \documentclass[]{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4} &y&=&&2x&&+&5\\ -\hspace*{.5em}&y&=&&3x&&+&10\\[-2.5ex]\cline{2-8}\\[-4.8ex] &0&=&&-x&&-&5 \end{alignat*} \end{document}...
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
My two-cents worth, using more of a textual representation and an `array`: ![enter image description here](https://i.stack.imgur.com/JpWBp.png) ``` \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document} \[ \begin{array}{l@{\quad}cr@{}l} && y & {}= 2x+5 \\ \text{minus} && ...
I write it like this: ``` \[\frac{\begin{matrix} y=2x+5\\ y=3x+10 \end{matrix}}{0=-x-5}\ -\] ```
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
My two-cents worth, using more of a textual representation and an `array`: ![enter image description here](https://i.stack.imgur.com/JpWBp.png) ``` \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \begin{document} \[ \begin{array}{l@{\quad}cr@{}l} && y & {}= 2x+5 \\ \text{minus} && ...
Stealing the idea with `\frac` from [this answer](https://tex.stackexchange.com/a/137587/19356) but replacing the `matrix` with `aligned`. Is it a cute idea? I hope so! ``` \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \[ \frac { ...
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
Here is my solution: ![enter image description here](https://i.stack.imgur.com/HLkh2.png) ``` \documentclass[]{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4} &y&=&&2x&&+&5\\ -\hspace*{.5em}&y&=&&3x&&+&10\\[-2.5ex]\cline{2-8}\\[-4.8ex] &0&=&&-x&&-&5 \end{alignat*} \end{document}...
I write it like this: ``` \[\frac{\begin{matrix} y=2x+5\\ y=3x+10 \end{matrix}}{0=-x-5}\ -\] ```
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
Here is my solution: ![enter image description here](https://i.stack.imgur.com/HLkh2.png) ``` \documentclass[]{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4} &y&=&&2x&&+&5\\ -\hspace*{.5em}&y&=&&3x&&+&10\\[-2.5ex]\cline{2-8}\\[-4.8ex] &0&=&&-x&&-&5 \end{alignat*} \end{document}...
Stealing the idea with `\frac` from [this answer](https://tex.stackexchange.com/a/137587/19356) but replacing the `matrix` with `aligned`. Is it a cute idea? I hope so! ``` \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \[ \frac { ...
43,102
I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. ``` \begin{align*} &y&=2x+5\\ -&&\\ &y&=3x+10\\\hline &0&=-x-5 \end{align*} ```
2012/02/01
[ "https://tex.stackexchange.com/questions/43102", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/11296/" ]
Stealing the idea with `\frac` from [this answer](https://tex.stackexchange.com/a/137587/19356) but replacing the `matrix` with `aligned`. Is it a cute idea? I hope so! ``` \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \[ \frac { ...
I write it like this: ``` \[\frac{\begin{matrix} y=2x+5\\ y=3x+10 \end{matrix}}{0=-x-5}\ -\] ```
22,120,995
I am trying to get a html page with jquery ajax to connect to an online database and return true or false if a query returns true or false. Here is the code for the index.html file (This is running on my local pc in wamp) The Query/Ajax Code: ``` <script type="text/javascript"> function submitForm() { if(!$("#us...
2014/03/01
[ "https://Stackoverflow.com/questions/22120995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/683553/" ]
Try changing the following lines of code: ``` if($result->num_rows > 0){ echo "right login !!"; } else{ echo 'wrong login'; } ``` And then edit your AJAX to look like this (adding dataType: 'html') ``` $.ajax({type:'POST', url: 'http://mywebsite.com/test/index.php', data:$('#ContactForm').serializ...
Try to change the if statement with: ``` if($result->num_rows > 0){ echo "right login !!"; } else { echo 'wrong login'; } ```
22,120,995
I am trying to get a html page with jquery ajax to connect to an online database and return true or false if a query returns true or false. Here is the code for the index.html file (This is running on my local pc in wamp) The Query/Ajax Code: ``` <script type="text/javascript"> function submitForm() { if(!$("#us...
2014/03/01
[ "https://Stackoverflow.com/questions/22120995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/683553/" ]
Try changing the following lines of code: ``` if($result->num_rows > 0){ echo "right login !!"; } else{ echo 'wrong login'; } ``` And then edit your AJAX to look like this (adding dataType: 'html') ``` $.ajax({type:'POST', url: 'http://mywebsite.com/test/index.php', data:$('#ContactForm').serializ...
Try using json\_encode() on your 'right login' and 'wrong login' strings
22,120,995
I am trying to get a html page with jquery ajax to connect to an online database and return true or false if a query returns true or false. Here is the code for the index.html file (This is running on my local pc in wamp) The Query/Ajax Code: ``` <script type="text/javascript"> function submitForm() { if(!$("#us...
2014/03/01
[ "https://Stackoverflow.com/questions/22120995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/683553/" ]
Try changing the following lines of code: ``` if($result->num_rows > 0){ echo "right login !!"; } else{ echo 'wrong login'; } ``` And then edit your AJAX to look like this (adding dataType: 'html') ``` $.ajax({type:'POST', url: 'http://mywebsite.com/test/index.php', data:$('#ContactForm').serializ...
On local pc with wamp for exemple, debugger may add debugging info in your php response. Then, statut is ok (200) but you response is not json parsable. Try to add a ``` error: function (xhr, status, error) { var err = eval("(" + xhr.responseText + ")"); alert(err.Message); } ``` in...
2,356,327
Show that in the full $QR$ decomposition of the full rank $m\times n$ matrix $A,m ≥ n$, the vectors $q\_{n+1}, \ldots, q\_m$ are an orthonormal basis for the null space of $A^T$. Full $QR$ :$Q\in \mathbb R^{m\times m} , R\in \mathbb R^{m\times n}$ Thanks!
2017/07/12
[ "https://math.stackexchange.com/questions/2356327", "https://math.stackexchange.com", "https://math.stackexchange.com/users/201116/" ]
If $A=QR$ is a full decomposition, then $R= \begin{bmatrix} R\_1 \\ 0 \end{bmatrix}$ where $R\_1$ is invertible. Then $\ker R^T = \operatorname{sp} \{e\_{n+1},\cdots, e\_m \}$ and so $\ker A^T = \ker R^T Q^T = Q \ker R^T $ and hence $\ker A^T = \operatorname{sp} \{Qe\_{n+1},\cdots, Qe\_m \} = \operatorname{sp} \{q\_{n...
$rank(A^T) + nullity(A^T) = m$. But $rank(A) = rank(A^T) = n$ since $A$ is full rank. So $nullity(A^T) = m - n$. So basis for $A^T$ must contain $m - n$ vectors. The set $\{q\_{n+1}, \dots, q\_m\}$ contains right number of vectors and they are already orthonormal. So all that remains to show is $A^T{q\_j} = \mathbf{0}...
3,565,794
We work with a small development team and a system engineer who deploys the software at certain times. At the moment we don't have any leading document for database changes. Changes are done in the staging database and added manually to production when the system engineer deploys a new release. We started to work wit...
2010/08/25
[ "https://Stackoverflow.com/questions/3565794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/430642/" ]
We are a $2.5B solar manufacturing company that is using Visual Studio Database Edition for all our database management and versioning needs. It has been a very good tool for us. It version controls our databases with TFS integration, does schema and data compares (like Red-Gate), database validations and much more. We...
We use source control for versioning. All databases changes must only be made in scripts and placed in source control as part of the branch of the code that goes to production with the rest of the code changes for that version. Since devs don't have any rights to create or alter objects in Prod, this works out well for...
7,786,676
I have a bunch of enumerations that represent permissions for various parts of the application. ``` public enum PermissionGroup1 { CanDo11, CanDo12, CanDo13, } public enum PermissionGroup2 { CanDo21, CanDo22, CanDo23, } public enum PermissionGroup3 { CanDo31, CanDo32, CanDo33, ...
2011/10/16
[ "https://Stackoverflow.com/questions/7786676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39677/" ]
I have implemented it this way. Say `Perms` is your `ModulePermissions[ModuleID]` object's class. Then you could delegate checking access to it like this: ``` public bool CheckAccess<T>(int moduleId, T perm) { if(!ModulePermissions.ContainsKey(moduleId)) return false; return ModulePermissions[moduleId].HasPer...
IMO it's better to change your enums to classes, instead of having different enum, have different classes and one enum (with different access level for example Level1, Level2, ... may be some extra level for future), and all of this classes inherit from base class (like PermisionAccessBase) which has one method (curren...
36,207,710
Consider the following code: ``` def print_mah(n): if n <= 0: return else: print('mah') print_mah(n-1) print_mah(3) ``` Here Python checks if n is less than or equal to 0, it finds that this is **False** so it prints 'mah' and calls the same function with n-1 until n is equal to 0,...
2016/03/24
[ "https://Stackoverflow.com/questions/36207710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5364795/" ]
There are two *separate* concerns here: 1. getting a URL from the .txt file 2. loading a URL in `WebView` You should think of them separately. You already seem to know how to do 2. (load a URL into `WebView`), so focus on 1. You can learn how to open and read a file in Java from many resources. Including [SO](https:...
I would like to support the approach of @szym. Here you can find some code for your better understanding. ``` File sdcard = Environment.getExternalStorageDirectory(); //Get the text file File file = new File(sdcard,"file.txt"); //Read text from file StringBuilder text = new StringBuilder(); try { BufferedReader...
34,185,799
Using pure C (and the C-preprocessor) I would like to create a string buffer that includes a length parameter, so that I could pass it around easily and any functions that operate on it could do so without danger of writing past the end. This is simple enough: ``` typedef struct strbuf_t_ { int length; char s...
2015/12/09
[ "https://Stackoverflow.com/questions/34185799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5608223/" ]
You are using a string to index the list, `'0'` is a string, not an integer. Remove the quotes: ``` print(data['cosponsors'][0]['thomas_id']) ``` When in doubt, check the *partial* result; see what `print(type(data['cosponsors']))` produces; if that produces `<type 'list'>`, you know you need to use indexing with in...
How about ``` data['cosponsors'][0]['thomas_id'] ``` Since a list has numeric indices.
43,476,754
I need to select a random word from a csv file and I just don't know how to start it off. All the words are in one column, but I want to get a random row so as I can output a random word. Any thoughts?
2017/04/18
[ "https://Stackoverflow.com/questions/43476754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7885001/" ]
You could use pandas: ``` import pandas as pd csvfile = pd.read_csv('/your/file/path/here') print csvfile.sample() ```
Since you stated that all words are in one column, that makes it easier to parse the file. Here is my solution: ``` import random with open('random_word_from_file.txt') as f: words = f.read().split() my_pick = random.choice(words) print my_pick ``` Notes ===== * In this solution, I assume the size of t...
43,476,754
I need to select a random word from a csv file and I just don't know how to start it off. All the words are in one column, but I want to get a random row so as I can output a random word. Any thoughts?
2017/04/18
[ "https://Stackoverflow.com/questions/43476754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7885001/" ]
Use the [**`random`**](https://docs.python.org/2/library/random.html) and [**`csv`**](https://docs.python.org/2/library/csv.html) modules. If your `csv` file is small enough to fit into memory, you could read the whole thing then select a line: ``` import csv import random with open(filename) as f: reader = csv....
Since you stated that all words are in one column, that makes it easier to parse the file. Here is my solution: ``` import random with open('random_word_from_file.txt') as f: words = f.read().split() my_pick = random.choice(words) print my_pick ``` Notes ===== * In this solution, I assume the size of t...
35,019,292
Developing an app with laravel I realised that what can be done with `Policy` can exactly be done with `Middleware`. Say I want to prevent a user from updating a route if he/she is not the owner of the information, I can easily check from the route and can do the same from the policy. So my question is why should I us...
2016/01/26
[ "https://Stackoverflow.com/questions/35019292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1845654/" ]
I'm currently going through a small refactor with my roles, permissions and routes and asked myself the same question. At the surface level, it appears true middleware and policies perform the same general idea. Check if a user can do what they are doing. For reference here's the laravel docs... **Middleware** "Ma...
Route middleware allows you to apply request handling to a large range of routes, instead of repeating the code in every controller action - checking authentication and redirecting guests is a good example. Controllers instead contain logic unique to specific routes/actions - you could use middleware for this, but you'...
35,019,292
Developing an app with laravel I realised that what can be done with `Policy` can exactly be done with `Middleware`. Say I want to prevent a user from updating a route if he/she is not the owner of the information, I can easily check from the route and can do the same from the policy. So my question is why should I us...
2016/01/26
[ "https://Stackoverflow.com/questions/35019292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1845654/" ]
Route middleware allows you to apply request handling to a large range of routes, instead of repeating the code in every controller action - checking authentication and redirecting guests is a good example. Controllers instead contain logic unique to specific routes/actions - you could use middleware for this, but you'...
I have asked myself the same question. In practice, I predominantly use middleware. My most common usage is when authorisation is only allowed for a specific user, for instance: ``` public function update(User $user, user $model) { return $user->id === $model->id; } ``` Though, even in the instance above, Yes, o...
35,019,292
Developing an app with laravel I realised that what can be done with `Policy` can exactly be done with `Middleware`. Say I want to prevent a user from updating a route if he/she is not the owner of the information, I can easily check from the route and can do the same from the policy. So my question is why should I us...
2016/01/26
[ "https://Stackoverflow.com/questions/35019292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1845654/" ]
I'm currently going through a small refactor with my roles, permissions and routes and asked myself the same question. At the surface level, it appears true middleware and policies perform the same general idea. Check if a user can do what they are doing. For reference here's the laravel docs... **Middleware** "Ma...
I have asked myself the same question. In practice, I predominantly use middleware. My most common usage is when authorisation is only allowed for a specific user, for instance: ``` public function update(User $user, user $model) { return $user->id === $model->id; } ``` Though, even in the instance above, Yes, o...
32,318,983
I have been trying to figure out how the search button on YouTube (the magnifying glass button) is styled, and upon inspection it is just a button: ``` <button class="yt-uix-button yt-uix-button-size-default yt-uix-button-default search-btn-component search-button" type="submit" onclick="if (document.getElementByI...
2015/08/31
[ "https://Stackoverflow.com/questions/32318983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4400613/" ]
This is the image sprite for that button: <https://s.ytimg.com/yts/imgbin/www-hitchhiker-2x-vflPBoHOV.webp> CSS allows you to define a 'background-image' of an element (the search button), a 'background-position', and the width of the button. Using that you can change the background-position coordinates and you can d...
The technique is called CSS Sprites. In this technique all the images are combined as one image and the are called to particular position where they needed. Benefit of doing this is to reduce http requests and speed up load time of web pages. for reference : <http://www.w3schools.com/css/css_image_sprites.asp>
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
This should work. ``` select str(year) + '-' + str(month) as month, total, count from ( SELECT COUNT(Q.Questionaire_ID) AS [Count], sum(Q.[Count]) as total, MONTH(Q.Start_Date) as month, YEAR(Q.Start_Date) as year FROM Questionaires as Q GROUP BY MONTH(Q.Start_Date), YEAR(Q.Start_Date) ) pretty ``` something like ...
Try converting the datetime field to date only: ``` SELECT COUNT(Q.Questionaire_ID) AS [Count], CONVERT(DATETIME,CAST(Q.Start_Date AS VARCHAR(12)),103) AS [Date] FROM Questionaires as Q GROUP BY CONVERT(DATETIME,CAST(Q.Start_Date AS VARCHAR(12)),103) ``` Here we are converting the datetime field to a VARCHAR but on...
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
This should work. ``` select str(year) + '-' + str(month) as month, total, count from ( SELECT COUNT(Q.Questionaire_ID) AS [Count], sum(Q.[Count]) as total, MONTH(Q.Start_Date) as month, YEAR(Q.Start_Date) as year FROM Questionaires as Q GROUP BY MONTH(Q.Start_Date), YEAR(Q.Start_Date) ) pretty ``` something like ...
``` i think this example is useful for you CREATE TABLE RunTotalTestData ( id int not null identity(1,1) primary key, value int not null ); INSERT INTO RunTotalTestData (value) VALUES (1); INSERT INTO RunTotalTestData (value) VALUES (2); INSERT INTO RunTotalTestData (value) VALUES (4); INSERT INTO RunTo...
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
If you cast each [Date] to a date it removes the time, and if you deduct the day (minus one) we get the first day of the month. Then Group by that. Finally use SUM() OVER() to form the running total. also: CONVERT(varchar(7), [Date], 120) produces a string of YYYY-MM, if you have MS SQL 2012+ you could use FORMAT([Da...
This should work. ``` select str(year) + '-' + str(month) as month, total, count from ( SELECT COUNT(Q.Questionaire_ID) AS [Count], sum(Q.[Count]) as total, MONTH(Q.Start_Date) as month, YEAR(Q.Start_Date) as year FROM Questionaires as Q GROUP BY MONTH(Q.Start_Date), YEAR(Q.Start_Date) ) pretty ``` something like ...
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
By "cumulative sum", I assume you mean "count". You need to extract the year and month and group by those columns as well: ``` SELECT YEAR(Q.Start_Date) as yyyy, MONTH(Q.Start_Date) as mm, COUNT(Q.Questionaire_ID) AS [Count] FROM Questionaires as Q GROUP BY YEAR(Q.Start_Date), MONTH(Q.Start_Date) ORDER BY yyyy...
Try converting the datetime field to date only: ``` SELECT COUNT(Q.Questionaire_ID) AS [Count], CONVERT(DATETIME,CAST(Q.Start_Date AS VARCHAR(12)),103) AS [Date] FROM Questionaires as Q GROUP BY CONVERT(DATETIME,CAST(Q.Start_Date AS VARCHAR(12)),103) ``` Here we are converting the datetime field to a VARCHAR but on...
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
If you cast each [Date] to a date it removes the time, and if you deduct the day (minus one) we get the first day of the month. Then Group by that. Finally use SUM() OVER() to form the running total. also: CONVERT(varchar(7), [Date], 120) produces a string of YYYY-MM, if you have MS SQL 2012+ you could use FORMAT([Da...
Try converting the datetime field to date only: ``` SELECT COUNT(Q.Questionaire_ID) AS [Count], CONVERT(DATETIME,CAST(Q.Start_Date AS VARCHAR(12)),103) AS [Date] FROM Questionaires as Q GROUP BY CONVERT(DATETIME,CAST(Q.Start_Date AS VARCHAR(12)),103) ``` Here we are converting the datetime field to a VARCHAR but on...
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
By "cumulative sum", I assume you mean "count". You need to extract the year and month and group by those columns as well: ``` SELECT YEAR(Q.Start_Date) as yyyy, MONTH(Q.Start_Date) as mm, COUNT(Q.Questionaire_ID) AS [Count] FROM Questionaires as Q GROUP BY YEAR(Q.Start_Date), MONTH(Q.Start_Date) ORDER BY yyyy...
``` i think this example is useful for you CREATE TABLE RunTotalTestData ( id int not null identity(1,1) primary key, value int not null ); INSERT INTO RunTotalTestData (value) VALUES (1); INSERT INTO RunTotalTestData (value) VALUES (2); INSERT INTO RunTotalTestData (value) VALUES (4); INSERT INTO RunTo...
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
If you cast each [Date] to a date it removes the time, and if you deduct the day (minus one) we get the first day of the month. Then Group by that. Finally use SUM() OVER() to form the running total. also: CONVERT(varchar(7), [Date], 120) produces a string of YYYY-MM, if you have MS SQL 2012+ you could use FORMAT([Da...
By "cumulative sum", I assume you mean "count". You need to extract the year and month and group by those columns as well: ``` SELECT YEAR(Q.Start_Date) as yyyy, MONTH(Q.Start_Date) as mm, COUNT(Q.Questionaire_ID) AS [Count] FROM Questionaires as Q GROUP BY YEAR(Q.Start_Date), MONTH(Q.Start_Date) ORDER BY yyyy...
33,182,513
I have a set of data that looks like this: ``` ID Date 62 2012-06-12 05:30:57.000 202 2012-06-13 00:00:00.000 73 2012-06-17 05:25:15.000 74 2012-06-17 06:20:00.000 75 2012-06-17 10:46:03.000 76 2012-06-17 11:15:33.000 77 2012-06-17 12:17:09.000 79 2012-06-17 21:12:44.000 81 2012-06-18 12:34:45.000 82...
2015/10/17
[ "https://Stackoverflow.com/questions/33182513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616454/" ]
If you cast each [Date] to a date it removes the time, and if you deduct the day (minus one) we get the first day of the month. Then Group by that. Finally use SUM() OVER() to form the running total. also: CONVERT(varchar(7), [Date], 120) produces a string of YYYY-MM, if you have MS SQL 2012+ you could use FORMAT([Da...
``` i think this example is useful for you CREATE TABLE RunTotalTestData ( id int not null identity(1,1) primary key, value int not null ); INSERT INTO RunTotalTestData (value) VALUES (1); INSERT INTO RunTotalTestData (value) VALUES (2); INSERT INTO RunTotalTestData (value) VALUES (4); INSERT INTO RunTo...
65,167,641
I have flutter app works fine ,first we have Product class : ``` class Products { final String item; final int price; Products({this.item, this.price}); factory Products.fromMap(Map<String, dynamic> json) => Products( item: json["item"], price: json["price"], ); Map<String, dynamic> ...
2020/12/06
[ "https://Stackoverflow.com/questions/65167641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14744752/" ]
A simple solution I discovered was: ``` :%norm 3gJ ``` % is execute the following command from line 1 to the end. The norm command runs the normal mode commands equivalent to the letters that follow it. g and capital J is the shortcut for join and finally, the 3 is for three 3 lines. I hope that this might be usefu...
You can do it manually by putting the cursor on the first line of the three to be joined. Then type `:` followed by `.,+2j!` `.` - Current line `+2` - To 3rd line from current `j!` - Join the lines with adding spaces `j` - joins adding spaces in between. Transforms ``` 1 short-line one 2 short-line two 3 sho...
37,703,309
How to detect and trigger custom action during opening specific sheet in spreadsheet? I could not find proper function in <https://developers.google.com/apps-script/guides/triggers/events>
2016/06/08
[ "https://Stackoverflow.com/questions/37703309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2166188/" ]
To do polling as Mogsdad suggested you could use this code in your Sidebar (or any UI element) ``` $(function() { /** * On document load, assign click handlers to each button and try to load the * user's origin and destination language preferences if previously set. */ poll(); } function poll(interval)...
There is no API provided to trigger on user events, aside from the ones in the documentation you've linked. I can think of only one work-around: If your application involves having a custom UI element, specifically a sidebar or dialog, then you could poll for the active cell, and determine the active sheet from that. ...
372,330
A friend accidentally deleted his forum database. Which wouldn't normally be a huge issue, except for the fact that he neglected to perform backups. 2 years of content is just plain gone. Obviously, he's learned his lesson. The good news, however, is that Google keeps backups, even if individual site owners are idiots...
2008/12/16
[ "https://Stackoverflow.com/questions/372330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28596/" ]
You may want to consider looking at crawling the archive.org cache as well. If you're in there, it's generally better structured.
If the website is small enough that you can crawl it manually, [this userscript](http://userscripts.org/scripts/show/30878) to seamlessly navigate Google's cache is very useful.
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
> > It is in reasonable abundance on Earth, but is rare throughout the universe has a whole > > > Let's start with a note on scale. "The universe as a whole" is bigger than we can even see, for various reasons. The bit we *can* see has something like 2 *trillion* galaxies in it. Each galaxy has hundreds of million...
Humans ------ Just like humans collect birds, fish, snakes, and other animals, and are willing to pay large amounts of money for rare specimen, aliens collect species from other planets. The further away it comes from, the more space bucks they're willing to pay! A space ship full of humans will earn the crew a lot of...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
The topology of this part of the universe was peculiar immediately after the big bang, and our solar system got more than its fair share of [monopoles](https://en.wikipedia.org/wiki/Magnetic_monopole). Some of them ended up on Earth. The aliens have magical technology that can detect them, but not manufacture them. T...
A material that doesn't check most of your requirements but could still fit your use case is clean, liquid water: Water in itself is in abundance in the universe, however not all forms of water are useful for living life. This material can be synthesized and we can extract clean water from ice which is abundant. Howe...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
> > It is in reasonable abundance on Earth, but is rare throughout the universe has a whole > > > Let's start with a note on scale. "The universe as a whole" is bigger than we can even see, for various reasons. The bit we *can* see has something like 2 *trillion* galaxies in it. Each galaxy has hundreds of million...
Reverse the decision, and consider that where the aliens come from they have a deficiency of a certain element. Though take into account that it would be far easier to mine it from a closer solar system than ours or even ignore us on earth and mine all they would need from Mars or the asteroid belt. You may perhaps wa...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
Reverse the decision, and consider that where the aliens come from they have a deficiency of a certain element. Though take into account that it would be far easier to mine it from a closer solar system than ours or even ignore us on earth and mine all they would need from Mars or the asteroid belt. You may perhaps wa...
A huge fraction of the universe is composed of just hydrogen and helium. Something like 98% Of the remaining elements, they are produced in supernova or for a few the lighter ones, as the end stage of a star running out of fuel. See: <https://en.wikipedia.org/wiki/Abundance_of_the_chemical_elements> Of the elements ...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
**Anything can be synthesized, but how easy...** Agree with Harthag's question comment, in principle.. in terms of elements, this question is a no-go when dealing with a really really high tech alien. They'll know it all. But in that case, why would they come harvest things on an inhabited planet ? **Rare Earths that...
A material that doesn't check most of your requirements but could still fit your use case is clean, liquid water: Water in itself is in abundance in the universe, however not all forms of water are useful for living life. This material can be synthesized and we can extract clean water from ice which is abundant. Howe...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
> > Look at the stunning color variations, the beautiful discontinuity of the impurities, all the gorgeous minute imperfections! *This*, my dear gentlebeings, is a pristine certified-natural carbon crystal, retrieved with blood, eyes and tears from an uncivilized pre-synthesis (of course!) waterworld by the great M'gr...
Humans have attained incredible levels of technology without unlocking the secret to FTL travel. By a similar coincidence, these aliens attained incredible levels of technology without unlocking the secret to integrated circuits and powerful computers. -------------------------------------------------------------------...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
**Space with breathable atmosphere and gravity** What they need is lots of land with a Oxygen/nitrogen atmosphere. Sure you can make an enclosed space with a pressurized atmosphere, but imagine trying to that for something the size of a large city or bigger. Everything you could ever want to do, is easier when you do...
A material that doesn't check most of your requirements but could still fit your use case is clean, liquid water: Water in itself is in abundance in the universe, however not all forms of water are useful for living life. This material can be synthesized and we can extract clean water from ice which is abundant. Howe...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
### No FTL? No invasion. No physical trade. The economics of sending even a trading ship would mean no mission would be sent. Time frames are on the order of tens of thousands of years(or more) and ships would cost trillions of dollars make this an economic non starter. The people who launch the ships would never see ...
Humans ------ Just like humans collect birds, fish, snakes, and other animals, and are willing to pay large amounts of money for rare specimen, aliens collect species from other planets. The further away it comes from, the more space bucks they're willing to pay! A space ship full of humans will earn the crew a lot of...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
A material that doesn't check most of your requirements but could still fit your use case is clean, liquid water: Water in itself is in abundance in the universe, however not all forms of water are useful for living life. This material can be synthesized and we can extract clean water from ice which is abundant. Howe...
A huge fraction of the universe is composed of just hydrogen and helium. Something like 98% Of the remaining elements, they are produced in supernova or for a few the lighter ones, as the end stage of a star running out of fuel. See: <https://en.wikipedia.org/wiki/Abundance_of_the_chemical_elements> Of the elements ...
222,216
I have been world-building a setting where a species of advanced aliens invades Earth, only to be forced off after the humans resort to guerilla tactics. In this setting, biological life is abundant in the universe, so Earth is not unique in that regard. The aliens are advanced, but not to the point where they have out...
2022/01/13
[ "https://worldbuilding.stackexchange.com/questions/222216", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79519/" ]
> > It is in reasonable abundance on Earth, but is rare throughout the universe has a whole > > > Let's start with a note on scale. "The universe as a whole" is bigger than we can even see, for various reasons. The bit we *can* see has something like 2 *trillion* galaxies in it. Each galaxy has hundreds of million...
A huge fraction of the universe is composed of just hydrogen and helium. Something like 98% Of the remaining elements, they are produced in supernova or for a few the lighter ones, as the end stage of a star running out of fuel. See: <https://en.wikipedia.org/wiki/Abundance_of_the_chemical_elements> Of the elements ...
70,500,220
I upgraded to Rails 7 and Ruby 3.1. While trying to run tests with `rspec` I got the error below. How can I fix it? ``` An error occurred while loading rails_helper. Failure/Error: require File.expand_path('../config/environment', __dir__) LoadError: cannot load such file -- net/smtp # .../gems/bootsnap-1.9.3/lib/b...
2021/12/27
[ "https://Stackoverflow.com/questions/70500220", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1085570/" ]
For Rails 6 =========== Add `gem 'net-smtp', require: false` to your *Gemfile* and run `bundle`. Similarly I assume you may have problems with `net-imap` and `net-pop` and so have to add them [until](https://github.com/mikel/mail/pull/1472#issuecomment-1165161541) a new `mail` gem version is released. ``` gem 'net-s...
I met the same problem when running Rails in production mode. ( Ruby 3, Rails 6.1 ) copy and paste this lines of code to `Gemfile`: ``` gem 'net-smtp', require: false gem 'net-imap', require: false gem 'net-pop', require: false ```
60,062
I get the error "Subquery returns more than 1 row" when I run the following statement. ``` SELECT `labels`.*, IF((SELECT `label_id` FROM `customer_print_sessions` WHERE `customer_id` = (SELECT `customer_id` FROM `customer_accounts_logins` ...
2014/03/03
[ "https://dba.stackexchange.com/questions/60062", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/31406/" ]
I added `GROUP BY label_id` to make the original statement work. ``` SELECT `labels`.*, IF((SELECT `label_id` FROM `customer_print_sessions` WHERE `customer_id` = (SELECT `customer_id` FROM `customer_accounts_logins` ...
Off the cuff suggestion (I don't have a database server up at the moment to test, sorry): ``` (SELECT COUNT(*) FROM `customer_print_sessions` WHERE `customer_id` = (SELECT `customer_id` FROM `customer_accounts_logins` WHERE `id` = '10...
60,062
I get the error "Subquery returns more than 1 row" when I run the following statement. ``` SELECT `labels`.*, IF((SELECT `label_id` FROM `customer_print_sessions` WHERE `customer_id` = (SELECT `customer_id` FROM `customer_accounts_logins` ...
2014/03/03
[ "https://dba.stackexchange.com/questions/60062", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/31406/" ]
I added `GROUP BY label_id` to make the original statement work. ``` SELECT `labels`.*, IF((SELECT `label_id` FROM `customer_print_sessions` WHERE `customer_id` = (SELECT `customer_id` FROM `customer_accounts_logins` ...
It would seem that the query you are sending is returning more than one *identical* row. Where this is a problem is if you were to go on and do something like a delete or update as the server would not know which row needed to be updated - so it doesn't like it. A Count(\*) option will tell you how many records there ...
50,621,884
Solved. Thanks! I am a beginner in C programming. I wrote a simple calculator code and its working fine. Here's the code- ``` #include<stdio.h> int main() { char operator; double firstNumber,secondNumber; printf("Enter an operator (+, -, *,/): \n"); scanf("%c", &operator); switch(operator)...
2018/05/31
[ "https://Stackoverflow.com/questions/50621884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9875185/" ]
I create an array of character with the valid operators, at the end of the switch condition we check if its valid operator if not it will ask the user to enter the operator another time: ``` # include<stdio.h> # include <string.h> int main() { char operator; double firstNumber...
You can do that by using a do while loop. `int main() { char ch; do { /* code for calculator*/ ... ... printf("Enter your choice(y/n)?\n"); scanf("\n%c", &ch); }while(ch == 'y' || ch == 'Y'); return 0; }`
50,621,884
Solved. Thanks! I am a beginner in C programming. I wrote a simple calculator code and its working fine. Here's the code- ``` #include<stdio.h> int main() { char operator; double firstNumber,secondNumber; printf("Enter an operator (+, -, *,/): \n"); scanf("%c", &operator); switch(operator)...
2018/05/31
[ "https://Stackoverflow.com/questions/50621884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9875185/" ]
I create an array of character with the valid operators, at the end of the switch condition we check if its valid operator if not it will ask the user to enter the operator another time: ``` # include<stdio.h> # include <string.h> int main() { char operator; double firstNumber...
Use Recursion ``` #include<stdio.h> ``` void main() { calculate(); } int calculate() { ``` char operator; double firstNumber,secondNumber; printf("Enter an operator (+, -, *,/): \n"); scanf("%c", &operator); switch(operator) { case '+': printf("Enter two numbers: "); scanf("%lf %lf",&firs...
50,621,884
Solved. Thanks! I am a beginner in C programming. I wrote a simple calculator code and its working fine. Here's the code- ``` #include<stdio.h> int main() { char operator; double firstNumber,secondNumber; printf("Enter an operator (+, -, *,/): \n"); scanf("%c", &operator); switch(operator)...
2018/05/31
[ "https://Stackoverflow.com/questions/50621884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9875185/" ]
I create an array of character with the valid operators, at the end of the switch condition we check if its valid operator if not it will ask the user to enter the operator another time: ``` # include<stdio.h> # include <string.h> int main() { char operator; double firstNumber...
What you can do is take a while loop and a small condition statement. ``` char choice ='y'; while(choice=='y'||choice=='Y') { switch(operator) { case '+': printf("Enter two numbers: "); scanf("%lf %lf",&firstNumber, &secondNumber); printf("%.2f + %.2f = %.2f",firstNumber, secondNumber, fir...
7,992,085
There is solution with two projects: **WPFProject** and **WPFResources**. WPFProject has MainWindow.xaml. WPFResources has picture **logo.png**. How can I set **Icon** property for main windows in XAML markup from project **WPFResources**?
2011/11/03
[ "https://Stackoverflow.com/questions/7992085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691269/" ]
See [pack URI syntax](http://msdn.microsoft.com/en-us/library/aa970069%28v=vs.85%29.aspx). Something like: ``` Icon="pack://application:,,,/ReferencedAssembly;component/logo.ico" ```
Let's consider a Visual Studio solution structured like this: [![Solution Structure](https://i.stack.imgur.com/gfdmR.png)](https://i.stack.imgur.com/gfdmR.png) * a WPF desktop client project (named `Main` in the example) * a class-library project (named `Shared` in the example) containing shared code and resources. ...
710,878
So...probably a dumb question but I followed the instructions [here](http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1) And I'm trying to upload my CSR to digicert where the format is suppose to look like this ``` -----BEGIN CERTIFICATE REQUEST----- MIICvDCCAaQCAQAwdzELMAkG...
2015/08/04
[ "https://serverfault.com/questions/710878", "https://serverfault.com", "https://serverfault.com/users/-1/" ]
Chances are you have generated the CSR in a binary format, e.g. DER. You need to convert it to PEM format (Privacy Enhanced Mail) in order to get it to be readable and come with those ---BEGIN tags etc. DigiCert, as you mentioned is your vendor, has a helpful tool for helping generate CSRs from the command line: <htt...
So apparently I asked a question as a guest so I can't comment or choose an answer sorry, but I used the openssl command in my terminal using the link that Herringbone\_Cat provided