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 |
|---|---|---|---|---|---|
38,935,169 | Suppose I have a list:
```
lst = [0, 1, 0, 0]
```
How can I make python interpret this list as a binary number 0100 so that `2*(0100)` gives me `01000`?
The only way that I can think of is to first make a function that converts the "binary" elements to corresponding integers(to base 10) and then use bin() function.... | 2016/08/13 | [
"https://Stackoverflow.com/questions/38935169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5847849/"
] | You can use [bitwise operators](https://wiki.python.org/moin/BitwiseOperators) like this:
```
>>> lst = [0, 1, 0, 0]
>>> bin(int(''.join(map(str, lst)), 2) << 1)
'0b1000'
``` | You can try:
```
l = [0, 0, 1, 0]
num = int(''.join(str(x) for x in l), base=2)
``` |
38,935,169 | Suppose I have a list:
```
lst = [0, 1, 0, 0]
```
How can I make python interpret this list as a binary number 0100 so that `2*(0100)` gives me `01000`?
The only way that I can think of is to first make a function that converts the "binary" elements to corresponding integers(to base 10) and then use bin() function.... | 2016/08/13 | [
"https://Stackoverflow.com/questions/38935169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5847849/"
] | You can use [bitwise operators](https://wiki.python.org/moin/BitwiseOperators) like this:
```
>>> lst = [0, 1, 0, 0]
>>> bin(int(''.join(map(str, lst)), 2) << 1)
'0b1000'
``` | You can use this code for concatenating the list elements:
```
x=[0, 1, 0, 0]
b=''.join(map(str,x))
print(b)
```
Output:
```
C:\python\prog>python trying.py
0100
``` |
38,935,169 | Suppose I have a list:
```
lst = [0, 1, 0, 0]
```
How can I make python interpret this list as a binary number 0100 so that `2*(0100)` gives me `01000`?
The only way that I can think of is to first make a function that converts the "binary" elements to corresponding integers(to base 10) and then use bin() function.... | 2016/08/13 | [
"https://Stackoverflow.com/questions/38935169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5847849/"
] | This is not a fancy one-liner, but simple and fast.
```
lst = [0,1,1,0]
num = 0
for b in lst:
num = 2 * num + b
print(num) # 6
``` | slightly different approach with comprehension (i hope it will be helpful for someone)
```
arr =[192, 168, 0, 1]
arr_s = [bin(i)[2:].zfill(8) for i in ar]
num = int(''.join(arr_s), 2)
```
same, but reverse order (and also one-liner suitable for lambdas )
```
arr = [24, 85, 0]
num = int(''.join( [bin(i)[2:].zfill(8)... |
38,935,169 | Suppose I have a list:
```
lst = [0, 1, 0, 0]
```
How can I make python interpret this list as a binary number 0100 so that `2*(0100)` gives me `01000`?
The only way that I can think of is to first make a function that converts the "binary" elements to corresponding integers(to base 10) and then use bin() function.... | 2016/08/13 | [
"https://Stackoverflow.com/questions/38935169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5847849/"
] | This is not a fancy one-liner, but simple and fast.
```
lst = [0,1,1,0]
num = 0
for b in lst:
num = 2 * num + b
print(num) # 6
``` | You can use this code for concatenating the list elements:
```
x=[0, 1, 0, 0]
b=''.join(map(str,x))
print(b)
```
Output:
```
C:\python\prog>python trying.py
0100
``` |
38,935,169 | Suppose I have a list:
```
lst = [0, 1, 0, 0]
```
How can I make python interpret this list as a binary number 0100 so that `2*(0100)` gives me `01000`?
The only way that I can think of is to first make a function that converts the "binary" elements to corresponding integers(to base 10) and then use bin() function.... | 2016/08/13 | [
"https://Stackoverflow.com/questions/38935169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5847849/"
] | Because I have a project atm, where I need to convert an black-white image to a byte-array and send it via TCP, I searched for a "as fast as possible" solution.
So I took some solutions from here, added some I thought of and let run some speed tests.
I thought sharing this would maybe be helpful...
```py
import time... | In Jupyter:-
------------
```
lst = [4,5,7,1,2]
bin(int(''.join(map(str, lst)))<<1)
```
o/p:- '0b10110010100100000'
In Python Shell:-
-----------------
```
>>> lst =[4,5,7,1,2]
>>> bin(int(''.join(map(str, lst)))<<1)
```
o/p:- '0b10110010100100000' |
38,935,169 | Suppose I have a list:
```
lst = [0, 1, 0, 0]
```
How can I make python interpret this list as a binary number 0100 so that `2*(0100)` gives me `01000`?
The only way that I can think of is to first make a function that converts the "binary" elements to corresponding integers(to base 10) and then use bin() function.... | 2016/08/13 | [
"https://Stackoverflow.com/questions/38935169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5847849/"
] | This is not a fancy one-liner, but simple and fast.
```
lst = [0,1,1,0]
num = 0
for b in lst:
num = 2 * num + b
print(num) # 6
``` | In Jupyter:-
------------
```
lst = [4,5,7,1,2]
bin(int(''.join(map(str, lst)))<<1)
```
o/p:- '0b10110010100100000'
In Python Shell:-
-----------------
```
>>> lst =[4,5,7,1,2]
>>> bin(int(''.join(map(str, lst)))<<1)
```
o/p:- '0b10110010100100000' |
38,935,169 | Suppose I have a list:
```
lst = [0, 1, 0, 0]
```
How can I make python interpret this list as a binary number 0100 so that `2*(0100)` gives me `01000`?
The only way that I can think of is to first make a function that converts the "binary" elements to corresponding integers(to base 10) and then use bin() function.... | 2016/08/13 | [
"https://Stackoverflow.com/questions/38935169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5847849/"
] | You can use [bitwise operators](https://wiki.python.org/moin/BitwiseOperators) like this:
```
>>> lst = [0, 1, 0, 0]
>>> bin(int(''.join(map(str, lst)), 2) << 1)
'0b1000'
``` | slightly different approach with comprehension (i hope it will be helpful for someone)
```
arr =[192, 168, 0, 1]
arr_s = [bin(i)[2:].zfill(8) for i in ar]
num = int(''.join(arr_s), 2)
```
same, but reverse order (and also one-liner suitable for lambdas )
```
arr = [24, 85, 0]
num = int(''.join( [bin(i)[2:].zfill(8)... |
16,369,792 | Im building a small uml modeler with jointjs and raphael for a small project Im doing... I already draw classes by clicking on a button.
What I want to know specifically is how to get the onclick event working on jointjs classes diagrams, because when I click on the classes they do not work, also they move a little wh... | 2013/05/04 | [
"https://Stackoverflow.com/questions/16369792",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/590100/"
] | this is a sample code for jointjs 0.6, the trick is to use model-id attribute to select the object using jquery:
```
var rect = new joint.shapes.basic.Rect({
position: { x: 100, y: 30 },
size: { width: 100, height: 30 },
attrs: { rect: { fill: 'blue' }, text: { text: 'my box', fill: 'wh... | I don't think you can bind events to mouseclick of diagram elements , since the mouseclick events are already bound by the joint lib itself.
But, you can definitely bind mousedown/mouseup events to simulate clicks.
You can implement connection creation by clicking on one element (putting the joint object in a temp var... |
16,369,792 | Im building a small uml modeler with jointjs and raphael for a small project Im doing... I already draw classes by clicking on a button.
What I want to know specifically is how to get the onclick event working on jointjs classes diagrams, because when I click on the classes they do not work, also they move a little wh... | 2013/05/04 | [
"https://Stackoverflow.com/questions/16369792",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/590100/"
] | jointjs provides the events call functionality. You can call events on your paper div.
Here is an example. May be this can help you out. For more, go for the link.
[List of triggered events on Paper](http://jointjs.com/api#joint.dia.Paper:events)
Code Example:
```
paper.on('cell:pointerdblclick',function(cellView, evt... | I don't think you can bind events to mouseclick of diagram elements , since the mouseclick events are already bound by the joint lib itself.
But, you can definitely bind mousedown/mouseup events to simulate clicks.
You can implement connection creation by clicking on one element (putting the joint object in a temp var... |
16,369,792 | Im building a small uml modeler with jointjs and raphael for a small project Im doing... I already draw classes by clicking on a button.
What I want to know specifically is how to get the onclick event working on jointjs classes diagrams, because when I click on the classes they do not work, also they move a little wh... | 2013/05/04 | [
"https://Stackoverflow.com/questions/16369792",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/590100/"
] | this is a sample code for jointjs 0.6, the trick is to use model-id attribute to select the object using jquery:
```
var rect = new joint.shapes.basic.Rect({
position: { x: 100, y: 30 },
size: { width: 100, height: 30 },
attrs: { rect: { fill: 'blue' }, text: { text: 'my box', fill: 'wh... | jointjs provides the events call functionality. You can call events on your paper div.
Here is an example. May be this can help you out. For more, go for the link.
[List of triggered events on Paper](http://jointjs.com/api#joint.dia.Paper:events)
Code Example:
```
paper.on('cell:pointerdblclick',function(cellView, evt... |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Well, no doubt you are hoping for something cleverer than this, but:
$$ \{\,a\mid\exists k\in \mathbb {N}\_{0}:(\exists m \in \{1,3,5\}
:a = m+12k)\vee (\exists m \in \{-7,-9,-11\}
:a = m-12k)\,\}$$
which I suddenly realized is actually
$$ \{\,a\mid\exists k\in \mathbb {Z}:(\exists m \in \{1,3,5\}
:a = m+12k)\,\}$$ | With the convention $0 \in \mathbb{N}$, you can also write this:
$$(\{1,3,5\}+12\mathbb{N}) \cup (\{-7,-9,-11\}+(-12)\mathbb{N})$$ |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Well, no doubt you are hoping for something cleverer than this, but:
$$ \{\,a\mid\exists k\in \mathbb {N}\_{0}:(\exists m \in \{1,3,5\}
:a = m+12k)\vee (\exists m \in \{-7,-9,-11\}
:a = m-12k)\,\}$$
which I suddenly realized is actually
$$ \{\,a\mid\exists k\in \mathbb {Z}:(\exists m \in \{1,3,5\}
:a = m+12k)\,\}$$ | Define $f:\mathbb{N} \to \mathbb{Z}$ as follows. $f(1) = 1$, $f(2) = 3$ $f(3) = 5$ and $$f(n) = -\text{sgn}(f(n-3))\cdot(2n-1)$$
for $n \geq 4$
Then this set is $\{c \in \mathbb{Z}: \exists n \in \mathbb{N} \ \text{such that} \ f(n) = c\}$. That is, the set is the image of the function. |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Well, no doubt you are hoping for something cleverer than this, but:
$$ \{\,a\mid\exists k\in \mathbb {N}\_{0}:(\exists m \in \{1,3,5\}
:a = m+12k)\vee (\exists m \in \{-7,-9,-11\}
:a = m-12k)\,\}$$
which I suddenly realized is actually
$$ \{\,a\mid\exists k\in \mathbb {Z}:(\exists m \in \{1,3,5\}
:a = m+12k)\,\}$$ | $$\left\{(-1)^{\lfloor n/3\rfloor}(2n+1)\mid n\in\mathbb N\right\}$$
Or, if you are using a finicky notion of set-builder notation:
$$\left\{x\in\mathbb Z\mid \exists n\in\mathbb N\left[x=(-1)^{\lfloor n/3\rfloor}(2n+1)\right]\right\}$$ |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Well, no doubt you are hoping for something cleverer than this, but:
$$ \{\,a\mid\exists k\in \mathbb {N}\_{0}:(\exists m \in \{1,3,5\}
:a = m+12k)\vee (\exists m \in \{-7,-9,-11\}
:a = m-12k)\,\}$$
which I suddenly realized is actually
$$ \{\,a\mid\exists k\in \mathbb {Z}:(\exists m \in \{1,3,5\}
:a = m+12k)\,\}$$ | For $n\in\mathbb{N}$, $\cos(n\pi/3)$ is never $0$. It oscillates from being positive for three consecutive terms, then negative for three. Using this, one way to express your sequence is $$a\_n=\frac{\cos\left(\frac{(n-2)\pi}{3}\right)}{\left\lvert\cos\left(\frac{(n-2)\pi}{3}\right)\right\rvert}(2n-1)$$ As a set in set... |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Well, no doubt you are hoping for something cleverer than this, but:
$$ \{\,a\mid\exists k\in \mathbb {N}\_{0}:(\exists m \in \{1,3,5\}
:a = m+12k)\vee (\exists m \in \{-7,-9,-11\}
:a = m-12k)\,\}$$
which I suddenly realized is actually
$$ \{\,a\mid\exists k\in \mathbb {Z}:(\exists m \in \{1,3,5\}
:a = m+12k)\,\}$$ | $a\_n=\operatorname{sgn}(\Im(e^{(2n+1)i\pi/12})$ where $sgn$ is the [Signum function](http://mathworld.wolfram.com/Signum.html)
and$\Im$ is the [imaginary part of a complex number.](http://mathworld.wolfram.com/ImaginaryPart.html) |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | If you are allowed to use square roots, then something like: $$\left\{(2n+1) \cdot(-1)^{\tfrac{1}{\sqrt{5}} \left(\left(\tfrac{1+\sqrt{5}}{2}\right)^{n-1} - \left(\tfrac{1-\sqrt{5}}{2}\right)^{n-1}\right) - (n-1)} \big| n \in \mathbb{N}\right\}$$
will work. (Here, we use the convention that $0 \in \mathbb{N}$.)
This a... | With the convention $0 \in \mathbb{N}$, you can also write this:
$$(\{1,3,5\}+12\mathbb{N}) \cup (\{-7,-9,-11\}+(-12)\mathbb{N})$$ |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | If you are allowed to use square roots, then something like: $$\left\{(2n+1) \cdot(-1)^{\tfrac{1}{\sqrt{5}} \left(\left(\tfrac{1+\sqrt{5}}{2}\right)^{n-1} - \left(\tfrac{1-\sqrt{5}}{2}\right)^{n-1}\right) - (n-1)} \big| n \in \mathbb{N}\right\}$$
will work. (Here, we use the convention that $0 \in \mathbb{N}$.)
This a... | Define $f:\mathbb{N} \to \mathbb{Z}$ as follows. $f(1) = 1$, $f(2) = 3$ $f(3) = 5$ and $$f(n) = -\text{sgn}(f(n-3))\cdot(2n-1)$$
for $n \geq 4$
Then this set is $\{c \in \mathbb{Z}: \exists n \in \mathbb{N} \ \text{such that} \ f(n) = c\}$. That is, the set is the image of the function. |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | If you are allowed to use square roots, then something like: $$\left\{(2n+1) \cdot(-1)^{\tfrac{1}{\sqrt{5}} \left(\left(\tfrac{1+\sqrt{5}}{2}\right)^{n-1} - \left(\tfrac{1-\sqrt{5}}{2}\right)^{n-1}\right) - (n-1)} \big| n \in \mathbb{N}\right\}$$
will work. (Here, we use the convention that $0 \in \mathbb{N}$.)
This a... | $$\left\{(-1)^{\lfloor n/3\rfloor}(2n+1)\mid n\in\mathbb N\right\}$$
Or, if you are using a finicky notion of set-builder notation:
$$\left\{x\in\mathbb Z\mid \exists n\in\mathbb N\left[x=(-1)^{\lfloor n/3\rfloor}(2n+1)\right]\right\}$$ |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | If you are allowed to use square roots, then something like: $$\left\{(2n+1) \cdot(-1)^{\tfrac{1}{\sqrt{5}} \left(\left(\tfrac{1+\sqrt{5}}{2}\right)^{n-1} - \left(\tfrac{1-\sqrt{5}}{2}\right)^{n-1}\right) - (n-1)} \big| n \in \mathbb{N}\right\}$$
will work. (Here, we use the convention that $0 \in \mathbb{N}$.)
This a... | For $n\in\mathbb{N}$, $\cos(n\pi/3)$ is never $0$. It oscillates from being positive for three consecutive terms, then negative for three. Using this, one way to express your sequence is $$a\_n=\frac{\cos\left(\frac{(n-2)\pi}{3}\right)}{\left\lvert\cos\left(\frac{(n-2)\pi}{3}\right)\right\rvert}(2n-1)$$ As a set in set... |
1,846,538 | I need a set-builder notation for $\{1 , 3 , 5 , -7 , -9 , -11 , 13 , 15 , 17 , \ldots\}$. It is an infinite set of odd positive integers, which are multiplied by $-1$ three by three. One of the terms of this question is not to use floor function. | 2016/07/02 | [
"https://math.stackexchange.com/questions/1846538",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | If you are allowed to use square roots, then something like: $$\left\{(2n+1) \cdot(-1)^{\tfrac{1}{\sqrt{5}} \left(\left(\tfrac{1+\sqrt{5}}{2}\right)^{n-1} - \left(\tfrac{1-\sqrt{5}}{2}\right)^{n-1}\right) - (n-1)} \big| n \in \mathbb{N}\right\}$$
will work. (Here, we use the convention that $0 \in \mathbb{N}$.)
This a... | $a\_n=\operatorname{sgn}(\Im(e^{(2n+1)i\pi/12})$ where $sgn$ is the [Signum function](http://mathworld.wolfram.com/Signum.html)
and$\Im$ is the [imaginary part of a complex number.](http://mathworld.wolfram.com/ImaginaryPart.html) |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | Others have suggested this is not possible without various extensions to certain regular expression systems that are not in fact regular. However, since the language you want to match is finite, it's clearly regular. For 3 letters from a 4-letter alphabet, it would be easy:
```
(abc|abd|acb|acd|bac|bad|bcd|bdc|cab|cad... | A Perl solution:
```
perl -lne 'print if (!/(.)(?=$1)/g && /^\w{10}$/)' file
```
but it doesnt work with
```
perl -lne 'print if (!/(.)(?=\1)/g && /^\w{10}$/)' file
```
or
```
perl -lne 'print if ( /(.)(?!$1)/g && /^\w{10}$/)' file
```
tested with perl v5.14.2 and v5.18.2 |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | If you don't need to do the whole thing in regex, I would do it on two steps: first match all 10-letter words, then filter them for uniqueness. The shortest way I know how to do this is in Perl:
```
perl -nle 'MATCH:while(/\W(\w{10})\W/g){
undef %seen;
for(split//,$1){next MATCH if ++$seen{$_... | Others have suggested this is not possible without various extensions to certain regular expression systems that are not in fact regular. However, since the language you want to match is finite, it's clearly regular. For 3 letters from a 4-letter alphabet, it would be easy:
```
(abc|abd|acb|acd|bac|bad|bcd|bdc|cab|cad... |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | ```
grep -Eow '\w{10}' | grep -v '\(.\).*\1'
```
excludes words that have two identical characters.
```
grep -Eow '\w{10}' | grep -v '\(.\)\1'
```
excludes the ones that have repeating characters.
POSIXly:
```
tr -cs '[:alnum:]_' '[\n*]' |
grep -xE '.{10}' |
grep -v '\(.\).*\1'
```
`tr` puts words on the... | Others have suggested this is not possible without various extensions to certain regular expression systems that are not in fact regular. However, since the language you want to match is finite, it's clearly regular. For 3 letters from a 4-letter alphabet, it would be easy:
```
(abc|abd|acb|acd|bac|bad|bcd|bdc|cab|cad... |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | ```
grep -Eow '\w{10}' | grep -v '\(.\).*\1'
```
excludes words that have two identical characters.
```
grep -Eow '\w{10}' | grep -v '\(.\)\1'
```
excludes the ones that have repeating characters.
POSIXly:
```
tr -cs '[:alnum:]_' '[\n*]' |
grep -xE '.{10}' |
grep -v '\(.\).*\1'
```
`tr` puts words on the... | Option `--perl-regexp` (short `-P`) of GNU `grep` uses more powerful regular expressions that include look ahead patterns. The following pattern looks for each letter that this letter does not appear in the remainder of the word:
```
grep -Pow '((\w)(?!\w*\g{-1})){10}'
```
However the run-time behavior is quite bad,... |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | Okay...here's the clunky way for a five character string:
```
grep -P '^(.)(?!\1)(.)(?!\1|\2)(.)(?!\1|\2|\3)(.)(?!\1|\2|\3|\4).$'
```
Because you cannot put a back reference in a character class (e.g. `[^\1|\2]`), you must use a *negative look-ahead* -- `(?!foo)`. This is a PCRE feature so you need the `-P` switch.
... | A Perl solution:
```
perl -lne 'print if (!/(.)(?=$1)/g && /^\w{10}$/)' file
```
but it doesnt work with
```
perl -lne 'print if (!/(.)(?=\1)/g && /^\w{10}$/)' file
```
or
```
perl -lne 'print if ( /(.)(?!$1)/g && /^\w{10}$/)' file
```
tested with perl v5.14.2 and v5.18.2 |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | Option `--perl-regexp` (short `-P`) of GNU `grep` uses more powerful regular expressions that include look ahead patterns. The following pattern looks for each letter that this letter does not appear in the remainder of the word:
```
grep -Pow '((\w)(?!\w*\g{-1})){10}'
```
However the run-time behavior is quite bad,... | A Perl solution:
```
perl -lne 'print if (!/(.)(?=$1)/g && /^\w{10}$/)' file
```
but it doesnt work with
```
perl -lne 'print if (!/(.)(?=\1)/g && /^\w{10}$/)' file
```
or
```
perl -lne 'print if ( /(.)(?!$1)/g && /^\w{10}$/)' file
```
tested with perl v5.14.2 and v5.18.2 |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | If you don't need to do the whole thing in regex, I would do it on two steps: first match all 10-letter words, then filter them for uniqueness. The shortest way I know how to do this is in Perl:
```
perl -nle 'MATCH:while(/\W(\w{10})\W/g){
undef %seen;
for(split//,$1){next MATCH if ++$seen{$_... | Option `--perl-regexp` (short `-P`) of GNU `grep` uses more powerful regular expressions that include look ahead patterns. The following pattern looks for each letter that this letter does not appear in the remainder of the word:
```
grep -Pow '((\w)(?!\w*\g{-1})){10}'
```
However the run-time behavior is quite bad,... |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | If you don't need to do the whole thing in regex, I would do it on two steps: first match all 10-letter words, then filter them for uniqueness. The shortest way I know how to do this is in Perl:
```
perl -nle 'MATCH:while(/\W(\w{10})\W/g){
undef %seen;
for(split//,$1){next MATCH if ++$seen{$_... | A Perl solution:
```
perl -lne 'print if (!/(.)(?=$1)/g && /^\w{10}$/)' file
```
but it doesnt work with
```
perl -lne 'print if (!/(.)(?=\1)/g && /^\w{10}$/)' file
```
or
```
perl -lne 'print if ( /(.)(?!$1)/g && /^\w{10}$/)' file
```
tested with perl v5.14.2 and v5.18.2 |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | Okay...here's the clunky way for a five character string:
```
grep -P '^(.)(?!\1)(.)(?!\1|\2)(.)(?!\1|\2|\3)(.)(?!\1|\2|\3|\4).$'
```
Because you cannot put a back reference in a character class (e.g. `[^\1|\2]`), you must use a *negative look-ahead* -- `(?!foo)`. This is a PCRE feature so you need the `-P` switch.
... | Others have suggested this is not possible without various extensions to certain regular expression systems that are not in fact regular. However, since the language you want to match is finite, it's clearly regular. For 3 letters from a 4-letter alphabet, it would be easy:
```
(abc|abd|acb|acd|bac|bad|bcd|bdc|cab|cad... |
116,439 | Recently had a LVM'd CentOS 6.5 install get accidentally cold-shutdown. On bootup, it says that the home partition need fscking:
```
/dev/mapper/vg_myserver-lv_home: Block bitmap for group 3072 is not in group. (block 3335668205)
/dev/mapper/vg_myserver-lv_home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
```
...... | 2014/02/22 | [
"https://unix.stackexchange.com/questions/116439",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/34450/"
] | ```
grep -Eow '\w{10}' | grep -v '\(.\).*\1'
```
excludes words that have two identical characters.
```
grep -Eow '\w{10}' | grep -v '\(.\)\1'
```
excludes the ones that have repeating characters.
POSIXly:
```
tr -cs '[:alnum:]_' '[\n*]' |
grep -xE '.{10}' |
grep -v '\(.\).*\1'
```
`tr` puts words on the... | A Perl solution:
```
perl -lne 'print if (!/(.)(?=$1)/g && /^\w{10}$/)' file
```
but it doesnt work with
```
perl -lne 'print if (!/(.)(?=\1)/g && /^\w{10}$/)' file
```
or
```
perl -lne 'print if ( /(.)(?!$1)/g && /^\w{10}$/)' file
```
tested with perl v5.14.2 and v5.18.2 |
61,308,120 | so i basically know what the Error means but i don't know why i'm getting it.I want to insert my cvs file into a table. Some of the rows are empty, thats why im using the if None...
The Error im getting:
File "C:\Users\Desktop\IngestData.py", line 64, in institutions
cokey = temp[0]
TypeError: 'NoneType' object is n... | 2020/04/19 | [
"https://Stackoverflow.com/questions/61308120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13355704/"
] | Here's a quick and dirty solution for you:
Walk through every element of the array recursively and if you've not seen an element set it to null (unsetting it doesn't work for some reason). Then filter the resulting sub-arrays.
```php
$array = [[0, 1, 2, 3, 4], [1, 2, 3, 4, 6]];
$seen = [];
array_walk_recursive($arra... | If the functions array\_diff() and array\_values() are used, the solution can be delivered in one line of code:
```
$array = [[0, 1, 2, 3, 4], [1, 2, 3, 4, 6]];
$array[1] = array_values(array_diff($array[1],$array[0]));
var_export($array);
```
Output:
```
array (
0 =>
array (
0 => 0,
1 => 1,
2 ... |
61,308,120 | so i basically know what the Error means but i don't know why i'm getting it.I want to insert my cvs file into a table. Some of the rows are empty, thats why im using the if None...
The Error im getting:
File "C:\Users\Desktop\IngestData.py", line 64, in institutions
cokey = temp[0]
TypeError: 'NoneType' object is n... | 2020/04/19 | [
"https://Stackoverflow.com/questions/61308120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13355704/"
] | Here's a quick and dirty solution for you:
Walk through every element of the array recursively and if you've not seen an element set it to null (unsetting it doesn't work for some reason). Then filter the resulting sub-arrays.
```php
$array = [[0, 1, 2, 3, 4], [1, 2, 3, 4, 6]];
$seen = [];
array_walk_recursive($arra... | ```
$serialize=array_map('serialize',$array);
$unique=array_unique($serialize);
$result=array_map('unserialize',$uniue);
print_r($result);
``` |
21,590,342 | I use [`Test::More`](https://metacpan.org/module/Test%3a%3aMore)
I want to see if one of my functions is called or not. There are two scenarios I have: one will not call my function, the other will. This function is not mocked out, I just want to see if it was called or not. | 2014/02/05 | [
"https://Stackoverflow.com/questions/21590342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758023/"
] | Something like:
```
my $called;
my $orig_function = \&YourPackage::YourFunction;
{
no warnings 'redefine';
*YourPackage::YourFunction = sub { ++$called; goto &$orig_function };
}
# code that may or may not call YourFunction here
ok($called, 'function called');
``` | Looks like you're about to invent code coverage reports. Have you seen [Devel::Cover](https://metacpan.org/pod/Devel%3a%3aCover)? It will make your life easier. |
64,984,465 | text is not selected in js tried all methods in. `select()` and `btn.select()` in not selecting the text in textbox
```js
var in = document.getElementById("in");
var btn = document.getElementById("btn");
btn.onclick() = function(){
in.focus();
in.select();
i... | 2020/11/24 | [
"https://Stackoverflow.com/questions/64984465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9751277/"
] | `in` is a reserved key in javascript so cant use it and you have to remove `()` after the onclick when you want to assign it to value.
```js
var inputField = document.getElementById("in");
var btn = document.getElementById("btn");
btn.onclick = function(){
inputFiel... | There are 2 issues with your code:
1. `in` is a reserved word in js, so you can't use it as a variable name.
2. You're wrong at setting onclick event for button
```
btn.onclick() = function(){ // there should not have '()' after onclick
...
```
You should check the error on console when code executed. |
62,481 | Seems like it should be simple to turn off conversation mode, I was able to do it in my Outlook client pretty easily. However, I can't find the option in the web client (which I'm now stuck using due to my thick client refusing to connect (I've hit a known MS bug that currently has no resolution)). To help me keep my s... | 2014/06/11 | [
"https://webapps.stackexchange.com/questions/62481",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/3897/"
] | Go to [GitHub settings](https://github.com/settings/notifications)
You'll see this:
>
> **Automatic Watching**
>
>
> **☑ Automatically watch repositoiries**
>
>
> When you’re given push access to a repository, automatically receive notifications for it.
>
>
>
If you uncheck or untick that box you should now ... | Go to [github.com/settings/notifications](https://github.com/settings/notifications) and uncheck "Automatically watch repositories" under "Automatic Watching". |
32,103,402 | I'd like to use VC for development projects, however what I see in the various types (Git, SVN, Mercurial...) doesn't seem to suit what I'd like to accomplish.
What I'd like to do is have the code repositories stored on an external device (such as thumb drive or SD card), not only for version control, but also as a ba... | 2015/08/19 | [
"https://Stackoverflow.com/questions/32103402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5233111/"
] | There's a fixed set of elements, belonging to [Phrasing content](http://www.w3.org/TR/html5/dom.html#phrasing-content-1) category, that can be children of `<p>` element:
>
> Phrasing content is the text of the document, as well as elements that
> mark up that text at the intra-paragraph level. Runs of phrasing
> c... | The meaning of that error message is that the `p#whoarewe` element was already implicitly closed when the HTML processor encountered the `h2` element, so the `</p>` end tag at that particular point seems gratuitous because there is no open `p` element for the end tag to close.
So no, your computer is not glitching out... |
1,410,994 | I am trying to stop multiple services remotely without using the full name using a wild card in a batch file. Something like this **service\***
Here are a couple example commands I'm using for my need but as you can see I have to explicitly specify the full name of the process and I cannot use wildcards to find matche... | 2019/03/03 | [
"https://superuser.com/questions/1410994",
"https://superuser.com",
"https://superuser.com/users/1004107/"
] | What you can do is use [tasklist](http://ss64.com/nt/tasklist.html) with the `/FO LIST` options and then pipe that over to a couple [find](http://ss64.com/nt/find.html) commands with the `/I` switch to search the wildcard keyword as desired.
You can run that through a [FOR /F](http://ss64.com/nt/for_cmd.html) loop usi... | I was killing the service because the service name was consistent but to start the service the full name was never the same on the multiple servers. I figured this command works for me to start a service on a remote computer without the full name:
WMIC/node:server1 service where "name like 'service%%'" call startservi... |
409,653 | **Short version of the issue**
* We have a 3rd party workflow tool that needs to check e-mail inboxes.
* The tool only supports checking e-mail with pop3 or IMAP
* Our network guys don't allow pop3 or IMAP access to our exchange server.
**My working solution / Concept**
* Install some kind of pop3/imap mail server s... | 2012/07/20 | [
"https://serverfault.com/questions/409653",
"https://serverfault.com",
"https://serverfault.com/users/14344/"
] | I'd seriously push for fighting the political battle to allow IMAP access to the Exchange system. IMAP and POP can be enabled on a per-account basis. Since this is a workflow item with a defined business application, there's definitely a purpose...
I'd be more suspicious of a the long-term viability of a workaround so... | Probably too late for you but I am posting an answer for posterity. Check out DavMail - <http://davmail.sourceforge.net>
This is a cross-platform gateway for Exchange or Office365. In their own words -
"DavMail is a POP/IMAP/SMTP/Caldav/Carddav/LDAP gateway allowing users to use any mail client with Exchange, even f... |
44,744,674 | How to use parameterized queries/prepared statements in opencart. I have a number of queries being used in opencart and I need to use parameterized structure to prevent sql injection in opencart. Below is a sample insert statement being used :
```
$result = $this->db->query("INSERT INTO ".DB_PREFIX."xxxx SET
pqrs = ... | 2017/06/25 | [
"https://Stackoverflow.com/questions/44744674",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4264884/"
] | [It looks like](https://github.com/opencart/opencart/blob/master/upload/system/library/db.php) OpenCart does not have support for prepared statement in their custom DB interface. You can send a request to the developers that such methods will be implemented or you can write them on your own. | The mPDO adaptor has pre-written functionality for prepared statements, but the DB object through which it is accessed doesn't, and the rest of the adaptors don't either. If you want to access these functions, you can change the accessibility of the mPO class' `$connection` and ``$statement`` properties, and the DB cla... |
165,656 | A lot of the satellite SE sites have jargon that is specific to the site's domain. For example: Cooks might suggest a user sauté something; Home Brewers may talk about their wort; Photographers will discuss fancy lens terms I don't understand.
Is there a recommended way to provide definitions for these terms? The SO p... | 2013/01/31 | [
"https://meta.stackexchange.com/questions/165656",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/156776/"
] | I would recommend simply asking a question eg. "what is sauté?".
It will either be closed as general reference (on english.se) or lead to a series of very good answers about the best way to sauté, why you saute, where it comes from etc..
I don't see the point of a site-specific glossary, I think dictionaries are f... | Mi Yodeya has rather a bit of jargon. We have a [glossary](http://meta.judaism.stackexchange.com/questions/581/mi-yodeya-glossary) with one post per term (not one big mega-post like the SO glossary). This facilitates linking to the glossary from the main site. That seems to be working pretty well, though our glossary i... |
165,656 | A lot of the satellite SE sites have jargon that is specific to the site's domain. For example: Cooks might suggest a user sauté something; Home Brewers may talk about their wort; Photographers will discuss fancy lens terms I don't understand.
Is there a recommended way to provide definitions for these terms? The SO p... | 2013/01/31 | [
"https://meta.stackexchange.com/questions/165656",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/156776/"
] | Google is an excellent dictionary, most SE sites tend to focus on creating repositories of useful but hard to find information in a question and answer format. Google and Wikipedia already have a far better format to explain basic terminology than SE. Most sites are geared towards people that already have a basic under... | Mi Yodeya has rather a bit of jargon. We have a [glossary](http://meta.judaism.stackexchange.com/questions/581/mi-yodeya-glossary) with one post per term (not one big mega-post like the SO glossary). This facilitates linking to the glossary from the main site. That seems to be working pretty well, though our glossary i... |
1,167,022 | i have the following geometrical issue in 2D:
i have a point from which i cast an infinite angle (2D-cone) which is given by a direction and an angle. (the point and the direction form a vector and to each side half of the angle forms the 2D-cone)
now i want to check if another point in 2D is inside this cone or outs... | 2009/07/22 | [
"https://Stackoverflow.com/questions/1167022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/97688/"
] | Calculate the vector from the center of the cone to the query point. Normalize the vector to be of length 1, Take the center vector of the cone and normalize this as well to the length of 1.
Now take the dot product between the vectors. The dot product between two normalized vectors is the cosinus of the angle betwe... | Calculate the angle of the direction using arctg of the direction. Substract the origin from the checked point. Calculate its angle (again via arctg of a normalized vector), and check if it lies within angle boundaries. |
1,167,022 | i have the following geometrical issue in 2D:
i have a point from which i cast an infinite angle (2D-cone) which is given by a direction and an angle. (the point and the direction form a vector and to each side half of the angle forms the 2D-cone)
now i want to check if another point in 2D is inside this cone or outs... | 2009/07/22 | [
"https://Stackoverflow.com/questions/1167022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/97688/"
] | Calculate the vector from the center of the cone to the query point. Normalize the vector to be of length 1, Take the center vector of the cone and normalize this as well to the length of 1.
Now take the dot product between the vectors. The dot product between two normalized vectors is the cosinus of the angle betwe... | I would say the best way is to project the point onto the 2D surface perpendicular to the cones direction. Then you calculate the othogonal distance between that same plane and the point. Finally, you know the width of the cone at that height, so you can see if the point is outside that width. |
1,167,022 | i have the following geometrical issue in 2D:
i have a point from which i cast an infinite angle (2D-cone) which is given by a direction and an angle. (the point and the direction form a vector and to each side half of the angle forms the 2D-cone)
now i want to check if another point in 2D is inside this cone or outs... | 2009/07/22 | [
"https://Stackoverflow.com/questions/1167022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/97688/"
] | Calculate the vector from the center of the cone to the query point. Normalize the vector to be of length 1, Take the center vector of the cone and normalize this as well to the length of 1.
Now take the dot product between the vectors. The dot product between two normalized vectors is the cosinus of the angle betwe... | Let the vector from the point of origin to the specified point makes an angle A with the normal that runs through the center. If the angle A is less than the half angle of the cone it lies inside else outside. |
27,541,380 | I am doing a i18n testing on symfony2. (v2.4) . And i follow the steps <http://symfony.com/doc/master/book/translation.html>.
Just like another guys' question [Symfony Basic Translation Example](https://stackoverflow.com/questions/13046460/symfony-basic-translation-example), Exception i came across a exception "The "... | 2014/12/18 | [
"https://Stackoverflow.com/questions/27541380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4373159/"
] | Thanks everybody.
I now can fix the issues by this: (add loader manually)
in my Controller / action:
```
/**
*@Route("/tr")
*/
public function trAction()
{
$tr = $this->get('translator');//->trans('symfony.test.great');
$tr->addLoader('xliff', new XliffFileLoader()); // new add
... | The loaders are configured in ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml
You should have the following parameter:
```
<parameter key="translation.loader.xliff.class">Symfony\Component\Translation\Loader\XliffFileLoader</parameter>
```
If everything looks ok, use xli... |
27,541,380 | I am doing a i18n testing on symfony2. (v2.4) . And i follow the steps <http://symfony.com/doc/master/book/translation.html>.
Just like another guys' question [Symfony Basic Translation Example](https://stackoverflow.com/questions/13046460/symfony-basic-translation-example), Exception i came across a exception "The "... | 2014/12/18 | [
"https://Stackoverflow.com/questions/27541380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4373159/"
] | I know this is an old question but still someone might find it useful. Had the same problem which I solved by removing some packaged from composer.json
Remove these packages:
```
"symfony/translation": "2.3.*",
"symfony/config": "2.3.*"
```
then run `composer update`
Symfony has built in translation so you don't ... | The loaders are configured in ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml
You should have the following parameter:
```
<parameter key="translation.loader.xliff.class">Symfony\Component\Translation\Loader\XliffFileLoader</parameter>
```
If everything looks ok, use xli... |
27,541,380 | I am doing a i18n testing on symfony2. (v2.4) . And i follow the steps <http://symfony.com/doc/master/book/translation.html>.
Just like another guys' question [Symfony Basic Translation Example](https://stackoverflow.com/questions/13046460/symfony-basic-translation-example), Exception i came across a exception "The "... | 2014/12/18 | [
"https://Stackoverflow.com/questions/27541380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4373159/"
] | I fixed a similar problem like this:
```
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\Loader\XliffFileLoader;
...
...
$translator = new Translator('en_US');
$translator->addLoader('xlf', new XliffFileLoader());
$translator->addResource('xlf', __DIR__ . '/registration.xlf', 'it_IT', '... | The loaders are configured in ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml
You should have the following parameter:
```
<parameter key="translation.loader.xliff.class">Symfony\Component\Translation\Loader\XliffFileLoader</parameter>
```
If everything looks ok, use xli... |
27,541,380 | I am doing a i18n testing on symfony2. (v2.4) . And i follow the steps <http://symfony.com/doc/master/book/translation.html>.
Just like another guys' question [Symfony Basic Translation Example](https://stackoverflow.com/questions/13046460/symfony-basic-translation-example), Exception i came across a exception "The "... | 2014/12/18 | [
"https://Stackoverflow.com/questions/27541380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4373159/"
] | Thanks everybody.
I now can fix the issues by this: (add loader manually)
in my Controller / action:
```
/**
*@Route("/tr")
*/
public function trAction()
{
$tr = $this->get('translator');//->trans('symfony.test.great');
$tr->addLoader('xliff', new XliffFileLoader()); // new add
... | I know this is an old question but I just found the correct answer:
Search on your translation folder a file with the extension .xlf~ and delete it.
For example:
messages.en.xlf~
These files are created by the `translation:update` console command. |
27,541,380 | I am doing a i18n testing on symfony2. (v2.4) . And i follow the steps <http://symfony.com/doc/master/book/translation.html>.
Just like another guys' question [Symfony Basic Translation Example](https://stackoverflow.com/questions/13046460/symfony-basic-translation-example), Exception i came across a exception "The "... | 2014/12/18 | [
"https://Stackoverflow.com/questions/27541380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4373159/"
] | I know this is an old question but still someone might find it useful. Had the same problem which I solved by removing some packaged from composer.json
Remove these packages:
```
"symfony/translation": "2.3.*",
"symfony/config": "2.3.*"
```
then run `composer update`
Symfony has built in translation so you don't ... | I know this is an old question but I just found the correct answer:
Search on your translation folder a file with the extension .xlf~ and delete it.
For example:
messages.en.xlf~
These files are created by the `translation:update` console command. |
27,541,380 | I am doing a i18n testing on symfony2. (v2.4) . And i follow the steps <http://symfony.com/doc/master/book/translation.html>.
Just like another guys' question [Symfony Basic Translation Example](https://stackoverflow.com/questions/13046460/symfony-basic-translation-example), Exception i came across a exception "The "... | 2014/12/18 | [
"https://Stackoverflow.com/questions/27541380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4373159/"
] | I fixed a similar problem like this:
```
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\Loader\XliffFileLoader;
...
...
$translator = new Translator('en_US');
$translator->addLoader('xlf', new XliffFileLoader());
$translator->addResource('xlf', __DIR__ . '/registration.xlf', 'it_IT', '... | I know this is an old question but I just found the correct answer:
Search on your translation folder a file with the extension .xlf~ and delete it.
For example:
messages.en.xlf~
These files are created by the `translation:update` console command. |
45,646,928 | **QUESTION**
How come this code here:
`Object y=x.remove();` removes the object from the queue?
Isn't this just a variable assignment. Why does it run the code, when we are not calling it? Does variable deceleration call the methods as well?
```html
Queue<Integer> x = new LinkedList<Integer>();
x.add(5);
x.... | 2017/08/12 | [
"https://Stackoverflow.com/questions/45646928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | On the right hand side of the = you have an expression. That expression is evaluated and the result is assigned to the variable on the left hand side.
In your case that expression consists of a method invocation. That call to remove() returns the removed object. Which then gets assigned to y. And to be precise: the m... | Well from the [documentation of the method](https://docs.oracle.com/javase/7/docs/api/java/util/Queue.html#remove()) itself its very clear what it does there:
```
/**
* Retrieves and removes the head of this queue. This method differs
* from {@link #poll poll} only in that it throws an exception if this
* queue is... |
45,646,928 | **QUESTION**
How come this code here:
`Object y=x.remove();` removes the object from the queue?
Isn't this just a variable assignment. Why does it run the code, when we are not calling it? Does variable deceleration call the methods as well?
```html
Queue<Integer> x = new LinkedList<Integer>();
x.add(5);
x.... | 2017/08/12 | [
"https://Stackoverflow.com/questions/45646928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | On the right hand side of the = you have an expression. That expression is evaluated and the result is assigned to the variable on the left hand side.
In your case that expression consists of a method invocation. That call to remove() returns the removed object. Which then gets assigned to y. And to be precise: the m... | You are calling method of a queue class(.remove()). And this method remove the first element of the queue and return it. You can use peek method ( Object y=x.peek(); ), if you want to check the first element of the queue without removing it. |
45,646,928 | **QUESTION**
How come this code here:
`Object y=x.remove();` removes the object from the queue?
Isn't this just a variable assignment. Why does it run the code, when we are not calling it? Does variable deceleration call the methods as well?
```html
Queue<Integer> x = new LinkedList<Integer>();
x.add(5);
x.... | 2017/08/12 | [
"https://Stackoverflow.com/questions/45646928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Well from the [documentation of the method](https://docs.oracle.com/javase/7/docs/api/java/util/Queue.html#remove()) itself its very clear what it does there:
```
/**
* Retrieves and removes the head of this queue. This method differs
* from {@link #poll poll} only in that it throws an exception if this
* queue is... | You are calling method of a queue class(.remove()). And this method remove the first element of the queue and return it. You can use peek method ( Object y=x.peek(); ), if you want to check the first element of the queue without removing it. |
51,034 | If the car's acceleration is higher when the wheel's angular acceleration is higher(tangential acceleration=alpha x radius). Why are higher gears not used to accomplish the acceleration of the car instead of lower gears? | 2022/05/19 | [
"https://engineering.stackexchange.com/questions/51034",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/35653/"
] | ### The Rotational Inertia of individual gears doesn't matter.
You are way overestimating the effect of rotating gears on overall acceleration. The mass of gears is inconsequential compared to the weight of the vehicle (and the rest of the rotating mass. So a larger diameter first gear does have a slightly larger rota... | It is down to power against drag ie rolling & aerodynamic. After about 40mph, the aerodynamic drag is larger and increases with the square of the speed.
Basically the vehicle has to push more and more air out of the way the faster it goes. Once the power equals the sum of the drag, acceleration will be zero.
And it w... |
51,034 | If the car's acceleration is higher when the wheel's angular acceleration is higher(tangential acceleration=alpha x radius). Why are higher gears not used to accomplish the acceleration of the car instead of lower gears? | 2022/05/19 | [
"https://engineering.stackexchange.com/questions/51034",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/35653/"
] | ### The Rotational Inertia of individual gears doesn't matter.
You are way overestimating the effect of rotating gears on overall acceleration. The mass of gears is inconsequential compared to the weight of the vehicle (and the rest of the rotating mass. So a larger diameter first gear does have a slightly larger rota... | You are mixed UP. The angular acceleration of the wheel does not effect the entire car's acceleration. What will, is the force applied to the ground from the tires. |
51,034 | If the car's acceleration is higher when the wheel's angular acceleration is higher(tangential acceleration=alpha x radius). Why are higher gears not used to accomplish the acceleration of the car instead of lower gears? | 2022/05/19 | [
"https://engineering.stackexchange.com/questions/51034",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/35653/"
] | ### The Rotational Inertia of individual gears doesn't matter.
You are way overestimating the effect of rotating gears on overall acceleration. The mass of gears is inconsequential compared to the weight of the vehicle (and the rest of the rotating mass. So a larger diameter first gear does have a slightly larger rota... | Every engine will start to choke when demand torque from the transmission, or better said from the tires, gets close to the engine's output torque at that state, RPM, breathing, engine capacity to shed the heat, and many other factors.
All engines need a burst of torque to accelerate their angular speed and that torqu... |
572,961 | I am trying to make a wireless charger for a small handheld device. I've tried searching on the internet for something read-made, but everything I could find was much larger than I could fit.
The way I understand how wireless power works is that you basically have an air-core transformer with a 1:1 turn ratio - which ... | 2021/06/26 | [
"https://electronics.stackexchange.com/questions/572961",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/225105/"
] | What you are trying to achieve is a DIY Qi-Charger! Awesome!
Qi-charger usually work at an operating frequency between 87 to 205 kHz. Usually 100kHz is fine. To assure neat power transmission, it is essential, that both coils are more or less in sync, so you want the receiver coil to have a resonating frequency at abo... | **Reason for drop in the supply Voltage:**
From the image, a thin wire with turns is used as a coil. Higher frequencies due to the **skin effect**, the concentration of charge is more near the surface as compared to the core of the conductor. The ohmic resistance of the conductor is increased due to the concentration o... |
67,359,088 | I am writing a ruby file that is called from zsh and, among others, I am trying to pass an array as an input variable like that:
```
ruby cim_manager.rb test --target=WhiteLabel --devices=["iPhone 8", "iPhone 12 Pro"]
```
Inside my ruby file I have a function:
```
# Generates a hash value from an array of arguments... | 2021/05/02 | [
"https://Stackoverflow.com/questions/67359088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1824565/"
] | @ReimondHill : I don't see how the error is possibly related to Ruby. You have a zsh-line, in which you have `--devices= [...`. You could get the same error when doing a
```
echo --devices=["iPhone 8", "iPhone 12 Pro"]
```
An open square bracket is a zsh wildcard construct; for instance, `[aeiou]` is a wildcard whic... | Following the answer from @user1934428, I am extending my ruby file like that:
```
# Generates a hash value from an array of arguments
#
# @param [Array<String>] The array of values. Each value of the array needs to separate the key and the value with "=". All "--" substrings will be replaced for empty substrings
#
# ... |
42,203,047 | Now I want to do a login system . I want to check in table admin if user exist then if it's the case let him log in . I did code the system login but it's not working . Any advice or solution are welcome.
Best Regards A.V
```
<?php
ob_start();
session_start();
?>
<html lang="en">
<head>
<title>Foredec... | 2017/02/13 | [
"https://Stackoverflow.com/questions/42203047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7472400/"
] | It seems you need [`strip`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.strip.html) if need remove `'` and whitespaces from left and right sides:
```
df['Name A'] = df['Name A'].str.strip("' ")
print (df)
Name A
0 John
1 John and Mary
2 Harry
3 P... | Try `.rstrip()`, this will strip all the spaces on the right side of the string |
66,884,910 | I'm using the Formula:
```
totext(cdate({DATEFIELD}),'dd.MMM.yyyy')
```
so I get something like `31.Dec.2020`,`01.Mar.2020` and I noticed that the MMM Format is influenced by the Language Setting of the CR Developer.
I would always like to use the German format `31.Dez.2020`,`01.Mär.2020` (Dec <> Dez, Mar <> Mär).
... | 2021/03/31 | [
"https://Stackoverflow.com/questions/66884910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5239927/"
] | [QTreeWidget](https://doc.qt.io/qt-5/qtreewidget.html) makes widget items convenient.
```
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
treeWidget = new QTreeWidget(this);
setCentralWidget(treeWidget);
treeWidget->setColumnCount(2);
auto root = new QTreeWidgetItem({"Root"});
roo... | You need to store combobox items in model item, for example using `Qt::UserRole`
```
QStringList options = {"one", "two", "three"};
QStandardItem* item = new QStandardItem(options[0]);
item->setData(QVariant(options),Qt::UserRole);
listTwo.append(item);
```
Then you need assign delegate to view. You can assign it fo... |
59,714,963 | I have data which consist training as train\_x and testing train\_y. but major problem is that while fitting to model it shows error like.
Error when checking input: expected dense\_12\_input to have shape (8,) but got array with shape (13923,)
Training data shape is
```
d=np.array(train_x)
d.shape
```
output is
... | 2020/01/13 | [
"https://Stackoverflow.com/questions/59714963",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12174604/"
] | ```
classifier.add(Dense(3923, activation='relu', kernel_initializer='random_normal', input_dim=13923))
classifier.add(Dense(923, activation='relu', kernel_initializer='random_normal'))
classifier.add(Dense(23, activation='relu', kernel_initializer='random_normal'))
classifier.add(Dense(8, activation='sigmoid', kerne... | you should apply your data with shape (n, 8) on your fully connected layer.
but you are trying to apply (6995, 13923).
you have some way to pass this issue.
1-change your fully connected layer input shape (i do not suggest this because your target set or ground truth or train\_y have (n, 8) shape)
2-you should put some... |
18,489,884 | I'm working with servlet + spring. The servlet shows this exception in
```
ApplicationContext context = new ClassPathXmlApplicationContext("my_config.xml");
```
This is ecxeption text:
>
> 28.08.2013 16:27:36 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [my\_spring2] ... | 2013/08/28 | [
"https://Stackoverflow.com/questions/18489884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2725624/"
] | ```
using (ZipArchive zipFile = ZipFile.OpenRead(zipPath))
{
foreach(ZipArchiveEntry zip in zipFile.Entries)
{
System.Console.WriteLine("Zipfile: {0}", zip.FullName);
System.Console.WriteLine("Zipfile: {0}", zip.Length);
}
}
``` | You can use DotNetZip to extract every fileName(and it's properties) out of a zip file.
```
using (ZipFile zipFile = ZipFile.Read(ExistingZipFile))
{
foreach (ZipEntry zip in zipFile)
{
System.Console.WriteLine("Zipfile: {0}", zip.FileName);
System.Console.WriteLine("Zipfile: {0}", zip.Comment);
}
}
... |
211,500 | Say I have a method that inserts a record into the database. I don't need to know the newly-inserted ID or anything else. I have two options:
1. `public void Insert()`
2. `public string Insert()`
In the first: if an insert is successful, the calling code will continue. If it fails, an exception with the details will ... | 2013/09/13 | [
"https://softwareengineering.stackexchange.com/questions/211500",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/-1/"
] | IMO the void method is preferred. In OO programming it is better style to simply use objects and if there is an error throw an exception which can be caught. The exception thrown should be pertinent to the error and descriptive - the descriptive message may not be shown to the user but logged, depending on the scenario... | Overall there is nothing to add Jaycee's answer.
But If I would write an API, I would write it always returning the ID of the record if the insertion suceeded.
```
public Guid CreateCustomer(Customer c){
}
```
Or something the like. Even if you never need the return value, you could call the method simply without ... |
60,295,112 | I know that we can use SPOOL command to export query result in CSV format from sql developer. However, I would like to export the query result as xlsx format instead of CSV format. Is there any command that I can use ?? | 2020/02/19 | [
"https://Stackoverflow.com/questions/60295112",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12923849/"
] | You don't reload table view in `fallQuarterCell`.
`let vc = fallQuarterCell()` creates a new cell. Your collection view doesn't contain it, so `vc.tableView.reloadData()` does nothing.
When you use `collectionView.dequeueReusableCell`, you may get the old cell, so you should reload the table view in this cell. You s... | All you have to do is create a separate cell class for collection view cell, and create an outlet of your table view into that cell class.
---
In your **cellForItemAt** method of the **collection view** do below code:
```
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> ... |
55,533,756 | working with configurations in Spring Boot 2.1, I am circling around the question of how to implement a proper configuration management, where I have both parameters from a properties file and hardcoded values als configuration parameters, as well as default values for each parameter. Finally, I would need to have some... | 2019/04/05 | [
"https://Stackoverflow.com/questions/55533756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3996393/"
] | Instead of defining one variable for each element in the list, you can simply get the value of each element via its index:
```
h[0] # first element of the list (2.3)
h[1] # second element of the list (1.4)
h[2] # third element of the list (4.5)
# etc
```
which you can use like `print(h[0])`.
`len(h)` gives you the ... | I would suggest you stick with the list for storing data , and access it via `h[i]`
However , you can still have your wish using exec:
```
for i,x in enumerate(h):
exec(f'L{i}=x')
```
Please note that the first L will be L0 , change the above code if you want to start with 1. |
55,533,756 | working with configurations in Spring Boot 2.1, I am circling around the question of how to implement a proper configuration management, where I have both parameters from a properties file and hardcoded values als configuration parameters, as well as default values for each parameter. Finally, I would need to have some... | 2019/04/05 | [
"https://Stackoverflow.com/questions/55533756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3996393/"
] | If I understand you correctly, it would help to create a dict from the list.
You can use this dict comprehension statement.
```
h = [2.3, 1.4, 4.5, 4.5, 1.4, 2.3]
result = {f"L{index+1}": value for index, value in enumerate(h)}
> {'L1': 2.3, 'L2': 1.4, 'L3': 4.5, 'L4': 4.5, 'L5': 1.4, 'L6': 2.3}
```
And you can... | I would suggest you stick with the list for storing data , and access it via `h[i]`
However , you can still have your wish using exec:
```
for i,x in enumerate(h):
exec(f'L{i}=x')
```
Please note that the first L will be L0 , change the above code if you want to start with 1. |
55,533,756 | working with configurations in Spring Boot 2.1, I am circling around the question of how to implement a proper configuration management, where I have both parameters from a properties file and hardcoded values als configuration parameters, as well as default values for each parameter. Finally, I would need to have some... | 2019/04/05 | [
"https://Stackoverflow.com/questions/55533756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3996393/"
] | If I understand you correctly, it would help to create a dict from the list.
You can use this dict comprehension statement.
```
h = [2.3, 1.4, 4.5, 4.5, 1.4, 2.3]
result = {f"L{index+1}": value for index, value in enumerate(h)}
> {'L1': 2.3, 'L2': 1.4, 'L3': 4.5, 'L4': 4.5, 'L5': 1.4, 'L6': 2.3}
```
And you can... | Instead of defining one variable for each element in the list, you can simply get the value of each element via its index:
```
h[0] # first element of the list (2.3)
h[1] # second element of the list (1.4)
h[2] # third element of the list (4.5)
# etc
```
which you can use like `print(h[0])`.
`len(h)` gives you the ... |
69,987 | My party is about to enter a room full of enemies so I cast Spirit Guardians on myself designating my party as friendly. Our druid casts fog cloud or our warlock casts magical darkness in the room then I proceed to move through the fog or darkness using dodge as my action hoping to damage the enemy with the spirits.
W... | 2015/10/16 | [
"https://rpg.stackexchange.com/questions/69987",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/25227/"
] | How to use [wild shape](http://www.d20pfsrd.com/classes/core-classes/druid#TOC-Wild-Shape-Su-)
==============================================================================================
The creature takes a standard action that doesn't provoke attacks of opportunity to use the [supernatural ability](http://www.d20... | * You do not gain racial skill bonuses from the type of creature that you shapeshift into.
* In addition to the size modifiers to stats listed under the spell that you're mimicking with Wild Shape (ie, Beast Shape II, etc.), you also gain the standard size modifiers to attack, CMB, CMD, AC, and Stealth checks. If you a... |
69,987 | My party is about to enter a room full of enemies so I cast Spirit Guardians on myself designating my party as friendly. Our druid casts fog cloud or our warlock casts magical darkness in the room then I proceed to move through the fog or darkness using dodge as my action hoping to damage the enemy with the spirits.
W... | 2015/10/16 | [
"https://rpg.stackexchange.com/questions/69987",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/25227/"
] | * You do not gain racial skill bonuses from the type of creature that you shapeshift into.
* In addition to the size modifiers to stats listed under the spell that you're mimicking with Wild Shape (ie, Beast Shape II, etc.), you also gain the standard size modifiers to attack, CMB, CMD, AC, and Stealth checks. If you a... | I would add that you also do not get special attacks/abilities from the form that are not explicitly listed under the "Wild Shape" spell. For example, Giant Toad has a swallow whole ability, but no level of Wild Shape lets you get that ability. So no swallow whole attack for you! |
69,987 | My party is about to enter a room full of enemies so I cast Spirit Guardians on myself designating my party as friendly. Our druid casts fog cloud or our warlock casts magical darkness in the room then I proceed to move through the fog or darkness using dodge as my action hoping to damage the enemy with the spirits.
W... | 2015/10/16 | [
"https://rpg.stackexchange.com/questions/69987",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/25227/"
] | How to use [wild shape](http://www.d20pfsrd.com/classes/core-classes/druid#TOC-Wild-Shape-Su-)
==============================================================================================
The creature takes a standard action that doesn't provoke attacks of opportunity to use the [supernatural ability](http://www.d20... | I would add that you also do not get special attacks/abilities from the form that are not explicitly listed under the "Wild Shape" spell. For example, Giant Toad has a swallow whole ability, but no level of Wild Shape lets you get that ability. So no swallow whole attack for you! |
60,127,408 | Whenever I am trying to publish Azure Function for Python app on Azure Function then I got the below error:-
I want to publish azure function for python using the command line
command:- `func azure functionapp <Function Name> --Python`
[](https://i.s... | 2020/02/08 | [
"https://Stackoverflow.com/questions/60127408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11824322/"
] | The output makes sense. Presumably you thought you were defining a string with 7 characters? Take a look at `str.size()`. You defined a string with 12 characters!
Even though you were able to type `"hello☺"` into your program, this string literal does not consist of just seven bytes. Each of the last two characters ge... | Thanks everybody for help!
Using these 2 links, I was able to found some relevant functions:
* <https://en.cppreference.com/w/cpp/string/multibyte/mbrtoc32>
* [How to convert a Unicode code point to characters in C++ using ICU?](https://stackoverflow.com/questions/23322438/how-to-convert-a-unicode-code-point-to-chara... |
41,342,668 | Looks like I am being held hostage by the Atomineer Pro Documentation add-in for Visual Studio! The trail period is over, I have no use for it! But now everytime I do something in Visual Studio I get an error message and get sent to their web site!
I have looked all over to find out how to uninstall it and have not fo... | 2016/12/27 | [
"https://Stackoverflow.com/questions/41342668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1863408/"
] | I ran into this too running on Windows 10 and VS 2013. Ended up installing and running IObit Uninstaller, which clean up the registry, but Atomineer was still loading in Visual Studio. My second pass was to search my C: drive for "Atomineer" which got several hits including some in a VS AddIns folder (I think). I just ... | *Visual Studio 2015 onwards (Standard VS Extension)*
* In Visual Studio, go to **Tools > Extensions and Updates**, select Atomineer from the list, and click the Uninstall button.
*Visual Studio 2005-2013 (Standard VS Add-in)*
* Use **Control Panel > Programs and Features** to uninstall it just like any other app, **... |
10,070,924 | I am doing a project in which,i have to give the user a message at the time of installation only.After that the message should be hidden.Now whenever i run the program the message will be displayed.I want to avoid it. I want to do it programatically in android.Can anyone help to resolve this issue?
Thanks in Advance | 2012/04/09 | [
"https://Stackoverflow.com/questions/10070924",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1277837/"
] | No, absolutely not1, in C++.
You should avoid pointers *as much as possible*, in modern C++. Use pointers only when you really have to, and try to see if you can use smart pointers (like `shared_ptr`, `unique_ptr`) in those cases. Use manual heap allocations (`new`/`delete`) sparingly, let the language deal with alloc... | Because if you use pointers everywhere possible your code might end up looking like this
```
typedef solution_type (*algorithm_ptr_type) (
problem_type problem,
void (*post_evaluation_callback)(void *move, int score)/* = NULL*/
);
```
Or maybe this
```
#include <stdio.h>
#define A(a) G a();
#define B(a) G... |
10,070,924 | I am doing a project in which,i have to give the user a message at the time of installation only.After that the message should be hidden.Now whenever i run the program the message will be displayed.I want to avoid it. I want to do it programatically in android.Can anyone help to resolve this issue?
Thanks in Advance | 2012/04/09 | [
"https://Stackoverflow.com/questions/10070924",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1277837/"
] | You should generally use pointers only when needed. In C, that tends to be quite a bit. In C++, most code should not use pointers directly at all -- it should use some sort of smarter class that wraps a pointer (`unique_ptr`, `shared_ptr`, `vector`, etc.) | Because if you use pointers everywhere possible your code might end up looking like this
```
typedef solution_type (*algorithm_ptr_type) (
problem_type problem,
void (*post_evaluation_callback)(void *move, int score)/* = NULL*/
);
```
Or maybe this
```
#include <stdio.h>
#define A(a) G a();
#define B(a) G... |
10,070,924 | I am doing a project in which,i have to give the user a message at the time of installation only.After that the message should be hidden.Now whenever i run the program the message will be displayed.I want to avoid it. I want to do it programatically in android.Can anyone help to resolve this issue?
Thanks in Advance | 2012/04/09 | [
"https://Stackoverflow.com/questions/10070924",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1277837/"
] | No, absolutely not1, in C++.
You should avoid pointers *as much as possible*, in modern C++. Use pointers only when you really have to, and try to see if you can use smart pointers (like `shared_ptr`, `unique_ptr`) in those cases. Use manual heap allocations (`new`/`delete`) sparingly, let the language deal with alloc... | You should generally use pointers only when needed. In C, that tends to be quite a bit. In C++, most code should not use pointers directly at all -- it should use some sort of smarter class that wraps a pointer (`unique_ptr`, `shared_ptr`, `vector`, etc.) |
71,005 | I'm trying to digitally sign a message m using El Gamal. So far I've been unable to verify the digital signature ive made using El Gamal.
I am using prime number, **p = 8369**. prime root **g = 3031**. Private key parameter **x = 61**. and the message **m = 9876**
I am calculating **y** and **r** to be:
* y = 3031^6... | 2019/06/02 | [
"https://crypto.stackexchange.com/questions/71005",
"https://crypto.stackexchange.com",
"https://crypto.stackexchange.com/users/69628/"
] | In general case, $k^{-1}$ is equal to $x$ such that $x \cdot k=1$. In your question, to computing $11^{-1}$, you must find $x$ such that $x\cdot11=1 \pmod {8368}$. You can compute $x$ by using the extended Euclidean algorithm. | In this case it should be 11^(-1)= 3043 mod 8368
You can use [this calculator](http://public.hochschule-trier.de/~knorr/multiplikativesInverse.php?a=11&n=8368&submit=Berechnen) for example. |
13,588,747 | why `<script> {'foo':'bar'}</script>` caused **Uncaught SyntaxError: Unexpected token :** at chrome
and `<script> {foo:'bar'}</script>` just fine. | 2012/11/27 | [
"https://Stackoverflow.com/questions/13588747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291065/"
] | Because it's not an object literal, it's a code block. What's inside the brackets is not parsed as key-value pairs, it's parsed as code.
`foo: 'bar'` is fine as code, as `foo:` is a label and `'bar'` is an expression.
`'foo':` is not ok as code as a label can't be a string, it has to be an identifier.
To make it an ... | Note that this is not [JSON](http://json.org/), where you would need to use double-quotes (`"`).
As you are putting this object literal directly into a `<script>` element, it is not parsed as an [expression](https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Expressions_and_Operators) (where it would be a valid... |
100,658 | The [Stone Warder](http://www.d20pfsrd.com/classes/core-classes/sorcerer/archetypes/paizo-sorcerer-archetypes/stone-warder-sorcerer/) archetype for Sorcerer includes:
>
> Power of Stone (Su)
>
>
> A stone warder draws power from natural rock, and gains a +1 bonus to her caster level when in hills, mountains, or und... | 2017/05/31 | [
"https://rpg.stackexchange.com/questions/100658",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/28326/"
] | The [Magic](http://www.d20pfsrd.com/magic/) rules don't mention "spell type" or anything close to it at all. Then the wording for the elemental bloodline arcana must be wrong, and "spell's type" may refer to spell descriptor. Then your damaging spells should all get the acid or earth descriptor in place of their origin... | Yes, it's a valid choice.
-------------------------
You can learn those spells just fine, the ability simply prevents you from **casting** spells with those descriptors. Nothing prevents you from using extraordinary or supernatural abilities that emulate those spells, or from learning those spells, or even from activa... |
57,542,535 | I am trying to make an Attendance App for my College. I am using CardView Inside a Recycler View. Inside my Card View is a checkBox to mark the attendance of the particular student. The problem is that if i mark say, Student 1,2 and 3. some random cards on position 10,11,12 or anything else(random) gets marked on it's ... | 2019/08/18 | [
"https://Stackoverflow.com/questions/57542535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11913109/"
] | I’ve enabled Places API and that helped me.
Do the following in the doc
<https://developers.google.com/places/ios-sdk/start> | This error you're getting is most likely specifically caused by your Cloud project configuration, not due to your own code implementation, especially considering that you get the same error when using Google's sample code (which fully works if you use a valid API key from a valid project).
First of all, **billing** mu... |
57,542,535 | I am trying to make an Attendance App for my College. I am using CardView Inside a Recycler View. Inside my Card View is a checkBox to mark the attendance of the particular student. The problem is that if i mark say, Student 1,2 and 3. some random cards on position 10,11,12 or anything else(random) gets marked on it's ... | 2019/08/18 | [
"https://Stackoverflow.com/questions/57542535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11913109/"
] | I got the same error even after I enabled the Places API & generated the key as per the guide. But I didn't set the **billing account** for this API. Once I set that, the API was working properly. Just make sure you set up everything that's in the document
<https://developers.google.com/places/ios-sdk/start> | This error you're getting is most likely specifically caused by your Cloud project configuration, not due to your own code implementation, especially considering that you get the same error when using Google's sample code (which fully works if you use a valid API key from a valid project).
First of all, **billing** mu... |
57,542,535 | I am trying to make an Attendance App for my College. I am using CardView Inside a Recycler View. Inside my Card View is a checkBox to mark the attendance of the particular student. The problem is that if i mark say, Student 1,2 and 3. some random cards on position 10,11,12 or anything else(random) gets marked on it's ... | 2019/08/18 | [
"https://Stackoverflow.com/questions/57542535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11913109/"
] | I’ve enabled Places API and that helped me.
Do the following in the doc
<https://developers.google.com/places/ios-sdk/start> | I faced the same issue. The documentation doesn't fully explain how to active your API key. Here's what I figured out...
* Make sure you've got billing enabled on your Google Cloud Platform
* Go to your project on Google Cloud Platform
* Go to **API's & Services** => **Library**
* Search for **Places API**
* Click **E... |
57,542,535 | I am trying to make an Attendance App for my College. I am using CardView Inside a Recycler View. Inside my Card View is a checkBox to mark the attendance of the particular student. The problem is that if i mark say, Student 1,2 and 3. some random cards on position 10,11,12 or anything else(random) gets marked on it's ... | 2019/08/18 | [
"https://Stackoverflow.com/questions/57542535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11913109/"
] | I got the same error even after I enabled the Places API & generated the key as per the guide. But I didn't set the **billing account** for this API. Once I set that, the API was working properly. Just make sure you set up everything that's in the document
<https://developers.google.com/places/ios-sdk/start> | I’ve enabled Places API and that helped me.
Do the following in the doc
<https://developers.google.com/places/ios-sdk/start> |
57,542,535 | I am trying to make an Attendance App for my College. I am using CardView Inside a Recycler View. Inside my Card View is a checkBox to mark the attendance of the particular student. The problem is that if i mark say, Student 1,2 and 3. some random cards on position 10,11,12 or anything else(random) gets marked on it's ... | 2019/08/18 | [
"https://Stackoverflow.com/questions/57542535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11913109/"
] | I got the same error even after I enabled the Places API & generated the key as per the guide. But I didn't set the **billing account** for this API. Once I set that, the API was working properly. Just make sure you set up everything that's in the document
<https://developers.google.com/places/ios-sdk/start> | I faced the same issue. The documentation doesn't fully explain how to active your API key. Here's what I figured out...
* Make sure you've got billing enabled on your Google Cloud Platform
* Go to your project on Google Cloud Platform
* Go to **API's & Services** => **Library**
* Search for **Places API**
* Click **E... |
8,466,410 | I want to open a web page on the same tab when the user clicks a movieclip. I'm using this method:
```
var url:String = "http://www.google.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request);
} catch (e:Error) {
trace("Error occurred!");
}
```
But I have no idea of how to open it sen... | 2011/12/11 | [
"https://Stackoverflow.com/questions/8466410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/310648/"
] | Yes, it is possible, by specifying POST as the method on URLRequest, and using flash.net.URLVariables for the vars. This is the example from the documentation:
<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.html>
```
package {
import flash.display.Sprite;
import flash... | Regarding to "sub-question" above:
>
> *for some reason the vars were send using GET instead of POST, any
> idea?*
>
>
>
That post [AS3 POST Request sending as a GET](https://stackoverflow.com/questions/3557264/as3-post-request-sending-as-a-get) may help if you are stumble upon this post like me.
Basic idea is: ... |
8,466,410 | I want to open a web page on the same tab when the user clicks a movieclip. I'm using this method:
```
var url:String = "http://www.google.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request);
} catch (e:Error) {
trace("Error occurred!");
}
```
But I have no idea of how to open it sen... | 2011/12/11 | [
"https://Stackoverflow.com/questions/8466410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/310648/"
] | Yes, it is possible, by specifying POST as the method on URLRequest, and using flash.net.URLVariables for the vars. This is the example from the documentation:
<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.html>
```
package {
import flash.display.Sprite;
import flash... | If running in Flash Player and the referenced form has no body, Flash Player automatically uses a GET operation, even if the method is set to URLRequestMethod.POST. For this reason, it is recommended to always include a "dummy" body to ensure that the correct method is used. |
8,466,410 | I want to open a web page on the same tab when the user clicks a movieclip. I'm using this method:
```
var url:String = "http://www.google.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request);
} catch (e:Error) {
trace("Error occurred!");
}
```
But I have no idea of how to open it sen... | 2011/12/11 | [
"https://Stackoverflow.com/questions/8466410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/310648/"
] | Regarding to "sub-question" above:
>
> *for some reason the vars were send using GET instead of POST, any
> idea?*
>
>
>
That post [AS3 POST Request sending as a GET](https://stackoverflow.com/questions/3557264/as3-post-request-sending-as-a-get) may help if you are stumble upon this post like me.
Basic idea is: ... | If running in Flash Player and the referenced form has no body, Flash Player automatically uses a GET operation, even if the method is set to URLRequestMethod.POST. For this reason, it is recommended to always include a "dummy" body to ensure that the correct method is used. |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | I ran into this question looking to see if pandas can natively read partitioned parquet datasets. I have to say that the current answer is unnecessarily verbose (making it difficult to parse). I also imagine that it's not particularly efficient to be constantly opening/closing file handles then scanning to the end of t... | This helped me to load all parquet files into one data frame
```
import glob
files = glob.glob("*.snappy.parquet")
data = [pd.read_parquet(f,engine='fastparquet') for f in files]
merged_data = pd.concat(data,ignore_index=True)
``` |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | This helped me to load all parquet files into one data frame
```
import glob
files = glob.glob("*.snappy.parquet")
data = [pd.read_parquet(f,engine='fastparquet') for f in files]
merged_data = pd.concat(data,ignore_index=True)
``` | a small change for those trying to read remote files, which helps to read it faster (direct read\_parquet for remote files was doing this much slower for me):
```
import io
merged = []
# remote_reader = ... <- init some remote reader, for example AzureDLFileSystem()
for f in files:
with remote_reader.open(f, 'rb')... |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | I'm having a similar need and I read current Pandas version supports a directory path as argument for the [read\_csv](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html) function. So you can read multiple parquet files like this:
```
import pandas as pd
df = pd.read_parquet('path/t... | a small change for those trying to read remote files, which helps to read it faster (direct read\_parquet for remote files was doing this much slower for me):
```
import io
merged = []
# remote_reader = ... <- init some remote reader, for example AzureDLFileSystem()
for f in files:
with remote_reader.open(f, 'rb')... |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | I'm having a similar need and I read current Pandas version supports a directory path as argument for the [read\_csv](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html) function. So you can read multiple parquet files like this:
```
import pandas as pd
df = pd.read_parquet('path/t... | You can use Dask to read in the multiple Parquet files and write them to a single CSV.
Dask accepts an asterisk (\*) as wildcard / glob character to match related filenames.
Make sure to set `single_file` to `True` and `index` to `False` when writing the CSV file.
```py
import pandas as pd
import numpy as np
# crea... |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | I'm having a similar need and I read current Pandas version supports a directory path as argument for the [read\_csv](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html) function. So you can read multiple parquet files like this:
```
import pandas as pd
df = pd.read_parquet('path/t... | If you are going to copy the files over to your local machine and run your code you could do something like this. The code below assumes that you are running your code in the same directory as the parquet files. It also assumes the naming of files as your provided above: "order. ex: par\_file1,par\_file2,par\_file3 and... |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | I'm having a similar need and I read current Pandas version supports a directory path as argument for the [read\_csv](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html) function. So you can read multiple parquet files like this:
```
import pandas as pd
df = pd.read_parquet('path/t... | This helped me to load all parquet files into one data frame
```
import glob
files = glob.glob("*.snappy.parquet")
data = [pd.read_parquet(f,engine='fastparquet') for f in files]
merged_data = pd.concat(data,ignore_index=True)
``` |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | I ran into this question looking to see if pandas can natively read partitioned parquet datasets. I have to say that the current answer is unnecessarily verbose (making it difficult to parse). I also imagine that it's not particularly efficient to be constantly opening/closing file handles then scanning to the end of t... | a small change for those trying to read remote files, which helps to read it faster (direct read\_parquet for remote files was doing this much slower for me):
```
import io
merged = []
# remote_reader = ... <- init some remote reader, for example AzureDLFileSystem()
for f in files:
with remote_reader.open(f, 'rb')... |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | This helped me to load all parquet files into one data frame
```
import glob
files = glob.glob("*.snappy.parquet")
data = [pd.read_parquet(f,engine='fastparquet') for f in files]
merged_data = pd.concat(data,ignore_index=True)
``` | You can use Dask to read in the multiple Parquet files and write them to a single CSV.
Dask accepts an asterisk (\*) as wildcard / glob character to match related filenames.
Make sure to set `single_file` to `True` and `index` to `False` when writing the CSV file.
```py
import pandas as pd
import numpy as np
# crea... |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | If you are going to copy the files over to your local machine and run your code you could do something like this. The code below assumes that you are running your code in the same directory as the parquet files. It also assumes the naming of files as your provided above: "order. ex: par\_file1,par\_file2,par\_file3 and... | a small change for those trying to read remote files, which helps to read it faster (direct read\_parquet for remote files was doing this much slower for me):
```
import io
merged = []
# remote_reader = ... <- init some remote reader, for example AzureDLFileSystem()
for f in files:
with remote_reader.open(f, 'rb')... |
51,696,655 | I am new to python and I have a scenario where there are multiple parquet files with file names in order. ex: par\_file1,par\_file2,par\_file3 and so on upto 100 files in a folder.
I need to read these parquet files starting from file1 in order and write it to a singe csv file. After writing contents of file1, file2 c... | 2018/08/05 | [
"https://Stackoverflow.com/questions/51696655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10183474/"
] | I ran into this question looking to see if pandas can natively read partitioned parquet datasets. I have to say that the current answer is unnecessarily verbose (making it difficult to parse). I also imagine that it's not particularly efficient to be constantly opening/closing file handles then scanning to the end of t... | You can use Dask to read in the multiple Parquet files and write them to a single CSV.
Dask accepts an asterisk (\*) as wildcard / glob character to match related filenames.
Make sure to set `single_file` to `True` and `index` to `False` when writing the CSV file.
```py
import pandas as pd
import numpy as np
# crea... |
19,462,235 | So, I'm trying to do EXACTLY this, and while it works on jsfiddle, it will not in any of the browsers I've tried...Any ideas?
Even when it's the only thing on the page, it refuses to work for whatever reason.
<http://jsfiddle.net/RWUdb/101/>
```
<div>
<label>Device:</label>
<select name="Device" id="Device" class="" o... | 2013/10/19 | [
"https://Stackoverflow.com/questions/19462235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1493696/"
] | First&second questions - this code naturally exits because of the logic. Try adding a debug output here to see when producers quit.
```
if (data.size() == 3) {
try {
wait();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
Sy... | I can see your very keen on using threads and that this is the topic of the question but have you considered Observer/Observable?
The Datastorage is your Observable.
The consumers are the Observers. They're looking for change.
I modified your code as such and only have one thread that runs periodically.
Producer... |
20,245,701 | Hi I am using MSAccess (2003) and retrieving an XML recordset from an URL successfully in a macro.
The trouble is the macro and the vba seem to be asynchronous meaning I need a callback on the retrieved xml to continue processing it. I can seem to find anything on the net for a basic VBA callback (I have found stuff o... | 2013/11/27 | [
"https://Stackoverflow.com/questions/20245701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/958980/"
] | I was able to run the following successfully in Access:
```
Public Sub Test()
Dim rs As DAO.Recordset
Application.ImportXML "http://www.w3schools.com/xml/plant_catalog.xml", acStructureAndData
Set rs = CurrentDb.OpenRecordset("PLANT")
rs.MoveLast
Debug.Print rs.RecordCount
End Sub
```
The .xml fi... | A method I used to solving this was to use a do while loop querying the resultant table until a record count > 0 was returned and delaying each repeat by 1 second |
15,812,479 | I want to share a specific part of a page so I use a hashlink for example: `http://en.wikipedia.org/wiki/List_of_GMA_Network_radio_stations#References`
Facebook parses the `<p>` tag closest to the element with the linked id.
Is there a way to tell Facebook what it should use as description? Ideally I'd like to do thi... | 2013/04/04 | [
"https://Stackoverflow.com/questions/15812479",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1333809/"
] | ```
var errorCheck = $(this).parent("form").children(".error").length > 0;
```
When you `.wrap` the text inputs, they are no longer children of the form. Use `.find`
By the way, `$(this + "selector")` is not valid. You probably want to use `$(this).is("selector")` | You will need some sort of reference maintained with the new DOM element. This would be placing it as an initialised DOM element in a variable first (not as a string as you did) and the same for the original element, which will be placed back in to maintain the event:
```
var $inputWrapper = $("<div class=\"inputWrapp... |
33,662,966 | so for my android application i can insert an image to sqlite as a string. But im not sure exactly how i can retrieve this image from the database and convert it to a Image from string and display it in my app. Stuck for weeks, help appreciated! :(
Button Click saves image to sqlite
```
upload.setOnClickListener(ne... | 2015/11/12 | [
"https://Stackoverflow.com/questions/33662966",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5518051/"
] | I have got enough information from comments and a deleted answer from @AntoninLejsek that I can answer this myself.
**TL;DR** C++ compiler does much better job optimizing and C# managed array access costs a lot when done in loop. However unsafe code and fixed access is not enough to match C++.
It seems we need to opt... | Part of the difference may be because of the differences in code between the two versions - you don't assign to `nextCarry` in the C++ `Left` nor in the C# `Right`, but those could be typos in the example.
You'd want to look at the disassembly of both to see the difference, but primarily it is due to the C++ compiler ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.