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
67,366,685
I am running an Angular Application I am getting these popup in vs code whenever I am opening it. However, the ng serve command is working fine and it's serving(running) the app successfully. But I am getting this error in console. [![console error](https://i.stack.imgur.com/mX73o.png)](https://i.stack.imgur.com/mX73o...
2021/05/03
[ "https://Stackoverflow.com/questions/67366685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13975105/" ]
Angular Language Service Extension has one bug which is reported to their git repository. My solution will work for Angular Projects which is running < Version 9.0 To resolve this issue you have two ways. Solution 1: Downgrade extension version 1. Downgrade [https://marketplace.visualstudio.com/items?itemName=Angula...
In my case it is a problem of vs code editor, and the solution is 1. Go to VS code settings and search for settings.json file. 2. In settings.json file add this line "extensions.autoUpdate": false, (as in below image) [Settings.json file changes](https://i.stack.imgur.com/LPMio.png) 3. Now go to angular language ser...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
Think about AM-GM, you get $(\frac{1}{n!})^{\frac{1}n}\le\frac{2}{n+1}$
Using Stirling's Approximation: $$n!\sim\sqrt{2\pi n}(\frac n e)^n \text{ as } n\to\infty$$ We have: \begin{align} \lim\_{n\to\infty}(\frac 1 {n!})^{\frac 1n}&=\lim\_{n\to\infty}[\sqrt{2\pi n}(\frac n e)^n]^{-\frac 1n}\\&=\lim\_{n\to\infty}[(2\pi)^{-\frac 1 {2n}}\cdot n^{-\frac 1{2n}}\cdot\frac en]\\&=\lim\_{n\to\in...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
**An easy way :** Take , $\displaystyle a\_n=\frac{1}{n!}$. Then , $\displaystyle \frac{a\_{n+1}}{a\_n}=\frac{1}{n+1}\to 0 \text{ , as } n\to \infty $. So by **Cauchy's second limit theorem** , $\displaystyle a\_n^{1/n}\to 0 \text{ , as } n\to \infty$.
Another way considering $$A\_n=\left(\frac{1}{n!}\right)^{\frac{1}{n}}$$ Taking logarithms $$\log(A\_n)=-\frac 1n \log(n!)$$ Now, as Shailesh suggested, use [Stirling approximation](https://en.wikipedia.org/wiki/Stirling's_approximation) $$\log(n!)\approx n \log(n)-n+\frac 12 \log(2\pi n)$$ which makes $$\log(A\_n)\app...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
Think about AM-GM, you get $(\frac{1}{n!})^{\frac{1}n}\le\frac{2}{n+1}$
Another way considering $$A\_n=\left(\frac{1}{n!}\right)^{\frac{1}{n}}$$ Taking logarithms $$\log(A\_n)=-\frac 1n \log(n!)$$ Now, as Shailesh suggested, use [Stirling approximation](https://en.wikipedia.org/wiki/Stirling's_approximation) $$\log(n!)\approx n \log(n)-n+\frac 12 \log(2\pi n)$$ which makes $$\log(A\_n)\app...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
Another way considering $$A\_n=\left(\frac{1}{n!}\right)^{\frac{1}{n}}$$ Taking logarithms $$\log(A\_n)=-\frac 1n \log(n!)$$ Now, as Shailesh suggested, use [Stirling approximation](https://en.wikipedia.org/wiki/Stirling's_approximation) $$\log(n!)\approx n \log(n)-n+\frac 12 \log(2\pi n)$$ which makes $$\log(A\_n)\app...
Let $[x]$ denote the largest integer not exceeding $x.\;$ For $n\geq 4$ we have $$[n/2]\geq (n-1)/2 \;\text { and } \quad n-[n/2]\geq n/2.$$ Therefore, for $n\geq 4$ we have $$n!\geq \prod\_{j=1+[n/2]}^n j\geq [n/2]^{(n-[n/2])}\geq ((n-1)/2)^{n/2}>1.$$ Hence $n\geq 4\implies n!^{1/n}\geq ((n-1)/2)^{n/2})^{1/n}=\sqrt {(...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
**An easy way :** Take , $\displaystyle a\_n=\frac{1}{n!}$. Then , $\displaystyle \frac{a\_{n+1}}{a\_n}=\frac{1}{n+1}\to 0 \text{ , as } n\to \infty $. So by **Cauchy's second limit theorem** , $\displaystyle a\_n^{1/n}\to 0 \text{ , as } n\to \infty$.
We start by writing $$\left(\frac1{n!}\right)^{1/n}=e^{-\frac1n \log(n!)}$$ Note that we can easily bound $\log(n!)=\sum\_{k=1}^n\log(k)$ using $$n\log(n)-n+1=\int\_1^n \log(x)\,dx\le \log(n!)\le \int\_1^{n+1} \log(x)\,dx=(n+1)\log(n+1)-n$$ Therefore, we have the inequalities $$-\left(1+\frac1n\right)\log(n+1)+1...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
**An easy way :** Take , $\displaystyle a\_n=\frac{1}{n!}$. Then , $\displaystyle \frac{a\_{n+1}}{a\_n}=\frac{1}{n+1}\to 0 \text{ , as } n\to \infty $. So by **Cauchy's second limit theorem** , $\displaystyle a\_n^{1/n}\to 0 \text{ , as } n\to \infty$.
Let $[x]$ denote the largest integer not exceeding $x.\;$ For $n\geq 4$ we have $$[n/2]\geq (n-1)/2 \;\text { and } \quad n-[n/2]\geq n/2.$$ Therefore, for $n\geq 4$ we have $$n!\geq \prod\_{j=1+[n/2]}^n j\geq [n/2]^{(n-[n/2])}\geq ((n-1)/2)^{n/2}>1.$$ Hence $n\geq 4\implies n!^{1/n}\geq ((n-1)/2)^{n/2})^{1/n}=\sqrt {(...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
We start by writing $$\left(\frac1{n!}\right)^{1/n}=e^{-\frac1n \log(n!)}$$ Note that we can easily bound $\log(n!)=\sum\_{k=1}^n\log(k)$ using $$n\log(n)-n+1=\int\_1^n \log(x)\,dx\le \log(n!)\le \int\_1^{n+1} \log(x)\,dx=(n+1)\log(n+1)-n$$ Therefore, we have the inequalities $$-\left(1+\frac1n\right)\log(n+1)+1...
Let $[x]$ denote the largest integer not exceeding $x.\;$ For $n\geq 4$ we have $$[n/2]\geq (n-1)/2 \;\text { and } \quad n-[n/2]\geq n/2.$$ Therefore, for $n\geq 4$ we have $$n!\geq \prod\_{j=1+[n/2]}^n j\geq [n/2]^{(n-[n/2])}\geq ((n-1)/2)^{n/2}>1.$$ Hence $n\geq 4\implies n!^{1/n}\geq ((n-1)/2)^{n/2})^{1/n}=\sqrt {(...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
Another way considering $$A\_n=\left(\frac{1}{n!}\right)^{\frac{1}{n}}$$ Taking logarithms $$\log(A\_n)=-\frac 1n \log(n!)$$ Now, as Shailesh suggested, use [Stirling approximation](https://en.wikipedia.org/wiki/Stirling's_approximation) $$\log(n!)\approx n \log(n)-n+\frac 12 \log(2\pi n)$$ which makes $$\log(A\_n)\app...
Using Stirling's Approximation: $$n!\sim\sqrt{2\pi n}(\frac n e)^n \text{ as } n\to\infty$$ We have: \begin{align} \lim\_{n\to\infty}(\frac 1 {n!})^{\frac 1n}&=\lim\_{n\to\infty}[\sqrt{2\pi n}(\frac n e)^n]^{-\frac 1n}\\&=\lim\_{n\to\infty}[(2\pi)^{-\frac 1 {2n}}\cdot n^{-\frac 1{2n}}\cdot\frac en]\\&=\lim\_{n\to\in...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
Think about AM-GM, you get $(\frac{1}{n!})^{\frac{1}n}\le\frac{2}{n+1}$
We start by writing $$\left(\frac1{n!}\right)^{1/n}=e^{-\frac1n \log(n!)}$$ Note that we can easily bound $\log(n!)=\sum\_{k=1}^n\log(k)$ using $$n\log(n)-n+1=\int\_1^n \log(x)\,dx\le \log(n!)\le \int\_1^{n+1} \log(x)\,dx=(n+1)\log(n+1)-n$$ Therefore, we have the inequalities $$-\left(1+\frac1n\right)\log(n+1)+1...
1,628,649
If you count (4 4 3) as one combination, you cannot count (4 3 4) as another. My approach is $\dfrac{4^3}{3!}$, but obviously this does not work. I don't know why it doesn't work, and I don't know how I should solve the problem.
2016/01/27
[ "https://math.stackexchange.com/questions/1628649", "https://math.stackexchange.com", "https://math.stackexchange.com/users/308347/" ]
**An easy way :** Take , $\displaystyle a\_n=\frac{1}{n!}$. Then , $\displaystyle \frac{a\_{n+1}}{a\_n}=\frac{1}{n+1}\to 0 \text{ , as } n\to \infty $. So by **Cauchy's second limit theorem** , $\displaystyle a\_n^{1/n}\to 0 \text{ , as } n\to \infty$.
Using Stirling's Approximation: $$n!\sim\sqrt{2\pi n}(\frac n e)^n \text{ as } n\to\infty$$ We have: \begin{align} \lim\_{n\to\infty}(\frac 1 {n!})^{\frac 1n}&=\lim\_{n\to\infty}[\sqrt{2\pi n}(\frac n e)^n]^{-\frac 1n}\\&=\lim\_{n\to\infty}[(2\pi)^{-\frac 1 {2n}}\cdot n^{-\frac 1{2n}}\cdot\frac en]\\&=\lim\_{n\to\in...
53,937,335
**Complicated JOIN query as:** ``` SELECT FIRST.NAME, SECOND.FIRST_NAME, SECOND.LAST_NAME FROM FIRST_TABLE FIRST LEFT JOIN SECOND_TABLE SECOND ON (SECOND.FIRST_NAME = FIRST.NAME OR SECOND.LAST_NAME = FIRST.NAME) ``` Will result with bad performance. ***How to get better performance?***
2018/12/26
[ "https://Stackoverflow.com/questions/53937335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8142917/" ]
THIS ANSWERS THE ORIGINAL VERSION OF THE QUESTION. You may be better off with `exists`: ``` SELECT FIRST.ID, FIRST.NAME FROM FIRST_TABLE FIRST WHERE EXISTS (SELECT 1 FROM SECOND_TABLE SECOND WHERE SECOND.FIRST_NAME = FIRST.NAME) OR EXISTS (SELECT 1 FROM SECOND_TABLE SECOND WHERE SECOND.LAST_NAME = FIRST.NAME)...
You could try this, see what you get. It would depend a lot on the indexes on `FIRST_NAME` and `LAST_NAME`, but it avoids the `OR`. ``` SELECT FIRST.NAME, SECOND.FIRST_NAME, SECOND.LAST_NAME FROM FIRST_TABLE FIRST LEFT JOIN ( SELECT S1.FIRST_NAME as TEST_NAME, S1.FIRST_NAME, S1.LA...
14,163,007
Textbox or richtextbox, only thing i want is triggering a function when scrollbar moves. I already found GetScrollPos and SetScrollPos. I thought of checking scrollbar position periodically but there must be a better way. So, what is the better way? Update: Using WinForms
2013/01/04
[ "https://Stackoverflow.com/questions/14163007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/766850/" ]
Assuming WinForms, you can try pinvoking: ``` public class MyRTF: RichTextBox { private const int WM_HSCROLL = 0x114; private const int WM_VSCROLL = 0x115; private const int WM_MOUSEWHEEL = 0x20A; protected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == WM_VSCROLL || m.Msg ...
Even better -- the hidden `MouseWheel` event: <https://stackoverflow.com/a/26672097/1037948> ``` public Form1() { InitializeComponent(); textBox1.MouseWheel += textBox1_MouseWheel; } void textBox1_MouseWheel(object sender, MouseEventArgs e) { throw new NotImplementedException(); } ```
14,163,007
Textbox or richtextbox, only thing i want is triggering a function when scrollbar moves. I already found GetScrollPos and SetScrollPos. I thought of checking scrollbar position periodically but there must be a better way. So, what is the better way? Update: Using WinForms
2013/01/04
[ "https://Stackoverflow.com/questions/14163007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/766850/" ]
Assuming WinForms, you can try pinvoking: ``` public class MyRTF: RichTextBox { private const int WM_HSCROLL = 0x114; private const int WM_VSCROLL = 0x115; private const int WM_MOUSEWHEEL = 0x20A; protected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == WM_VSCROLL || m.Msg ...
Adapted the accepted answer to include HorizontalScrollPosition and VerticalScrollPosition properties (to get and set the scroll positions) and ScrollChanged event (which uses .NET's ScrollEventArgs). ScrollChanged will also fire on key navigation and text modification as well as during selection drag, control resize, ...
14,163,007
Textbox or richtextbox, only thing i want is triggering a function when scrollbar moves. I already found GetScrollPos and SetScrollPos. I thought of checking scrollbar position periodically but there must be a better way. So, what is the better way? Update: Using WinForms
2013/01/04
[ "https://Stackoverflow.com/questions/14163007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/766850/" ]
Adapted the accepted answer to include HorizontalScrollPosition and VerticalScrollPosition properties (to get and set the scroll positions) and ScrollChanged event (which uses .NET's ScrollEventArgs). ScrollChanged will also fire on key navigation and text modification as well as during selection drag, control resize, ...
Even better -- the hidden `MouseWheel` event: <https://stackoverflow.com/a/26672097/1037948> ``` public Form1() { InitializeComponent(); textBox1.MouseWheel += textBox1_MouseWheel; } void textBox1_MouseWheel(object sender, MouseEventArgs e) { throw new NotImplementedException(); } ```
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
It depends on the series that is under consideration. Typically, a 'nest' of vampires is used by mortals who are exterminating vampires - Blade, Buffy, etc will use the term. This plays into their human desire to distance their foes from humanity. In works where vampires are portrayed more sympathetically, every effo...
The first time I encountered the term was in the movie The Lost Boys (1987).
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
It depends on the series that is under consideration. Typically, a 'nest' of vampires is used by mortals who are exterminating vampires - Blade, Buffy, etc will use the term. This plays into their human desire to distance their foes from humanity. In works where vampires are portrayed more sympathetically, every effo...
the word has different connotations in different works mainly because there are different kinds of vampires john carpenters vampires had a "queen" vampire that had a psychic link to his children (its been awhile but I think the sired vampires had a basic drone level of intelligence as well) in true blood Nests are de...
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
It depends on the series that is under consideration. Typically, a 'nest' of vampires is used by mortals who are exterminating vampires - Blade, Buffy, etc will use the term. This plays into their human desire to distance their foes from humanity. In works where vampires are portrayed more sympathetically, every effo...
I think it is similar to a wasps' nest -- not something cozy but rather like what animals would build. For example, in the Fright Night remake (and maybe in the original, I don't recall) the head vampire simple stores his brood in the basement -- it is a practical place for them, out of the light but they have no comfo...
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
First mention of the phrase I could find: Percy MacKaye's "[The Canterbury Pilgrims](http://en.wikipedia.org/wiki/The_Canterbury_Pilgrims)" play (1903) > > Oh, monstrous brood, hatched in a vampire's nest ! But I will be revenged > > > As far as what a nest is, it depends on the work in question. "Night/Day Watc...
The first time I encountered the term was in the movie The Lost Boys (1987).
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
First mention of the phrase I could find: Percy MacKaye's "[The Canterbury Pilgrims](http://en.wikipedia.org/wiki/The_Canterbury_Pilgrims)" play (1903) > > Oh, monstrous brood, hatched in a vampire's nest ! But I will be revenged > > > As far as what a nest is, it depends on the work in question. "Night/Day Watc...
the word has different connotations in different works mainly because there are different kinds of vampires john carpenters vampires had a "queen" vampire that had a psychic link to his children (its been awhile but I think the sired vampires had a basic drone level of intelligence as well) in true blood Nests are de...
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
First mention of the phrase I could find: Percy MacKaye's "[The Canterbury Pilgrims](http://en.wikipedia.org/wiki/The_Canterbury_Pilgrims)" play (1903) > > Oh, monstrous brood, hatched in a vampire's nest ! But I will be revenged > > > As far as what a nest is, it depends on the work in question. "Night/Day Watc...
I think it is similar to a wasps' nest -- not something cozy but rather like what animals would build. For example, in the Fright Night remake (and maybe in the original, I don't recall) the head vampire simple stores his brood in the basement -- it is a practical place for them, out of the light but they have no comfo...
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
the word has different connotations in different works mainly because there are different kinds of vampires john carpenters vampires had a "queen" vampire that had a psychic link to his children (its been awhile but I think the sired vampires had a basic drone level of intelligence as well) in true blood Nests are de...
The first time I encountered the term was in the movie The Lost Boys (1987).
13,238
What constitutes a vampire "nest"? Is it just the home of several vampires, or does it have to actually be "nest" like (i.e. dirty, dark, stinky, unpleasant)? For instance, I've never seen the Cullen's house referred to as a nest, since they're sort of civilized. But in the first season of True Blood there were three...
2012/03/16
[ "https://scifi.stackexchange.com/questions/13238", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3102/" ]
I think it is similar to a wasps' nest -- not something cozy but rather like what animals would build. For example, in the Fright Night remake (and maybe in the original, I don't recall) the head vampire simple stores his brood in the basement -- it is a practical place for them, out of the light but they have no comfo...
The first time I encountered the term was in the movie The Lost Boys (1987).
42,865,955
I would like to have a pop up message appear every time a cell contains specific text. Everytime the word "Red Level" is in any of this cells (I22,I23,I34,I35,I36), I would like a MsgBox to appear. I am using a data validation list in all those cells mentioned above, to make sure the word "Red Level" is always the sam...
2017/03/17
[ "https://Stackoverflow.com/questions/42865955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6707084/" ]
For this, you can do it two ways (at least). If you want to stay with `If`, you need lots of `Or`: ``` If Sheets("A12").Range("I22").Value = "Red Level" or Sheets("A12").Range("I23").Value = "Red Level" or ... Then ``` But as you can see, it'll be a really long line, which isn't the most straightforward to read. Her...
The DATA tab has a wizard for data validation, The first tab allows you to define a condition. The third tab of this wizard is for a message popup. You don't need to write code for this, S it is already built in to excel. <http://www.excel-easy.com/basics/data-validation.html>
42,865,955
I would like to have a pop up message appear every time a cell contains specific text. Everytime the word "Red Level" is in any of this cells (I22,I23,I34,I35,I36), I would like a MsgBox to appear. I am using a data validation list in all those cells mentioned above, to make sure the word "Red Level" is always the sam...
2017/03/17
[ "https://Stackoverflow.com/questions/42865955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6707084/" ]
For this, you can do it two ways (at least). If you want to stay with `If`, you need lots of `Or`: ``` If Sheets("A12").Range("I22").Value = "Red Level" or Sheets("A12").Range("I23").Value = "Red Level" or ... Then ``` But as you can see, it'll be a really long line, which isn't the most straightforward to read. Her...
why not using find on the wanted cells range? ``` Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Worksheets("A12").Range("I22,I23,I34:I36").Find(what:="Red Level", LookIn:=xlValues, lookat:=xlWhole) Is Nothing Then MsgBox "Please call maintenance immediately to refill reservoir" End Sub ``` ...
42,865,955
I would like to have a pop up message appear every time a cell contains specific text. Everytime the word "Red Level" is in any of this cells (I22,I23,I34,I35,I36), I would like a MsgBox to appear. I am using a data validation list in all those cells mentioned above, to make sure the word "Red Level" is always the sam...
2017/03/17
[ "https://Stackoverflow.com/questions/42865955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6707084/" ]
You could use the worksheet's MATCH but it will not work on discontiguous cells so two checks must be made. ``` Private Sub Worksheet_SelectionChange(ByVal Target As Range) if not iserror(application.match("red level", Range("I22:I23"), 0)) or _ not iserror(application.match("red level", Range("I34:I36"), 0...
The DATA tab has a wizard for data validation, The first tab allows you to define a condition. The third tab of this wizard is for a message popup. You don't need to write code for this, S it is already built in to excel. <http://www.excel-easy.com/basics/data-validation.html>
42,865,955
I would like to have a pop up message appear every time a cell contains specific text. Everytime the word "Red Level" is in any of this cells (I22,I23,I34,I35,I36), I would like a MsgBox to appear. I am using a data validation list in all those cells mentioned above, to make sure the word "Red Level" is always the sam...
2017/03/17
[ "https://Stackoverflow.com/questions/42865955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6707084/" ]
You could use the worksheet's MATCH but it will not work on discontiguous cells so two checks must be made. ``` Private Sub Worksheet_SelectionChange(ByVal Target As Range) if not iserror(application.match("red level", Range("I22:I23"), 0)) or _ not iserror(application.match("red level", Range("I34:I36"), 0...
why not using find on the wanted cells range? ``` Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Worksheets("A12").Range("I22,I23,I34:I36").Find(what:="Red Level", LookIn:=xlValues, lookat:=xlWhole) Is Nothing Then MsgBox "Please call maintenance immediately to refill reservoir" End Sub ``` ...
69,547,905
I'm trying to deploy an app on heroku but i can't if i use dotenv. This code doesn't work: ```js mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true }, () => { console.log("Connected to db successfully"); }); ``` But this does: ```js mongoose.connect("mongodb+srv://test:test@cluster0.j0you.mongodb.net/...
2021/10/12
[ "https://Stackoverflow.com/questions/69547905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14716818/" ]
I had to go to heroku dashboard> settings> config vars and then add the key as MONGO\_URI and the mongo url value that mongodb gave me
You need to make sure of two things 1. go to heroku dashboard> settings> config vars and then add the key as MONGO\_URI and the mongo url value that mongodb gave me... this info is in the .env file of your project. you might have with another name like DATA\_BASE\_MONGO just make sure to use that name and key in the c...
6,043,381
I have the following query (slightly amended for clarity): ``` CREATE PROCEDURE Kctc.CaseTasks_GetCaseTasks @CaseNumber int ... other parameters ,@ChangedBefore datetime ,@ChangedAfter datetime AS SELECT Kctc.CaseTasks.CaseTaskId ...blah blah blah FROM Kctc.CaseTasks ... some joins here WHERE ... some norm...
2011/05/18
[ "https://Stackoverflow.com/questions/6043381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164923/" ]
As a first cut you might try putting an index on the table Kctc.FieldChanges on the RecordId, TableName, and DateOfChange fields (one single index with all three fields) and see if that helps. Share and enjoy.
This is **not going to be a "good" solution**, but it might be better than what's happening right now: ``` SELECT Kctc.CaseTasks.CaseTaskId ...blah blah blah FROM Kctc.CaseTasks ... some joins here LEFT JOIN ( SELECT RecordID FROM Kctc.FieldChanges WHERE Kctc.FieldChanges.TableName = 'CaseTasks...
6,043,381
I have the following query (slightly amended for clarity): ``` CREATE PROCEDURE Kctc.CaseTasks_GetCaseTasks @CaseNumber int ... other parameters ,@ChangedBefore datetime ,@ChangedAfter datetime AS SELECT Kctc.CaseTasks.CaseTaskId ...blah blah blah FROM Kctc.CaseTasks ... some joins here WHERE ... some norm...
2011/05/18
[ "https://Stackoverflow.com/questions/6043381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164923/" ]
My first instinct is to limit the result set ``` SELECT * FROM Kctc.FieldChanges WHERE Kctc.FieldChanges.RecordId = Kctc.CaseTasks.CaseTaskId AND Kctc.FieldChanges.TableName = 'CaseTasks' AND Kctc.FieldChanges.DateOfChange BETWEEN ISNULL(@ChangedAfter, '2000/01/01') AND ISNULL(@ChangedBefore, ...
This is **not going to be a "good" solution**, but it might be better than what's happening right now: ``` SELECT Kctc.CaseTasks.CaseTaskId ...blah blah blah FROM Kctc.CaseTasks ... some joins here LEFT JOIN ( SELECT RecordID FROM Kctc.FieldChanges WHERE Kctc.FieldChanges.TableName = 'CaseTasks...
6,043,381
I have the following query (slightly amended for clarity): ``` CREATE PROCEDURE Kctc.CaseTasks_GetCaseTasks @CaseNumber int ... other parameters ,@ChangedBefore datetime ,@ChangedAfter datetime AS SELECT Kctc.CaseTasks.CaseTaskId ...blah blah blah FROM Kctc.CaseTasks ... some joins here WHERE ... some norm...
2011/05/18
[ "https://Stackoverflow.com/questions/6043381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/164923/" ]
Adding `SET ARITHABORT ON` to the stored procedure got it to execute in less than 1 second. I have no idea what it means. Presumably 'stop arsing about'.
This is **not going to be a "good" solution**, but it might be better than what's happening right now: ``` SELECT Kctc.CaseTasks.CaseTaskId ...blah blah blah FROM Kctc.CaseTasks ... some joins here LEFT JOIN ( SELECT RecordID FROM Kctc.FieldChanges WHERE Kctc.FieldChanges.TableName = 'CaseTasks...
67,588,803
I have a list of lists in Python that essentially represent a table. I know I should have used a pandas dataframe to accomplish this, but hindsight is 20/20. I digress...below is an example list of what I'm talking about. The overarching list variable is comprised of these nested lists: ``` ['Store number', 2, 3, 4, ...
2021/05/18
[ "https://Stackoverflow.com/questions/67588803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15154835/" ]
You can sort a list of indexes from a `range`, based on the values in one of your lists. Then you can use the indexes reorder the original three lists: ``` store = ['Store number', 2, 3, 4, 1, 5] var1 = ['Variable 1', 82, 99, 44, 32, 65] str1 = ['String 1', 'cat', 'dog', 'lizard', 'alligator', 'crocodile'] sort_index...
If you must use your current data structure, here is a function that will do what you want. Note there are probably much more clever approaches, but this will work. given: ``` lolists = [['Store number', 2, 3, 4, 1, 5], ['Variable 1', 82, 99, 44, 32, 65], ['String 1', 'cat', 'dog', 'lizard', '...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Case 2 seems the opposite as case 3, so I don't think you can combine the `Pattern`s. For case 2, your `Pattern` could look like: ``` Pattern pattern = Pattern.compile("(\\s|^)Hello(\\s|$)", Pattern.CASE_INSENSITIVE); ``` In this case we surround the keyword by whitespace or beginning/end of input. For case 3, y...
Use `(?:^|\s)` ("start of text or whitespace") instead of the first `\b`, and `(?:$|\s)` ("end of text or whitespace") instead of the second `\b` in your regex.
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Case 2 seems the opposite as case 3, so I don't think you can combine the `Pattern`s. For case 2, your `Pattern` could look like: ``` Pattern pattern = Pattern.compile("(\\s|^)Hello(\\s|$)", Pattern.CASE_INSENSITIVE); ``` In this case we surround the keyword by whitespace or beginning/end of input. For case 3, y...
The problem comes from the way that "exact word" is defined. It is not just whitespace that can surround the word to make it a word. For example in most circumstances one would want an exact word match for 'Hello' to work with. "hello there", "That young man just said hello to that other young man" and "I wish people ...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Case 2 seems the opposite as case 3, so I don't think you can combine the `Pattern`s. For case 2, your `Pattern` could look like: ``` Pattern pattern = Pattern.compile("(\\s|^)Hello(\\s|$)", Pattern.CASE_INSENSITIVE); ``` In this case we surround the keyword by whitespace or beginning/end of input. For case 3, y...
Try maybe this way ``` String patternStr = "(?i)(?<=\\s|^)"+Pattern.quote(searchedStubstring)+"(?=\\s|$)"; ``` (?<=...) and (?=...) is positive [look behind and ahead](http://www.regular-expressions.info/lookaround.html) so it will check if before your `searchedStubstring` will have * white-space `\\s` or start of...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Case 2 seems the opposite as case 3, so I don't think you can combine the `Pattern`s. For case 2, your `Pattern` could look like: ``` Pattern pattern = Pattern.compile("(\\s|^)Hello(\\s|$)", Pattern.CASE_INSENSITIVE); ``` In this case we surround the keyword by whitespace or beginning/end of input. For case 3, y...
for example if your word want to have special char (for example here '#') at the begining and end of this you have to write the following: ``` Pattern p = Pattern.compile("(\\s|^|#)"+word+"(\\s|\\#|$)", Pattern.CASE_INSENSITIVE); ``` if you want exact match: ``` Pattern p = Pattern.compile("(\\s|^)"+word+"(\\s|$)",...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Use `(?:^|\s)` ("start of text or whitespace") instead of the first `\b`, and `(?:$|\s)` ("end of text or whitespace") instead of the second `\b` in your regex.
The problem comes from the way that "exact word" is defined. It is not just whitespace that can surround the word to make it a word. For example in most circumstances one would want an exact word match for 'Hello' to work with. "hello there", "That young man just said hello to that other young man" and "I wish people ...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Use `(?:^|\s)` ("start of text or whitespace") instead of the first `\b`, and `(?:$|\s)` ("end of text or whitespace") instead of the second `\b` in your regex.
Try maybe this way ``` String patternStr = "(?i)(?<=\\s|^)"+Pattern.quote(searchedStubstring)+"(?=\\s|$)"; ``` (?<=...) and (?=...) is positive [look behind and ahead](http://www.regular-expressions.info/lookaround.html) so it will check if before your `searchedStubstring` will have * white-space `\\s` or start of...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Use `(?:^|\s)` ("start of text or whitespace") instead of the first `\b`, and `(?:$|\s)` ("end of text or whitespace") instead of the second `\b` in your regex.
for example if your word want to have special char (for example here '#') at the begining and end of this you have to write the following: ``` Pattern p = Pattern.compile("(\\s|^|#)"+word+"(\\s|\\#|$)", Pattern.CASE_INSENSITIVE); ``` if you want exact match: ``` Pattern p = Pattern.compile("(\\s|^)"+word+"(\\s|$)",...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
The problem comes from the way that "exact word" is defined. It is not just whitespace that can surround the word to make it a word. For example in most circumstances one would want an exact word match for 'Hello' to work with. "hello there", "That young man just said hello to that other young man" and "I wish people ...
for example if your word want to have special char (for example here '#') at the begining and end of this you have to write the following: ``` Pattern p = Pattern.compile("(\\s|^|#)"+word+"(\\s|\\#|$)", Pattern.CASE_INSENSITIVE); ``` if you want exact match: ``` Pattern p = Pattern.compile("(\\s|^)"+word+"(\\s|$)",...
18,045,410
I am new to Django and am trying to have a user select from a drop-down of choices, then have their choice pass to my next view class so that the record can be edited. Right now my code passes the name of the disease but not the PK from the database. It seems like a simple problem but I'm not sure how to solve it. I ge...
2013/08/04
[ "https://Stackoverflow.com/questions/18045410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646813/" ]
Try maybe this way ``` String patternStr = "(?i)(?<=\\s|^)"+Pattern.quote(searchedStubstring)+"(?=\\s|$)"; ``` (?<=...) and (?=...) is positive [look behind and ahead](http://www.regular-expressions.info/lookaround.html) so it will check if before your `searchedStubstring` will have * white-space `\\s` or start of...
for example if your word want to have special char (for example here '#') at the begining and end of this you have to write the following: ``` Pattern p = Pattern.compile("(\\s|^|#)"+word+"(\\s|\\#|$)", Pattern.CASE_INSENSITIVE); ``` if you want exact match: ``` Pattern p = Pattern.compile("(\\s|^)"+word+"(\\s|$)",...
17,376,575
I'm working on a sudoku game and I have a list of sudoku games that I can save. I currently have the following serializer classes to save the games: ``` /// <summary> /// A method to serialize the game repository /// </summary> /// <param name="filename">A string representation of the output file name<...
2013/06/29
[ "https://Stackoverflow.com/questions/17376575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try to save the serialized objects in a SQLite table. The database can be encrypted with a password, and it is very simple as you don't have to write any code to encrypt just add password in the connection string. Advantages: You don't have lot of scattered files, easy to code and read write to table. Disadvantage: If...
Yes ofcourse you can encrypt and decrypt. I will give you a sample code. Your encrypt class will be like this ``` using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Security.Cryptography; using System.Text; using System.IO; namespace demo.encry { public class Crypto...
17,376,575
I'm working on a sudoku game and I have a list of sudoku games that I can save. I currently have the following serializer classes to save the games: ``` /// <summary> /// A method to serialize the game repository /// </summary> /// <param name="filename">A string representation of the output file name<...
2013/06/29
[ "https://Stackoverflow.com/questions/17376575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Of course a symmetric key can be persisted – it's just like any other data. You could save it to a file for instance. But the user would obviously recover the key from the file in that case. This is a fundamental property of encryption. Encryption substitutes the confidentiality of an arbitrary amount of data (the pla...
Yes ofcourse you can encrypt and decrypt. I will give you a sample code. Your encrypt class will be like this ``` using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Security.Cryptography; using System.Text; using System.IO; namespace demo.encry { public class Crypto...
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
The minimum key size for encrypting 128 bytes would be 1112 bits, when you are calling `Encrypt` with OAEP off. Note that setting the key size like this `rsa.KeySize = 1024` won't help, you need to actually generate they key of the right size and use them. This is what worked for me: ``` using System; using System.IO...
Do you real need the custom padding? If not you could just use [RSACryptoServiceProvider.SignData Method](http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.signdata.aspx)
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
If you want to *sign* you do not want to *encrypt*. Signatures and encryption are distinct algorithms. It does not help that there is a well-known signature algorithm called RSA, and a well-known asymmetric encryption algorithm also called RSA, and that the signature algorithm was first presented (and still is in many ...
Apparently, according to this question — [how to use RSA to encrypt files (huge data) in C#](https://stackoverflow.com/questions/1199058/how-to-use-rsa-to-encrypt-files-huge-data-in-c) — RSA can only encrypt data shorter than its key length. Bizarre. The MSDN docs for[`RSACryptoServiceProvider.Encrypt()](http://msdn.m...
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
If you want to *sign* you do not want to *encrypt*. Signatures and encryption are distinct algorithms. It does not help that there is a well-known signature algorithm called RSA, and a well-known asymmetric encryption algorithm also called RSA, and that the signature algorithm was first presented (and still is in many ...
See <http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.encrypt.aspx>. The exception thrown is probably "The length of the rgb parameter is greater than the maximum allowed length."
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
If you want to *sign* you do not want to *encrypt*. Signatures and encryption are distinct algorithms. It does not help that there is a well-known signature algorithm called RSA, and a well-known asymmetric encryption algorithm also called RSA, and that the signature algorithm was first presented (and still is in many ...
Usually RSA encryption has padding, and since your encrypted data size goes to the key size, there is no space for padding. Try to use longer key or less data size to encrypt.
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
The minimum key size for encrypting 128 bytes would be 1112 bits, when you are calling `Encrypt` with OAEP off. Note that setting the key size like this `rsa.KeySize = 1024` won't help, you need to actually generate they key of the right size and use them. This is what worked for me: ``` using System; using System.IO...
Usually RSA encryption has padding, and since your encrypted data size goes to the key size, there is no space for padding. Try to use longer key or less data size to encrypt.
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
Apparently, according to this question — [how to use RSA to encrypt files (huge data) in C#](https://stackoverflow.com/questions/1199058/how-to-use-rsa-to-encrypt-files-huge-data-in-c) — RSA can only encrypt data shorter than its key length. Bizarre. The MSDN docs for[`RSACryptoServiceProvider.Encrypt()](http://msdn.m...
See <http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.encrypt.aspx>. The exception thrown is probably "The length of the rgb parameter is greater than the maximum allowed length."
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
If you want to *sign* you do not want to *encrypt*. Signatures and encryption are distinct algorithms. It does not help that there is a well-known signature algorithm called RSA, and a well-known asymmetric encryption algorithm also called RSA, and that the signature algorithm was first presented (and still is in many ...
Do you real need the custom padding? If not you could just use [RSACryptoServiceProvider.SignData Method](http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.signdata.aspx)
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
The minimum key size for encrypting 128 bytes would be 1112 bits, when you are calling `Encrypt` with OAEP off. Note that setting the key size like this `rsa.KeySize = 1024` won't help, you need to actually generate they key of the right size and use them. This is what worked for me: ``` using System; using System.IO...
Apparently, according to this question — [how to use RSA to encrypt files (huge data) in C#](https://stackoverflow.com/questions/1199058/how-to-use-rsa-to-encrypt-files-huge-data-in-c) — RSA can only encrypt data shorter than its key length. Bizarre. The MSDN docs for[`RSACryptoServiceProvider.Encrypt()](http://msdn.m...
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
Apparently, according to this question — [how to use RSA to encrypt files (huge data) in C#](https://stackoverflow.com/questions/1199058/how-to-use-rsa-to-encrypt-files-huge-data-in-c) — RSA can only encrypt data shorter than its key length. Bizarre. The MSDN docs for[`RSACryptoServiceProvider.Encrypt()](http://msdn.m...
Do you real need the custom padding? If not you could just use [RSACryptoServiceProvider.SignData Method](http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.signdata.aspx)
6,299,460
I am completely new to cryptography and I need to sign a byte array of 128 bytes with an RSA key i have generated with C sharp. The key must be 1024 bits. I have found a few examples of how to use RSA with C sharp and the code I'm currently trying to use is: ``` public static void AssignParameter() { const int PR...
2011/06/09
[ "https://Stackoverflow.com/questions/6299460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1928874/" ]
The minimum key size for encrypting 128 bytes would be 1112 bits, when you are calling `Encrypt` with OAEP off. Note that setting the key size like this `rsa.KeySize = 1024` won't help, you need to actually generate they key of the right size and use them. This is what worked for me: ``` using System; using System.IO...
See <http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.encrypt.aspx>. The exception thrown is probably "The length of the rgb parameter is greater than the maximum allowed length."
41,339,035
I do have a select box, like so: ``` <select id="fatherhoodDocument" name="fatherhoodDocument" style="width:250px;" data-bvalidator="myCyrillicDigitsAndSpaceValidator,required" data-bvalidator-modifier="myCapsModifier"> <option value="[$i18n.getString( "select" )]">[$i18n.getString( "select" )]</option...
2016/12/27
[ "https://Stackoverflow.com/questions/41339035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/588519/" ]
Well, on page load/refresh, `$('#fatherhoodDocument')` hasn't changed yet so the change handler isn't called. What you could do is assign the change handler to a variable and call that on document ready **and** on `$('#fatherhoodDocument')` change. ``` $(function () { var ddFatherhoodDocument = $('#fatherhoodDocumen...
I am not why your SELECT remains unchanged on page refresh. However if you want to keep very first option selected after page refresh just try to add "selected" attribute. check [this](http://www.w3schools.com/tags/att_option_selected.asp). ```html <select id="fatherhoodDocument" name="fatherhoodDocument" style="width...
41,339,035
I do have a select box, like so: ``` <select id="fatherhoodDocument" name="fatherhoodDocument" style="width:250px;" data-bvalidator="myCyrillicDigitsAndSpaceValidator,required" data-bvalidator-modifier="myCapsModifier"> <option value="[$i18n.getString( "select" )]">[$i18n.getString( "select" )]</option...
2016/12/27
[ "https://Stackoverflow.com/questions/41339035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/588519/" ]
You could do something like as shown below,you can define the function under a different function name and call it on ready of the document as well as on change of the dropdown ,in the on ready function the changeData function will not be called unless the dropdown has something selected in it other than the default se...
I am not why your SELECT remains unchanged on page refresh. However if you want to keep very first option selected after page refresh just try to add "selected" attribute. check [this](http://www.w3schools.com/tags/att_option_selected.asp). ```html <select id="fatherhoodDocument" name="fatherhoodDocument" style="width...
14,404,801
``` html{ background: url(/assets/flower.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } ``` How can I make this code randomly choose from a selected number of pictures as background. I am us...
2013/01/18
[ "https://Stackoverflow.com/questions/14404801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1990339/" ]
In your view file where you would like to display the background image, add this line ``` <style type="text/css"> html { background: url(<%= randomized_background_image %>) no-repeat center center fixed; } </style> ``` Now in your application\_helper ``` def randomized_background_image images = ["assets/...
The easiest way is to create an actions with redirect to a random image the browser will follow the redirect. app/controller/background\_controller.rb ``` class BackgroundController < ApplicationController def image redirect_to "/assets/images/background_#{rand(10)}.jpg" end end ``` This will randomly redir...
14,404,801
``` html{ background: url(/assets/flower.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } ``` How can I make this code randomly choose from a selected number of pictures as background. I am us...
2013/01/18
[ "https://Stackoverflow.com/questions/14404801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1990339/" ]
The easiest way is to create an actions with redirect to a random image the browser will follow the redirect. app/controller/background\_controller.rb ``` class BackgroundController < ApplicationController def image redirect_to "/assets/images/background_#{rand(10)}.jpg" end end ``` This will randomly redir...
I did this by creating a random class name in the view like this: ``` <div class="homepage-banner-<%= rand(1..10) %>"> ``` Then I just added multiple images to my css like this: ``` .homepage-banner-1 background-image: image-url('homepage/homepage-feature-1.jpg') .homepage-banner-2 background-image: image-url(...
14,404,801
``` html{ background: url(/assets/flower.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } ``` How can I make this code randomly choose from a selected number of pictures as background. I am us...
2013/01/18
[ "https://Stackoverflow.com/questions/14404801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1990339/" ]
In your view file where you would like to display the background image, add this line ``` <style type="text/css"> html { background: url(<%= randomized_background_image %>) no-repeat center center fixed; } </style> ``` Now in your application\_helper ``` def randomized_background_image images = ["assets/...
I did this by creating a random class name in the view like this: ``` <div class="homepage-banner-<%= rand(1..10) %>"> ``` Then I just added multiple images to my css like this: ``` .homepage-banner-1 background-image: image-url('homepage/homepage-feature-1.jpg') .homepage-banner-2 background-image: image-url(...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
John gives a more detailed description of this aspect of the crucifixion than either Mark or Mathew: > > And they crucify Him, and divide His garments among *themselves*, casting a lot for them *to decide* who should take what. (Mark 15:24 DLNT) > > > And having crucified Him, they divided His garments among *thems...
I believe that the tunic that was not torn represents the Apostolic gift (John 19:23-24). We have the 5 fold ministry, where the Apostolic gift embraces all the other 4 (Ephesians 4:11-13). The purple tunic represents the entire operation. We should embrace all the other gifts so that the Apostolic foundation can work ...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
I believe that the tunic that was not torn represents the Apostolic gift (John 19:23-24). We have the 5 fold ministry, where the Apostolic gift embraces all the other 4 (Ephesians 4:11-13). The purple tunic represents the entire operation. We should embrace all the other gifts so that the Apostolic foundation can work ...
Christ came in the fullness of time close to the 4,000 year mark after Adam. The fourth day is when the material universe (cosmos) came to be and light was divided from darkness. He took on the sin of the world and His garment was symbolically divided into four pieces (for the four corners of the world). The four gospe...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
'**The tunic was seamless, woven in one piece from top to bottom**'. That's what "*sewn from the top*" means. It's a special type of weaving - something akin to seamless knitting (on circular needles) except through weaving. Weaving a seamless garment was a special skill, out of the ordinary and exceedingly rare - so ...
What does it signify to tear Christ's robe into 4 pieces? Explainations given do not give the meaning ? Its the question am asking
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
John gives a more detailed description of this aspect of the crucifixion than either Mark or Mathew: > > And they crucify Him, and divide His garments among *themselves*, casting a lot for them *to decide* who should take what. (Mark 15:24 DLNT) > > > And having crucified Him, they divided His garments among *thems...
The garment had no seams , representing there is no hole or crack in which to enter Heaven or be saved but only through Jesus Christ and his sacrifice and grace . When Jesus entered the throne to His Father He was given the garment of holiness and praise and we will also . Casting lots or trying to buy your way into sa...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
What does it signify to tear Christ's robe into 4 pieces? Explainations given do not give the meaning ? Its the question am asking
Christ came in the fullness of time close to the 4,000 year mark after Adam. The fourth day is when the material universe (cosmos) came to be and light was divided from darkness. He took on the sin of the world and His garment was symbolically divided into four pieces (for the four corners of the world). The four gospe...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
'**The tunic was seamless, woven in one piece from top to bottom**'. That's what "*sewn from the top*" means. It's a special type of weaving - something akin to seamless knitting (on circular needles) except through weaving. Weaving a seamless garment was a special skill, out of the ordinary and exceedingly rare - so ...
Christ came in the fullness of time close to the 4,000 year mark after Adam. The fourth day is when the material universe (cosmos) came to be and light was divided from darkness. He took on the sin of the world and His garment was symbolically divided into four pieces (for the four corners of the world). The four gospe...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
John gives a more detailed description of this aspect of the crucifixion than either Mark or Mathew: > > And they crucify Him, and divide His garments among *themselves*, casting a lot for them *to decide* who should take what. (Mark 15:24 DLNT) > > > And having crucified Him, they divided His garments among *thems...
Christ came in the fullness of time close to the 4,000 year mark after Adam. The fourth day is when the material universe (cosmos) came to be and light was divided from darkness. He took on the sin of the world and His garment was symbolically divided into four pieces (for the four corners of the world). The four gospe...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
John gives a more detailed description of this aspect of the crucifixion than either Mark or Mathew: > > And they crucify Him, and divide His garments among *themselves*, casting a lot for them *to decide* who should take what. (Mark 15:24 DLNT) > > > And having crucified Him, they divided His garments among *thems...
'**The tunic was seamless, woven in one piece from top to bottom**'. That's what "*sewn from the top*" means. It's a special type of weaving - something akin to seamless knitting (on circular needles) except through weaving. Weaving a seamless garment was a special skill, out of the ordinary and exceedingly rare - so ...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
The clothing of Christ is symbolic of the Christian churches. The doctrine, ritual, liturgy etc. these are the outer coverings of God. They point us toward God. They are distinct from God in some ways yet are owned by Christ. The tunic represents the Holy apostolic church that will remain intact until the end of days. ...
Christ came in the fullness of time close to the 4,000 year mark after Adam. The fourth day is when the material universe (cosmos) came to be and light was divided from darkness. He took on the sin of the world and His garment was symbolically divided into four pieces (for the four corners of the world). The four gospe...
27,095
Matthew, Mark, and John record casting lots to divide Jesus' clothing. John adds the Old Testament quote from Psalm 22:18 and provides other details: > > When the soldiers had crucified Jesus, they took his garments and divided them into four parts, one part for each soldier; also his tunic. But the tunic was seamles...
2017/02/20
[ "https://hermeneutics.stackexchange.com/questions/27095", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/8450/" ]
The garment had no seams , representing there is no hole or crack in which to enter Heaven or be saved but only through Jesus Christ and his sacrifice and grace . When Jesus entered the throne to His Father He was given the garment of holiness and praise and we will also . Casting lots or trying to buy your way into sa...
Christ came in the fullness of time close to the 4,000 year mark after Adam. The fourth day is when the material universe (cosmos) came to be and light was divided from darkness. He took on the sin of the world and His garment was symbolically divided into four pieces (for the four corners of the world). The four gospe...
33,650,063
I need to combine two Bytes into one int value. I receive from my camera a 16bit Image were two successive bytes have the intensity value of one pixel. My goal is to combine these two bytes into one "int" vale. I manage to do this using the following code: ``` for (int i = 0; i < VectorLength * 2; i = i + 2) { Ne...
2015/11/11
[ "https://Stackoverflow.com/questions/33650063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5210481/" ]
You could use the equivalent to the union of c. Im not sure if faster, but more elegant: ``` [StructLayout(LayoutKind.Explicit)] struct byte_array { [FieldOffset(0)] public byte byte1; [FieldOffset(1)] public byte byte2; [FieldOffset(0)] public short int0; } ``` use it like this: ``` byte_array ba = n...
You can achieve a small performance increase by using unsafe pointers to iterate the arrays. The following code assumes that `source` is the input byte array (`buffer.Array` in your case). It also assumes that `source` has an even number of elements. In production code you would obviously have to check these things. `...
33,650,063
I need to combine two Bytes into one int value. I receive from my camera a 16bit Image were two successive bytes have the intensity value of one pixel. My goal is to combine these two bytes into one "int" vale. I manage to do this using the following code: ``` for (int i = 0; i < VectorLength * 2; i = i + 2) { Ne...
2015/11/11
[ "https://Stackoverflow.com/questions/33650063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5210481/" ]
Assuming you can (re-)define `NewImageVector` as a `short[]`, and every two consecutive bytes in `Buffer` should be transformed into a `short` (which basically what you're doing now, only you cast to an `int` afterwards), you can use [Buffer.BlockCopy](https://msdn.microsoft.com/en-us/library/system.buffer.blockcopy(v=...
You could use the equivalent to the union of c. Im not sure if faster, but more elegant: ``` [StructLayout(LayoutKind.Explicit)] struct byte_array { [FieldOffset(0)] public byte byte1; [FieldOffset(1)] public byte byte2; [FieldOffset(0)] public short int0; } ``` use it like this: ``` byte_array ba = n...
33,650,063
I need to combine two Bytes into one int value. I receive from my camera a 16bit Image were two successive bytes have the intensity value of one pixel. My goal is to combine these two bytes into one "int" vale. I manage to do this using the following code: ``` for (int i = 0; i < VectorLength * 2; i = i + 2) { Ne...
2015/11/11
[ "https://Stackoverflow.com/questions/33650063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5210481/" ]
Assuming you can (re-)define `NewImageVector` as a `short[]`, and every two consecutive bytes in `Buffer` should be transformed into a `short` (which basically what you're doing now, only you cast to an `int` afterwards), you can use [Buffer.BlockCopy](https://msdn.microsoft.com/en-us/library/system.buffer.blockcopy(v=...
You can achieve a small performance increase by using unsafe pointers to iterate the arrays. The following code assumes that `source` is the input byte array (`buffer.Array` in your case). It also assumes that `source` has an even number of elements. In production code you would obviously have to check these things. `...
431,943
So I find myself needing to apply global Moran's I across ~20 variables (as in ~20 instances of univariate autocorrelation for each variable, not attempted multivariate spatial autocorrelation). I'm using R and the sf + spdep packages. Where `data_lisa` is a sf object structured: ``` id | var_a | var_b | ... | var_n ...
2022/05/24
[ "https://gis.stackexchange.com/questions/431943", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/206106/" ]
Make a vector of your variable names either by subsetting the column names or programmatically, eg: ``` vars = names(data_lisa)[2:5] vars = paste0("var_",letters[1:4]) ``` For an example, I'm using the `COL.OLD` data you get from `?moran.mc` and this set of variables: ``` vars = c("AREA_PL","PERIMETER","CRIME","POL...
As a possible alternative to the approach suggested by Spacedman I propose one based on `{dplyr}` and iterating via a for cycle over a vector of names of your variables of interest. As I don't have access to your `data_lisa` object I am using the well known & much loved North Carolina shapefile that ships with the `{s...
27,415,471
We are developing an app in Appcelerator Titanium and using PushWoosh to send notifications. We have tried with no success to send a notification that opens an specific page in the app. Think of an Inbox, where the user gets its messages, when a message is received, a notification shows up notifying the user on the ne...
2014/12/11
[ "https://Stackoverflow.com/questions/27415471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072962/" ]
``` ^(?!0?0\.00$)\d{1,2}\.\d{2}$ ``` You can simply use this.See demo. <https://regex101.com/r/qB0jV1/10>
I think you don't want to allow `0.00` or `00.00` ``` ^(?!00?\.00$)\d{1,2}(?:\.\d{2})?$ ``` OR ``` ^(?!00?\.00$)\d{1,2}(?:\.\d{1,2})?$ ``` [DEMO](https://regex101.com/r/qB0jV1/11) Negative lookahead at the start `(?!00?\.00$)` asserts that the number going to match wouldn't be `00.00` or `0.00`
27,415,471
We are developing an app in Appcelerator Titanium and using PushWoosh to send notifications. We have tried with no success to send a notification that opens an specific page in the app. Think of an Inbox, where the user gets its messages, when a message is received, a notification shows up notifying the user on the ne...
2014/12/11
[ "https://Stackoverflow.com/questions/27415471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072962/" ]
``` ^(?!0?0\.00$)\d{1,2}\.\d{2}$ ``` You can simply use this.See demo. <https://regex101.com/r/qB0jV1/10>
So why do you have to beat your self up with a complex regex. Why not a number comparison? ``` function validNum (num) { num = parserFloat(num); return num > 0 && num < 100; } ``` Want only two decimal places ? ``` function validNum (num) { num = parseFloat((num + "").replace(/^(.*\.\d\d)\d*$/, '$1')); ...
27,415,471
We are developing an app in Appcelerator Titanium and using PushWoosh to send notifications. We have tried with no success to send a notification that opens an specific page in the app. Think of an Inbox, where the user gets its messages, when a message is received, a notification shows up notifying the user on the ne...
2014/12/11
[ "https://Stackoverflow.com/questions/27415471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072962/" ]
So why do you have to beat your self up with a complex regex. Why not a number comparison? ``` function validNum (num) { num = parserFloat(num); return num > 0 && num < 100; } ``` Want only two decimal places ? ``` function validNum (num) { num = parseFloat((num + "").replace(/^(.*\.\d\d)\d*$/, '$1')); ...
I think you don't want to allow `0.00` or `00.00` ``` ^(?!00?\.00$)\d{1,2}(?:\.\d{2})?$ ``` OR ``` ^(?!00?\.00$)\d{1,2}(?:\.\d{1,2})?$ ``` [DEMO](https://regex101.com/r/qB0jV1/11) Negative lookahead at the start `(?!00?\.00$)` asserts that the number going to match wouldn't be `00.00` or `0.00`
53,896,970
I am getting coordinates with FusedLocationProviderClient in my application on a button click to store into a database. The issue is that when I reboot the phone or the emulator the `.getLastLocation()` is null and I have to click another time the button i order for this to work. Is there a way to force to get a curren...
2018/12/22
[ "https://Stackoverflow.com/questions/53896970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2975588/" ]
When getLastLocation() is null, you need to make a LocationRequest ``` private LocationRequest locationRequest; private LocationCallback locationCallback; ... locationRequest = LocationRequest.create(); locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); locationRequest.setInterval(20 * 1000); locat...
When the phone is rebooted the cached last location is lost so if you didnt open up an app that uses GPS like google maps or something then there will be no last location. There never has to be a location returned to you, you should always assume it could be null. If you want to get location, you just need to use Loc...
6,275,356
I have an editable checkbox in my jQGrid with the values `editoptions: { value: "Yes:No" }` But whatever the value is i am getting back on controller string value "Yes:No", not single value "Yes" of "No", so i am getting it like that: When it is checked i am getting this: ``` form["MyCheckBox"] = "Yes:No". ``` Wh...
2011/06/08
[ "https://Stackoverflow.com/questions/6275356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/735490/" ]
Try this: ``` editoptions: { value:"True:False" }, editable:true, edittype:'checkbox', formatter: "checkbox", formatoptions: {disabled : false} ```
It seems to me you describe the bug which is already fixed in the last version of jqGrid from GitHub. I recommend you to download the version from [here](https://github.com/tonytomov/jqGrid). See [here](http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3ahow_to_install#development_installation) for the description of ...
8,673,684
I can't use boost::spirit in my environment. But I would like to use STL and boost as much as possible to build my own expression evaluator. Is there such an alternative to boost::spirit?
2011/12/29
[ "https://Stackoverflow.com/questions/8673684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/749973/" ]
The following code includes unit tests and a complete parser I wrote in an about 90 minute session at ACCU 200x (8 or 9). If you need more, it might be easy enough to extend. You can make it do doubles by defining `Parse::value_type`, or extracting it into a separate header file and make it a template class. Or you ca...
YACC++ is a very good tool for parser generator for c++ applications. ANTLR is also agood option howver that does not have good documentation for its usage in C/C++.
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
Putting in place a better system for evaluating teaching than today's student evaluation forms would be a good start. Getting serious about the assessment of student learning outcomes (rather than simply assigning grades) would also be extremely helpful.
You don't hire people who don't take teaching seriously, and if you do happen to hire them accidentally, you deny them tenure and kick them out. More generally, you reward those who take teaching seriously and/or punish those who don't. This means you give the former time (by reducing the number of classes they have t...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
Putting in place a better system for evaluating teaching than today's student evaluation forms would be a good start. Getting serious about the assessment of student learning outcomes (rather than simply assigning grades) would also be extremely helpful.
The fundamental problem is that research and teaching are two *entirely* different skills. Imagine you're hiring a chef who is also expected to spend a third of his or her time waiting tables; the simple fact of reality is that specially talented individuals will rarely excel at both of these tasks. You can't *convin...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
Putting in place a better system for evaluating teaching than today's student evaluation forms would be a good start. Getting serious about the assessment of student learning outcomes (rather than simply assigning grades) would also be extremely helpful.
**Step 0:** Talk to/with existing faculty. How do they view their teaching skill, it's relative importance, motivation to do better, what do they think would improve their own teaching and/or the teaching of others? I would hope the actual people on the ground know a thing or two more than some random fool on the inter...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
**Step 0:** Talk to/with existing faculty. How do they view their teaching skill, it's relative importance, motivation to do better, what do they think would improve their own teaching and/or the teaching of others? I would hope the actual people on the ground know a thing or two more than some random fool on the inter...
Much mention has been made of Reward for good teaching, but I would like to suggest an old fashioned and out-of-date idea: Punishment. If someone fails to deliver on their contracted responsibilities to the agreed quality and standards, then they need to face the consequences of their actions and decisions, resulting i...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
Putting in place a better system for evaluating teaching than today's student evaluation forms would be a good start. Getting serious about the assessment of student learning outcomes (rather than simply assigning grades) would also be extremely helpful.
Much mention has been made of Reward for good teaching, but I would like to suggest an old fashioned and out-of-date idea: Punishment. If someone fails to deliver on their contracted responsibilities to the agreed quality and standards, then they need to face the consequences of their actions and decisions, resulting i...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
The fundamental problem is that research and teaching are two *entirely* different skills. Imagine you're hiring a chef who is also expected to spend a third of his or her time waiting tables; the simple fact of reality is that specially talented individuals will rarely excel at both of these tasks. You can't *convin...
Much mention has been made of Reward for good teaching, but I would like to suggest an old fashioned and out-of-date idea: Punishment. If someone fails to deliver on their contracted responsibilities to the agreed quality and standards, then they need to face the consequences of their actions and decisions, resulting i...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
The fundamental problem is that research and teaching are two *entirely* different skills. Imagine you're hiring a chef who is also expected to spend a third of his or her time waiting tables; the simple fact of reality is that specially talented individuals will rarely excel at both of these tasks. You can't *convin...
In a nutshell: **Competition** between departments for students and funding can be one of the important reasons to cause departments to care about the quality of teaching. I give the following anecdote to illustrate the above principle. In my undergrad institution, which is outside the US and is fairly large (~30 K u...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
Putting in place a better system for evaluating teaching than today's student evaluation forms would be a good start. Getting serious about the assessment of student learning outcomes (rather than simply assigning grades) would also be extremely helpful.
In a nutshell: **Competition** between departments for students and funding can be one of the important reasons to cause departments to care about the quality of teaching. I give the following anecdote to illustrate the above principle. In my undergrad institution, which is outside the US and is fairly large (~30 K u...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
You don't hire people who don't take teaching seriously, and if you do happen to hire them accidentally, you deny them tenure and kick them out. More generally, you reward those who take teaching seriously and/or punish those who don't. This means you give the former time (by reducing the number of classes they have t...
Much mention has been made of Reward for good teaching, but I would like to suggest an old fashioned and out-of-date idea: Punishment. If someone fails to deliver on their contracted responsibilities to the agreed quality and standards, then they need to face the consequences of their actions and decisions, resulting i...
35,306
**tl;dr** Faculty don't think teaching is as important as their other responsibilities; how do we change that? **Long version** I've been working in academia for a long time and whenever I see instructors half-assing their teaching the go to excuses are that they have no time, or that it doesn't get any respect/gran...
2015/01/06
[ "https://academia.stackexchange.com/questions/35306", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/27290/" ]
In a nutshell: **Competition** between departments for students and funding can be one of the important reasons to cause departments to care about the quality of teaching. I give the following anecdote to illustrate the above principle. In my undergrad institution, which is outside the US and is fairly large (~30 K u...
Much mention has been made of Reward for good teaching, but I would like to suggest an old fashioned and out-of-date idea: Punishment. If someone fails to deliver on their contracted responsibilities to the agreed quality and standards, then they need to face the consequences of their actions and decisions, resulting i...
11,944,542
I want to know whether Perl is installed by default on all Unix-based operating systems. Since I want to write server-side programs, I need to choose between Perl and C.
2012/08/14
[ "https://Stackoverflow.com/questions/11944542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1595858/" ]
I'm not sure whether Perl is standard on all Unix server installs. I'm not even sure what that means - a server is a piece of hardware, it doesn't have to come with *any* specific software (not even an OS). I don't think this should be the deciding factor anyway. You can always compile Perl, or distribute Perl with yo...
Most linux distros DO include it by default. However, we got a stack of AIX machines a few months back running AIX 7.1 and none of them have perl installed. The very, very broad answer is no, you cannot assume that every Linux or Unix system you buy will have Perl installed on it.
70,334,538
I was trying to implement (in C#8.0) a class with a generic type parameter (constraint to a delegate) having an event parameter with the same generic type. The intended purpose is to have some custom event handling (Subscribe & Unsubscribe functions) while still allowing any kind of delegate associated with it. ``` pu...
2021/12/13
[ "https://Stackoverflow.com/questions/70334538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15331253/" ]
The C# specification *explicitly* states this is not allowed *(my bold)* [**Events**](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/classes#events) > > The type of an event declaration **must** be a *delegate\_type* .... > > > [**Delegates**](https://learn.microsoft.co...
How will you rise the event? You don't know if the delegate requires arguments and how many and of which type. I would use classes `AEvent`, `AEvent<T>`, `AEvent<T1,T2>` etc. and declare the events using `Action`, `Action<T>` and `Action<T1,T2>` respecitvely. ```cs public class AEvent { private event Action eventD...
37,906
I viscerally hate low calorie sugar replacements - all of them, including Splenda (sucralose), except in one application. In my iced coffee I like sugar-free hazelnut syrup. The brand that I've been using is sweetened with Splenda (and sneakily, acesulfame potassium). It would be great except that it's very expensive. ...
2013/10/26
[ "https://cooking.stackexchange.com/questions/37906", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/20183/" ]
I don't have a good suggestion for what to use, but at least I can give you some info on xanthan. Yes, syrup can take viscosity from an infinitesmal amount of xanthan gum. If you add 0.5% to 1% of the fluid's weight in xanthan, you get a pudding consistency. For a syrup-like viscosity, you need much less. But xanth...
Make it with xylitol as you would with sugar: 1 cup xylitol, 1/2 cup of water. I use tapioca starch to thicken it; the amount of tapioca depends on the quality.
23,043,005
*I have tried everything suggested here: [Status bar won't disappear](https://stackoverflow.com/questions/17763719/status-bar-wont-disappear) to no avail.* My iPhone version of my app has no status bar shown, but on my iPad, **which runs the scaled up version of my iPhone version,** there is a status bar that won't go...
2014/04/13
[ "https://Stackoverflow.com/questions/23043005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3088956/" ]
For 2016 onwards all you do is: =============================== Add these two items to your plist: ================================== ``` <key>UIStatusBarHidden</key> <true/> <key>UIViewControllerBasedStatusBarAppearance</key> <false/> ``` 1. It is that simple ==================== 2. There is no other method. ====...
Have you already, on your **info.plist** file, added two new attributes if not present? Please try setting "**Status bar is initially hidden**" to "`YES`" and also set "`UIViewControllerBasedStatusBarAppearance`" to "`NO`". This will hide status bar for your app.
33,370,883
I've read in various places that I can use Windows batch file `for` to grab the output of a command and put it in a variable, like this: ``` FOR /F %%G IN ('foo-command') DO SET FOO=%%G ``` Great. So my `foo-command` is actually `C:\Program Files\Foo\foo.bat`, and this is stored in the `FOO_BAT` variable. And it tak...
2015/10/27
[ "https://Stackoverflow.com/questions/33370883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421049/" ]
``` FOR /F "delims=" %%G IN ('CALL "C:\path with spaces\foo.bat" "blah blah='foobar' blah"') do set foo=%%G ``` Give this a try. And yes I tested it. Foo.bat does nothing more then just echo %1.
Whenever you are trying to process output directly from a `FOR` loop, I would recommend including the `usebackq` parameter. This allows you to include quotes in your command (as is often needed) to specify full file paths or individual parameters which have spaces in them. For example: ``` REM Using the DIR command w...
212,823
Do we use cache memory in microcontrollers, if not, why not? If yes, what is its application in embedded systems or it is enough just to have RAM?
2016/01/22
[ "https://electronics.stackexchange.com/questions/212823", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81163/" ]
Cache memory adds a level of latency unpredictability that may be unwanted. A lot (most?) of microcontrollers are used in a realtime setting where you have to budget for worst-case timing. It does not matter if your code is fast *on average*, if there is a chance that it won't meet the deadline in *worst case*. Worst c...
Having a level 1 cache is a trade-off between speed and cost. For speed, the bigger you make memory, the the longer the path to the data gets. That means that it'll take longer and longer (in terms of latency) the more memory you add. At some point performance degrades due this latency, which is the point when adding a...
212,823
Do we use cache memory in microcontrollers, if not, why not? If yes, what is its application in embedded systems or it is enough just to have RAM?
2016/01/22
[ "https://electronics.stackexchange.com/questions/212823", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81163/" ]
Cache memory adds a level of latency unpredictability that may be unwanted. A lot (most?) of microcontrollers are used in a realtime setting where you have to budget for worst-case timing. It does not matter if your code is fast *on average*, if there is a chance that it won't meet the deadline in *worst case*. Worst c...
Above a certain speed, fast memory costs more per byte than slow memory (below that speed, making memory slower won't make it any cheaper). If a system has a large amount of memory, having most of it be slow but then including a cache of fast memory and the logic to run it will be cheaper than making all of the memory ...
212,823
Do we use cache memory in microcontrollers, if not, why not? If yes, what is its application in embedded systems or it is enough just to have RAM?
2016/01/22
[ "https://electronics.stackexchange.com/questions/212823", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/81163/" ]
Above a certain speed, fast memory costs more per byte than slow memory (below that speed, making memory slower won't make it any cheaper). If a system has a large amount of memory, having most of it be slow but then including a cache of fast memory and the logic to run it will be cheaper than making all of the memory ...
Having a level 1 cache is a trade-off between speed and cost. For speed, the bigger you make memory, the the longer the path to the data gets. That means that it'll take longer and longer (in terms of latency) the more memory you add. At some point performance degrades due this latency, which is the point when adding a...
6,128
Hello I have a website that I would like to keep online no matter what for that purpose I don't mind buying multiple webhosting packages. Its a small website in terms of size but not in terms of client access and employee email accounts. I would like to achieve the following: 1) Add the DNS records of these multiple p...
2010/12/01
[ "https://webmasters.stackexchange.com/questions/6128", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/1044/" ]
Assuming your site content is fairly static (not a shopping cart or similar) you can do this using your DNS server entries on the domain. You would purchase hosting from several providers (I'll use `acme.com` and `example.com` as the providers). Each provider should provide a list of the DNS servers to use while regist...
As to email, look at moving them to Google Apps and Gmail. Very high uptime, always accessible via POP/IMAP, free, and large amount of storage. <http://www.google.com/apps/intl/en/group/index.html> All you have to do is point the DNS to Google server's (the set up process walks you through it).
26,256,447
I have successfuly searched my DB table for what i want and passed it into a DataTable (dt). The idea is that i want (after the search) to redirect someone to the result page he likes. So if he Searches for example "Michael" , i'd like to show him , the name Michael as a link , and if he presses it redirect him to his...
2014/10/08
[ "https://Stackoverflow.com/questions/26256447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4070124/" ]
The [sourceforge version](http://phpqrcode.sourceforge.net/docs/html/class_q_rcode.html#a1b90c0989105afa06b6e1c718a454fb5) of the method looks like the following: ``` static QRcode::png ( $text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint = false ) ``` ...
In the `qrimage.php` file try to change `$col[0]` and `$col[1]` values and see the difference, good luck.
178,546
So far any search for Pogoplug security risk does not bring up anything alarming. Just wondering if anyone else has run across any mention of security issues with this device.
2010/08/21
[ "https://superuser.com/questions/178546", "https://superuser.com", "https://superuser.com/users/46807/" ]
Let's go down the stack and look at every aspect of its security. * **Remote Computer**: very easily compromised on an untrustworthy computer via a keylogger, so if you either a) only access your Pogoplug from your (trustworthy) computers, b) change your password often (i.e., at least once every 6 weeks), or c) use th...
Nope! I have been hearing a lot about this device recently in the trade press and I haven't seen anything about security. That being said, no one can say any product is 100% secure, and the company does appear to be around for the long term, so I am sure they will patch any problems.
178,546
So far any search for Pogoplug security risk does not bring up anything alarming. Just wondering if anyone else has run across any mention of security issues with this device.
2010/08/21
[ "https://superuser.com/questions/178546", "https://superuser.com", "https://superuser.com/users/46807/" ]
The pogoplug essentially makes a connection to the manufacturer's server and provides content through it, at least in part. In my book that is a security concern, but for most people it is no more a threat than posting your pictures on facebook and only letting your friends see them is. You're trusting the manufactur...
Nope! I have been hearing a lot about this device recently in the trade press and I haven't seen anything about security. That being said, no one can say any product is 100% secure, and the company does appear to be around for the long term, so I am sure they will patch any problems.