qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
13,010,597 | I am trying to use `assertXpathCount()` to get the number of rows available in a table.
I am using the Xpath given by the browser of the `<tr>` element. But still I am getting 0 as output.
Are there any special things that I need to keep in mind? | 2012/10/22 | [
"https://Stackoverflow.com/questions/13010597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758595/"
] | You *could* use `CallContext.LogicalSetData` and `CallContext.LogicalGetData`, but I recommend you don't because they don't support any kind of "cloning" when you use simple parallelism (`Task.WhenAny` / `Task.WhenAll`).
I opened a [UserVoice request](http://visualstudio.uservoice.com/forums/121579-visual-studio/sugge... | Basically, I would emphasize: don't do that. `[ThreadStatic]` is never going to play nicely with code that jumps between threads.
But you don't have to. A `Task` already carries state - in fact, it can do it 2 different ways:
* there's an explicit state object, which can hold everything you need
* lambdas/anon-method... |
13,010,597 | I am trying to use `assertXpathCount()` to get the number of rows available in a table.
I am using the Xpath given by the browser of the `<tr>` element. But still I am getting 0 as output.
Are there any special things that I need to keep in mind? | 2012/10/22 | [
"https://Stackoverflow.com/questions/13010597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758595/"
] | Basically, I would emphasize: don't do that. `[ThreadStatic]` is never going to play nicely with code that jumps between threads.
But you don't have to. A `Task` already carries state - in fact, it can do it 2 different ways:
* there's an explicit state object, which can hold everything you need
* lambdas/anon-method... | Have a look on this [thread](https://stackoverflow.com/questions/18086235/initializing-threadstatic-field-still-causes-nullreferenceexception)
On fields marked with ThreadStaticAttribute, initialization occurs only once, in the static constructor. In your code when the new thread with ID 11 is created a new Secret fie... |
13,010,597 | I am trying to use `assertXpathCount()` to get the number of rows available in a table.
I am using the Xpath given by the browser of the `<tr>` element. But still I am getting 0 as output.
Are there any special things that I need to keep in mind? | 2012/10/22 | [
"https://Stackoverflow.com/questions/13010597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758595/"
] | You *could* use `CallContext.LogicalSetData` and `CallContext.LogicalGetData`, but I recommend you don't because they don't support any kind of "cloning" when you use simple parallelism (`Task.WhenAny` / `Task.WhenAll`).
I opened a [UserVoice request](http://visualstudio.uservoice.com/forums/121579-visual-studio/sugge... | Getting a task continuation to execute on the same thread requires a synchronization provider. That's an expensive word, the simple diagnostic is by looking at the value of System.Threading.SynchronizationContext.Current in the debugger.
That value will be **null** in console mode app. There is no provider that can ma... |
13,010,597 | I am trying to use `assertXpathCount()` to get the number of rows available in a table.
I am using the Xpath given by the browser of the `<tr>` element. But still I am getting 0 as output.
Are there any special things that I need to keep in mind? | 2012/10/22 | [
"https://Stackoverflow.com/questions/13010597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758595/"
] | Getting a task continuation to execute on the same thread requires a synchronization provider. That's an expensive word, the simple diagnostic is by looking at the value of System.Threading.SynchronizationContext.Current in the debugger.
That value will be **null** in console mode app. There is no provider that can ma... | Have a look on this [thread](https://stackoverflow.com/questions/18086235/initializing-threadstatic-field-still-causes-nullreferenceexception)
On fields marked with ThreadStaticAttribute, initialization occurs only once, in the static constructor. In your code when the new thread with ID 11 is created a new Secret fie... |
13,010,597 | I am trying to use `assertXpathCount()` to get the number of rows available in a table.
I am using the Xpath given by the browser of the `<tr>` element. But still I am getting 0 as output.
Are there any special things that I need to keep in mind? | 2012/10/22 | [
"https://Stackoverflow.com/questions/13010597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758595/"
] | You *could* use `CallContext.LogicalSetData` and `CallContext.LogicalGetData`, but I recommend you don't because they don't support any kind of "cloning" when you use simple parallelism (`Task.WhenAny` / `Task.WhenAll`).
I opened a [UserVoice request](http://visualstudio.uservoice.com/forums/121579-visual-studio/sugge... | Have a look on this [thread](https://stackoverflow.com/questions/18086235/initializing-threadstatic-field-still-causes-nullreferenceexception)
On fields marked with ThreadStaticAttribute, initialization occurs only once, in the static constructor. In your code when the new thread with ID 11 is created a new Secret fie... |
13,010,597 | I am trying to use `assertXpathCount()` to get the number of rows available in a table.
I am using the Xpath given by the browser of the `<tr>` element. But still I am getting 0 as output.
Are there any special things that I need to keep in mind? | 2012/10/22 | [
"https://Stackoverflow.com/questions/13010597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758595/"
] | You *could* use `CallContext.LogicalSetData` and `CallContext.LogicalGetData`, but I recommend you don't because they don't support any kind of "cloning" when you use simple parallelism (`Task.WhenAny` / `Task.WhenAll`).
I opened a [UserVoice request](http://visualstudio.uservoice.com/forums/121579-visual-studio/sugge... | [AsyncLocal<T>](https://learn.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1?view=netframework-4.8) provides support for maintaining variables scoped to a particular asynchronous code flow.
Changing the variable type to AsyncLocal, e.g.,
```cs
private static AsyncLocal<string> Secret = new AsyncLocal<s... |
13,010,597 | I am trying to use `assertXpathCount()` to get the number of rows available in a table.
I am using the Xpath given by the browser of the `<tr>` element. But still I am getting 0 as output.
Are there any special things that I need to keep in mind? | 2012/10/22 | [
"https://Stackoverflow.com/questions/13010597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1758595/"
] | [AsyncLocal<T>](https://learn.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1?view=netframework-4.8) provides support for maintaining variables scoped to a particular asynchronous code flow.
Changing the variable type to AsyncLocal, e.g.,
```cs
private static AsyncLocal<string> Secret = new AsyncLocal<s... | Have a look on this [thread](https://stackoverflow.com/questions/18086235/initializing-threadstatic-field-still-causes-nullreferenceexception)
On fields marked with ThreadStaticAttribute, initialization occurs only once, in the static constructor. In your code when the new thread with ID 11 is created a new Secret fie... |
1,502,877 | Let $D=\{z\in \mathbb{C}: |z|<1\}$. Then there exists a holomorphic function $$f:D\to \bar{D}$$ with $f(0)=0$ with the property
1. $f'(0)=1/2$
2. $|f(1/3)|=1/4$
3. $f(1/3)=1/2$
4. $|f'(0)|=\sec{\pi/6}$
I have no idea how to come up with such a fuction, which satisfies atmost **two** of the above conditions as there ... | 2015/10/29 | [
"https://math.stackexchange.com/questions/1502877",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/259670/"
] | By [Schwarz lemma](https://en.wikipedia.org/wiki/Schwarz_lemma), $1$, $2$ and $3$ are true trivially. | I think 3rd is not true. As by Schwarz lemma $|f(z)|\leq|z|$ which is not true in 3rd option |
482,302 | Let $$f(x,y) = \frac{x^3 + y^3}{x^2 + y^2}.$$
Does this function have a limit when $(x,y) \to (0,0)$?
I've tried several paths and I keep getting $0$, so I think the limit is $0$, but how do I prove it? | 2013/09/02 | [
"https://math.stackexchange.com/questions/482302",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/92777/"
] | $$\frac{|x^3+y^3|}{x^2+y^2}\leq \frac{|x|x^2+|y|y^2}{x^2+y^2}\leq\frac{(|x|+|y|)(x^2+y^2)}{x^2+y^2}=|x|+|y|\to0$$ | One way is to use polar coordinates; if you let $x=r\cos\theta$ and $y=r\sin\theta$ and use $x^2+y^2=r^2$,
you should be able to show the limit is 0. |
482,302 | Let $$f(x,y) = \frac{x^3 + y^3}{x^2 + y^2}.$$
Does this function have a limit when $(x,y) \to (0,0)$?
I've tried several paths and I keep getting $0$, so I think the limit is $0$, but how do I prove it? | 2013/09/02 | [
"https://math.stackexchange.com/questions/482302",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/92777/"
] | $$\frac{|x^3+y^3|}{x^2+y^2}\leq \frac{|x|x^2+|y|y^2}{x^2+y^2}\leq\frac{(|x|+|y|)(x^2+y^2)}{x^2+y^2}=|x|+|y|\to0$$ | This form might make it easier to see what is happening:
$\dfrac{x^3+y^3}{x^2+y^2}=\dfrac{x}{1+\frac{y^2}{x^2}}+\dfrac{y}{1+\frac{x^2}{y^2}}$ |
482,302 | Let $$f(x,y) = \frac{x^3 + y^3}{x^2 + y^2}.$$
Does this function have a limit when $(x,y) \to (0,0)$?
I've tried several paths and I keep getting $0$, so I think the limit is $0$, but how do I prove it? | 2013/09/02 | [
"https://math.stackexchange.com/questions/482302",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/92777/"
] | $$\frac{|x^3+y^3|}{x^2+y^2}\leq \frac{|x|x^2+|y|y^2}{x^2+y^2}\leq\frac{(|x|+|y|)(x^2+y^2)}{x^2+y^2}=|x|+|y|\to0$$ | Hint: $$\left|x^3+y^3\right|=\left|(x+y)(x^2+y^2-xy)\right| \le \frac32 |x+y|(x^2+y^2)$$ |
70,172,683 | I am trying to get my hand dirty with Javascript
I want to solve the following exercise (found on Codewars):
>
> Given an array of integers, find the one that appears an odd number of times.
>
>
> There will always be only one integer that appears an odd number of
> times.
>
>
> [7] should return 7, because it o... | 2021/11/30 | [
"https://Stackoverflow.com/questions/70172683",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17554021/"
] | You could take a [bitwise XOR `^`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR) which wipes out even count values.
```js
const
odd = array => array.reduce((a, b) => a ^ b, 0);
console.log(odd([1, 2, 2, 3, 3, 3, 4, 3, 3, 3, 2, 2, 1]));
console.log(odd([7]));
console.log(... | Updated your answer with comment.
```js
function findOdd(A) {
const isOdd = (x) => {
return x % 2;
}
const counts = {}; // key with will be unique set of A and value will be part will be occurence count
for (i of A) {
counts[i] = counts[i] ? counts[i] + 1 : 1;
}
// const numOccurences = (Object.... |
70,172,683 | I am trying to get my hand dirty with Javascript
I want to solve the following exercise (found on Codewars):
>
> Given an array of integers, find the one that appears an odd number of times.
>
>
> There will always be only one integer that appears an odd number of
> times.
>
>
> [7] should return 7, because it o... | 2021/11/30 | [
"https://Stackoverflow.com/questions/70172683",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17554021/"
] | You could take a [bitwise XOR `^`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR) which wipes out even count values.
```js
const
odd = array => array.reduce((a, b) => a ^ b, 0);
console.log(odd([1, 2, 2, 3, 3, 3, 4, 3, 3, 3, 2, 2, 1]));
console.log(odd([7]));
console.log(... | @Nina Scholz's first algorithm is a masterpiece. Basically it is very simple if you are ok with bitwise operations. I just would like to simplify the same thing down to daily math.
```js
var odd = array => array.sort().reduce((a,b,i) => i%2 ? a-b : a+b);
console.log(odd([1, 2, 2, 3, 3, 3, 4, 3, 3, 3, 2, 2, 1]));
cons... |
70,172,683 | I am trying to get my hand dirty with Javascript
I want to solve the following exercise (found on Codewars):
>
> Given an array of integers, find the one that appears an odd number of times.
>
>
> There will always be only one integer that appears an odd number of
> times.
>
>
> [7] should return 7, because it o... | 2021/11/30 | [
"https://Stackoverflow.com/questions/70172683",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17554021/"
] | Updated your answer with comment.
```js
function findOdd(A) {
const isOdd = (x) => {
return x % 2;
}
const counts = {}; // key with will be unique set of A and value will be part will be occurence count
for (i of A) {
counts[i] = counts[i] ? counts[i] + 1 : 1;
}
// const numOccurences = (Object.... | @Nina Scholz's first algorithm is a masterpiece. Basically it is very simple if you are ok with bitwise operations. I just would like to simplify the same thing down to daily math.
```js
var odd = array => array.sort().reduce((a,b,i) => i%2 ? a-b : a+b);
console.log(odd([1, 2, 2, 3, 3, 3, 4, 3, 3, 3, 2, 2, 1]));
cons... |
12,746,801 | So I was talking to somebody who runs Interviews (your standard HR manager) about what they really look for in an interview, and he mentioned something (among many other things) about testing for JVM Instruction knowledge.
I didn't know what those were, but I thought he was talking about bytecode instructions.
I hav... | 2012/10/05 | [
"https://Stackoverflow.com/questions/12746801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/668540/"
] | >
> So my question is, are there such thing as JVM Instructions that are separate from bytecode instructions, or they one and the same?
>
>
>
They are one and the same. | He's most likely just talking about bytecode instructions, as that's what the JVM runs. |
12,746,801 | So I was talking to somebody who runs Interviews (your standard HR manager) about what they really look for in an interview, and he mentioned something (among many other things) about testing for JVM Instruction knowledge.
I didn't know what those were, but I thought he was talking about bytecode instructions.
I hav... | 2012/10/05 | [
"https://Stackoverflow.com/questions/12746801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/668540/"
] | He's most likely just talking about bytecode instructions, as that's what the JVM runs. | All i know is that ByteCode is an abstract machine language that is executed by JVM. Some of the instructions that make bytecode are **dadd**(add two numbers), **ddiv**(divide two numbers), **dload**, etc. They fall into certain groups type conversion, arithmetic and logic, etc. So i guess they are ***same***. These in... |
12,746,801 | So I was talking to somebody who runs Interviews (your standard HR manager) about what they really look for in an interview, and he mentioned something (among many other things) about testing for JVM Instruction knowledge.
I didn't know what those were, but I thought he was talking about bytecode instructions.
I hav... | 2012/10/05 | [
"https://Stackoverflow.com/questions/12746801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/668540/"
] | >
> So my question is, are there such thing as JVM Instructions that are separate from bytecode instructions, or they one and the same?
>
>
>
They are one and the same. | All i know is that ByteCode is an abstract machine language that is executed by JVM. Some of the instructions that make bytecode are **dadd**(add two numbers), **ddiv**(divide two numbers), **dload**, etc. They fall into certain groups type conversion, arithmetic and logic, etc. So i guess they are ***same***. These in... |
6,974,170 | here i have this little example snippet and it just wont serve index.html from www dir. what is wrong with the code?
```
from twisted.internet import reactor
from twisted.web import static, server, script
import os
DIRECTORY = os.getcwd()+"/www"
root = static.File(DIRECTORY)
root.indexNames = [ 'index.rpy', 'index.ht... | 2011/08/07 | [
"https://Stackoverflow.com/questions/6974170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/594401/"
] | Logging can be set up by adding these lines
```
from twisted.python import log
import sys
log.startLogging(sys.stdout)
``` | When I got this error, I had to add the following:
```
def getChild(self, name, request):
# for some reason this is needed for the root Resource to render at all
if name == b'':
return self
return super().getChild(name, request)
``` |
1,276,730 | >
> $A: \text{Humans are at most 12 feet tall}$
>
>
> $B: \text{Humans are at most 9 feet tall}$
>
>
>
Neither implies the other. *A* contradicts *B* and *B* contradicts *A*.
Am I correct? | 2015/05/11 | [
"https://math.stackexchange.com/questions/1276730",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/173685/"
] | In modern logic terminology, back from the Aristotelian doctrine of the [square of opposition](http://plato.stanford.edu/entries/square/), two sentences $\alpha$ and $\beta$ are said to be in a contradiction iff it is the case that $\alpha$ is true when $\beta$ is false and vice-versa, that is, $\alpha$ is false when $... | >
> * A:Humans are at most 12 feet tall
> * B:Humans are at most 9 feet tall
>
>
>
We have:
* A:= $\quad\forall h\in \operatorname{Humans}: \operatorname{tallness}(h)\leq 12$
* B:= $\quad\forall h\in \operatorname{Humans}: \operatorname{tallness}(h)\leq 9$
That is that neither statements' truth *requires* that ... |
95,475 | In Stephen Baxter’s science fiction Novel *Ultima* humans discover mysterious “kernels” which allow high speed space propulsion units to be built. The problem is that these kernels are only to be found 200 miles below the surface of Mercury.
How (in outline) could these kernels be plausibly retrieved from such a great... | 2017/10/20 | [
"https://worldbuilding.stackexchange.com/questions/95475",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/42450/"
] | Mercury surface is very hot (430C). Additionally, the Sun radiation as you approach Mercury with your mining mission could cook your ship's electronics and personnel. So, you need to find a way to approach Mercury. The best way is to approach Mercury at such an angle, as to be in its shadow most of the time. Unfortunat... | If we have a virtually unlimited budget, we could just use unmanned craft to push asteroids out of the asteroid belt to such a point that they'll be slingshotted by the gravity of larger planets into Mercury. Leave it to NASA to optimize the exact number, orbits, sizes, and speeds needed to extract the kernels as safel... |
95,475 | In Stephen Baxter’s science fiction Novel *Ultima* humans discover mysterious “kernels” which allow high speed space propulsion units to be built. The problem is that these kernels are only to be found 200 miles below the surface of Mercury.
How (in outline) could these kernels be plausibly retrieved from such a great... | 2017/10/20 | [
"https://worldbuilding.stackexchange.com/questions/95475",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/42450/"
] | **Like all big engineering projects. You do this in steps.**
One of the steps should be retrieving objects from perhaps 200 miles below the earth's surface. Given our [current limit of about 7.5 miles](https://en.wikipedia.org/wiki/Kola_Superdeep_Borehole), we are a very long way from answering this question.
At tha... | If we have a virtually unlimited budget, we could just use unmanned craft to push asteroids out of the asteroid belt to such a point that they'll be slingshotted by the gravity of larger planets into Mercury. Leave it to NASA to optimize the exact number, orbits, sizes, and speeds needed to extract the kernels as safel... |
95,475 | In Stephen Baxter’s science fiction Novel *Ultima* humans discover mysterious “kernels” which allow high speed space propulsion units to be built. The problem is that these kernels are only to be found 200 miles below the surface of Mercury.
How (in outline) could these kernels be plausibly retrieved from such a great... | 2017/10/20 | [
"https://worldbuilding.stackexchange.com/questions/95475",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/42450/"
] | From a crater at the poles. The temperature at the poles never rises above 180K. No atmosphere or hydrosphere means no heat transfer. Poles are really the only safe location as Mercury is not actually tidally locked as was previously believed.
Craters at the poles never get sunlight and are hypothesized to contain wat... | If we have a virtually unlimited budget, we could just use unmanned craft to push asteroids out of the asteroid belt to such a point that they'll be slingshotted by the gravity of larger planets into Mercury. Leave it to NASA to optimize the exact number, orbits, sizes, and speeds needed to extract the kernels as safel... |
95,475 | In Stephen Baxter’s science fiction Novel *Ultima* humans discover mysterious “kernels” which allow high speed space propulsion units to be built. The problem is that these kernels are only to be found 200 miles below the surface of Mercury.
How (in outline) could these kernels be plausibly retrieved from such a great... | 2017/10/20 | [
"https://worldbuilding.stackexchange.com/questions/95475",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/42450/"
] | **Like all big engineering projects. You do this in steps.**
One of the steps should be retrieving objects from perhaps 200 miles below the earth's surface. Given our [current limit of about 7.5 miles](https://en.wikipedia.org/wiki/Kola_Superdeep_Borehole), we are a very long way from answering this question.
At tha... | Mercury surface is very hot (430C). Additionally, the Sun radiation as you approach Mercury with your mining mission could cook your ship's electronics and personnel. So, you need to find a way to approach Mercury. The best way is to approach Mercury at such an angle, as to be in its shadow most of the time. Unfortunat... |
95,475 | In Stephen Baxter’s science fiction Novel *Ultima* humans discover mysterious “kernels” which allow high speed space propulsion units to be built. The problem is that these kernels are only to be found 200 miles below the surface of Mercury.
How (in outline) could these kernels be plausibly retrieved from such a great... | 2017/10/20 | [
"https://worldbuilding.stackexchange.com/questions/95475",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/42450/"
] | From a crater at the poles. The temperature at the poles never rises above 180K. No atmosphere or hydrosphere means no heat transfer. Poles are really the only safe location as Mercury is not actually tidally locked as was previously believed.
Craters at the poles never get sunlight and are hypothesized to contain wat... | Mercury surface is very hot (430C). Additionally, the Sun radiation as you approach Mercury with your mining mission could cook your ship's electronics and personnel. So, you need to find a way to approach Mercury. The best way is to approach Mercury at such an angle, as to be in its shadow most of the time. Unfortunat... |
95,475 | In Stephen Baxter’s science fiction Novel *Ultima* humans discover mysterious “kernels” which allow high speed space propulsion units to be built. The problem is that these kernels are only to be found 200 miles below the surface of Mercury.
How (in outline) could these kernels be plausibly retrieved from such a great... | 2017/10/20 | [
"https://worldbuilding.stackexchange.com/questions/95475",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/42450/"
] | From a crater at the poles. The temperature at the poles never rises above 180K. No atmosphere or hydrosphere means no heat transfer. Poles are really the only safe location as Mercury is not actually tidally locked as was previously believed.
Craters at the poles never get sunlight and are hypothesized to contain wat... | **Like all big engineering projects. You do this in steps.**
One of the steps should be retrieving objects from perhaps 200 miles below the earth's surface. Given our [current limit of about 7.5 miles](https://en.wikipedia.org/wiki/Kola_Superdeep_Borehole), we are a very long way from answering this question.
At tha... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | if you are using windows vista or higher, you can make a `symbolic link` to the folder. for example:
```
mklink /d C:\pf "C:\Program Files"
mklink /d C:\pf86 "C:\Program Files (x86)"
```
would make a link so `c:\pf` would be your program files folder. I shaved off 300 characters from my path by using this trick.
(I... | A new tool is born, it works very well, have unique features and solve all setx problems: [regenv](https://github.com/lunakid/regenv)
* it works in xp+.
* it is better than setx ,pathed, pathman, setenv
* it is a fork of the old nice setenv tool
```vb
set "var=D:\Bin"
REM ::::: override a system var:
regenv.exe set ... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | This open-source SetEnv command-line tool is good to edit the PATH and other environment variables without limitations. It uses a dynamic buffer so no static limitations like 1024.
<http://www.codeproject.com/Articles/12153/SetEnv>
The choice of a % as a prefix to append to a variable could have been better though, a... | My favorite way is to change the folder names in the PATH variables to use the 8.3 names. [This StackOverflow answer](https://stackoverflow.com/a/20362922/528061) has an awesome script (run from a .bat file) that will generate the "minified" version of the entire PATH variable, which you can then paste into the Edit Va... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | My favorite way is to change the folder names in the PATH variables to use the 8.3 names. [This StackOverflow answer](https://stackoverflow.com/a/20362922/528061) has an awesome script (run from a .bat file) that will generate the "minified" version of the entire PATH variable, which you can then paste into the Edit Va... | I think the best way is the next (with powershell)
With this way also you avoid the litmit of 1024 character.
You can see the code on: <https://gist.github.com/drazul/b92f780689bd89a0d2a7>
```
#------------ Add path to system variable -------------------------------------
$path2add = ';C:\path;'
$systemPath = [Envir... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | This open-source SetEnv command-line tool is good to edit the PATH and other environment variables without limitations. It uses a dynamic buffer so no static limitations like 1024.
<http://www.codeproject.com/Articles/12153/SetEnv>
The choice of a % as a prefix to append to a variable could have been better though, a... | if it is not required to keep system PATH and user PATH separate:
```
::setx /m truncate variable length to 1024 REG ADD
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH /t REG_SZ /f /d "%PATH%"
::empty local path, use system wide only, else it will enlarge with every ... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | You could use a PowerShell script similar to the following:
```
$newPath = 'F:\common tools\git\bin;F:\common tools\python\app;F:\common tools\python\app\scripts;F:\common tools\ruby\bin;F:\masm32\bin;F:\Borland\BCC55\Bin'
$oldPath = [Environment]::GetEnvironmentVariable('PATH', 'Machine');
[Environment]::SetEnvironme... | My favorite way is to change the folder names in the PATH variables to use the 8.3 names. [This StackOverflow answer](https://stackoverflow.com/a/20362922/528061) has an awesome script (run from a .bat file) that will generate the "minified" version of the entire PATH variable, which you can then paste into the Edit Va... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | if you are using windows vista or higher, you can make a `symbolic link` to the folder. for example:
```
mklink /d C:\pf "C:\Program Files"
mklink /d C:\pf86 "C:\Program Files (x86)"
```
would make a link so `c:\pf` would be your program files folder. I shaved off 300 characters from my path by using this trick.
(I... | Just a little ready-to-use packing of the Powershell version . Save this as a `.cmd` or `.bat`, UTF-8 or ASCII text file . Remember to restart programs that were running during the change .
```
@echo off
set br=^
rem br;
pushd "%~dp0" &rem Working/{temp files} Directory . pat>->paf ;
setlocal enableExtensions e... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | You could use a PowerShell script similar to the following:
```
$newPath = 'F:\common tools\git\bin;F:\common tools\python\app;F:\common tools\python\app\scripts;F:\common tools\ruby\bin;F:\masm32\bin;F:\Borland\BCC55\Bin'
$oldPath = [Environment]::GetEnvironmentVariable('PATH', 'Machine');
[Environment]::SetEnvironme... | This open-source SetEnv command-line tool is good to edit the PATH and other environment variables without limitations. It uses a dynamic buffer so no static limitations like 1024.
<http://www.codeproject.com/Articles/12153/SetEnv>
The choice of a % as a prefix to append to a variable could have been better though, a... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | A new tool is born, it works very well, have unique features and solve all setx problems: [regenv](https://github.com/lunakid/regenv)
* it works in xp+.
* it is better than setx ,pathed, pathman, setenv
* it is a fork of the old nice setenv tool
```vb
set "var=D:\Bin"
REM ::::: override a system var:
regenv.exe set ... | if it is not required to keep system PATH and user PATH separate:
```
::setx /m truncate variable length to 1024 REG ADD
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH /t REG_SZ /f /d "%PATH%"
::empty local path, use system wide only, else it will enlarge with every ... |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | if you are using windows vista or higher, you can make a `symbolic link` to the folder. for example:
```
mklink /d C:\pf "C:\Program Files"
mklink /d C:\pf86 "C:\Program Files (x86)"
```
would make a link so `c:\pf` would be your program files folder. I shaved off 300 characters from my path by using this trick.
(I... | You can put this line in your BAT:
```
setx path "%%path%%;c:\drive\fr;c:\drive\installs\7z"
```
See the double `%%`.
(Reference: <https://support.microsoft.com/en-us/kb/75634>) |
387,619 | I am trying to set environment variables using the [`setx`](http://ss64.com/nt/setx.html) command, such as follows
>
> setx PATH "f:\common tools\git\bin;f:\common
> tools\python\app;f:\common tools\python\app\scripts;f:\common
> tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
>
>
>
However, I get the... | 2012/02/08 | [
"https://superuser.com/questions/387619",
"https://superuser.com",
"https://superuser.com/users/57735/"
] | You can put this line in your BAT:
```
setx path "%%path%%;c:\drive\fr;c:\drive\installs\7z"
```
See the double `%%`.
(Reference: <https://support.microsoft.com/en-us/kb/75634>) | I think the best way is the next (with powershell)
With this way also you avoid the litmit of 1024 character.
You can see the code on: <https://gist.github.com/drazul/b92f780689bd89a0d2a7>
```
#------------ Add path to system variable -------------------------------------
$path2add = ';C:\path;'
$systemPath = [Envir... |
12,343,283 | If I embed a Youtube video on my web page, what are the data usage implications on my server?
I have a shared web hosting plan for my website with a data transfer limit of 5 GB/month. When a user plays video on my site, is my server taxed for data transfer i.e. if the video is of size 1GB, is my data transfer limit ... | 2012/09/09 | [
"https://Stackoverflow.com/questions/12343283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315445/"
] | Both the youtube player and the video content is streamed from Youtube's server. The only price you pay is the few bytes it takes to add the video player embed code in your HTML pages. | When you embed a YouTube video, it streams directly from YouTube's servers.
Your server is not involved. |
12,343,283 | If I embed a Youtube video on my web page, what are the data usage implications on my server?
I have a shared web hosting plan for my website with a data transfer limit of 5 GB/month. When a user plays video on my site, is my server taxed for data transfer i.e. if the video is of size 1GB, is my data transfer limit ... | 2012/09/09 | [
"https://Stackoverflow.com/questions/12343283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315445/"
] | When you embed a YouTube video, it streams directly from YouTube's servers.
Your server is not involved. | In addition to what Etienne Perot said,
There are 3 nodes in play here, namely:
1. Your server
2. Youtube Servers
3. The Client (i.e the user accessing you website)
In simple words: embed is an html tag that allows you include a link to a resource. And since youtube's embed goes in the form of youtu.be/foo or youtube... |
12,343,283 | If I embed a Youtube video on my web page, what are the data usage implications on my server?
I have a shared web hosting plan for my website with a data transfer limit of 5 GB/month. When a user plays video on my site, is my server taxed for data transfer i.e. if the video is of size 1GB, is my data transfer limit ... | 2012/09/09 | [
"https://Stackoverflow.com/questions/12343283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315445/"
] | When you embed a YouTube video, it streams directly from YouTube's servers.
Your server is not involved. | When you insert youtube or any embed code in your html page, your server serves the html content to the user's web browser / client (technically means user's web browser). And this html content is processed and translated by the client/ user's web browser. This means that it is served by your server as a link, but when... |
12,343,283 | If I embed a Youtube video on my web page, what are the data usage implications on my server?
I have a shared web hosting plan for my website with a data transfer limit of 5 GB/month. When a user plays video on my site, is my server taxed for data transfer i.e. if the video is of size 1GB, is my data transfer limit ... | 2012/09/09 | [
"https://Stackoverflow.com/questions/12343283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315445/"
] | Both the youtube player and the video content is streamed from Youtube's server. The only price you pay is the few bytes it takes to add the video player embed code in your HTML pages. | In addition to what Etienne Perot said,
There are 3 nodes in play here, namely:
1. Your server
2. Youtube Servers
3. The Client (i.e the user accessing you website)
In simple words: embed is an html tag that allows you include a link to a resource. And since youtube's embed goes in the form of youtu.be/foo or youtube... |
12,343,283 | If I embed a Youtube video on my web page, what are the data usage implications on my server?
I have a shared web hosting plan for my website with a data transfer limit of 5 GB/month. When a user plays video on my site, is my server taxed for data transfer i.e. if the video is of size 1GB, is my data transfer limit ... | 2012/09/09 | [
"https://Stackoverflow.com/questions/12343283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315445/"
] | Both the youtube player and the video content is streamed from Youtube's server. The only price you pay is the few bytes it takes to add the video player embed code in your HTML pages. | When you insert youtube or any embed code in your html page, your server serves the html content to the user's web browser / client (technically means user's web browser). And this html content is processed and translated by the client/ user's web browser. This means that it is served by your server as a link, but when... |
53,274 | How can I connect to a WPA2 Encrypted Network from the Terminal/Console?
I've wanted to remove the whole x-window system and use a Terminal based system only to free up any available memory and process list(s), but the only way to I have to connect to my ESSID network right now is via the Network Manager.
One other... | 2011/07/15 | [
"https://askubuntu.com/questions/53274",
"https://askubuntu.com",
"https://askubuntu.com/users/21663/"
] | You can use cli to networkmanager called [cnetworkmanager](http://vidner.net/martin/software/cnetworkmanager/) or [wicd](http://wicd.sourceforge.net/) which also has command line utility and gtk is just optional. I think wicd uses wpa\_supplicant. | This works, if you can keep X around, but just don't want to use it, and want your system to connect to wireless without starting X.
Start X and use *nm-applet* to conncet to your wireless. Then bring up context menu of *nm-applet* and choose *Edit connections*. Choose *Wirelless* tab, select your connection and *Edi... |
53,274 | How can I connect to a WPA2 Encrypted Network from the Terminal/Console?
I've wanted to remove the whole x-window system and use a Terminal based system only to free up any available memory and process list(s), but the only way to I have to connect to my ESSID network right now is via the Network Manager.
One other... | 2011/07/15 | [
"https://askubuntu.com/questions/53274",
"https://askubuntu.com",
"https://askubuntu.com/users/21663/"
] | You can use cli to networkmanager called [cnetworkmanager](http://vidner.net/martin/software/cnetworkmanager/) or [wicd](http://wicd.sourceforge.net/) which also has command line utility and gtk is just optional. I think wicd uses wpa\_supplicant. | You could install a lightweight window manager like LXDE.
if you want to connect to a wifi network without graphical environment
you should learn about the iwconfig and iwlist and then
use the iw wlan0 connect command to connect to your wifi network. |
29,223,518 | I am trying to create a simple indexed view on the query below. But when I try to create a unique clustered index on it, I get the following error:
>
> Cannot create the clustered index '..' on view '..' because the select
> list of the view contains an expression on result of aggregate
> function or grouping colum... | 2015/03/24 | [
"https://Stackoverflow.com/questions/29223518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2673722/"
] | Here is a link to all the restrictions of an index view: <https://msdn.microsoft.com/en-us/library/ms191432.aspx#Restrictions>
From the documentation these two items should stick out:
* If GROUP BY is present, the VIEW definition must contain COUNT\_BIG(\*)
and must not contain HAVING. These GROUP BY restrictions are... | Doesn't make a whole lot of sense (at least not to me) but reference: <https://msdn.microsoft.com/en-us/library/ms191432.aspx>
Specifically:
>
> If GROUP BY is present, the VIEW definition must contain COUNT\_BIG(\*) and must not contain HAVING. These GROUP BY restrictions are applicable only to the indexed view def... |
29,223,518 | I am trying to create a simple indexed view on the query below. But when I try to create a unique clustered index on it, I get the following error:
>
> Cannot create the clustered index '..' on view '..' because the select
> list of the view contains an expression on result of aggregate
> function or grouping colum... | 2015/03/24 | [
"https://Stackoverflow.com/questions/29223518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2673722/"
] | Here is a link to all the restrictions of an index view: <https://msdn.microsoft.com/en-us/library/ms191432.aspx#Restrictions>
From the documentation these two items should stick out:
* If GROUP BY is present, the VIEW definition must contain COUNT\_BIG(\*)
and must not contain HAVING. These GROUP BY restrictions are... | I had a similar problem. One of my select fields looked like this:
```
sum(Pa * (CTRatio1a/CTRatio2a) * (VTRatio1/VTRatio2)* Polarity * [Percentage])/1000.0
```
By including the last division by 1000 in the bracket, it resolved the problem:
```
sum(Pa * (CTRatio1a/CTRatio2a) * (VTRatio1/VTRatio2)* Polarity * [Perce... |
29,223,518 | I am trying to create a simple indexed view on the query below. But when I try to create a unique clustered index on it, I get the following error:
>
> Cannot create the clustered index '..' on view '..' because the select
> list of the view contains an expression on result of aggregate
> function or grouping colum... | 2015/03/24 | [
"https://Stackoverflow.com/questions/29223518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2673722/"
] | Here is a link to all the restrictions of an index view: <https://msdn.microsoft.com/en-us/library/ms191432.aspx#Restrictions>
From the documentation these two items should stick out:
* If GROUP BY is present, the VIEW definition must contain COUNT\_BIG(\*)
and must not contain HAVING. These GROUP BY restrictions are... | **Tip:** It's better to have a real date field in the database and not just Year / Month. That way you can create a date index in addition to the clustered index.
However if you have `FullDate`, `Year` and `Month` you can get the same error message `view contains an expression on result of aggregate function or groupi... |
18,509,610 | I am trying to display one particular category posts as a three column layout The problem I have is I am not sure how I can use for or forwach to loop the display of each post thumbnail so whn it comes more than three I can use one\_thrid\_last. css class.
```
<?php while ( have_posts() ) : the_post(); ?>
<?php if (i... | 2013/08/29 | [
"https://Stackoverflow.com/questions/18509610",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1079135/"
] | Using `sed`:
```
sed '/Distribution_Facilities_carrying_Item/ s/<\(.*\)>/<!--\1-->/' inputfile
```
would comment all lines containing the string `Distribution_Facilities_carrying_Item`.
If you want to modify the file in-place, add the `-i` option:
```
sed -i '/Distribution_Facilities_carrying_Item/ s/<\(.*\)>/<!--... | Do not use regular expressions to parse XML. Use a proper parser. For example, using [xsh](http://p3rl.org/XML%3a%3aXSH2):
```sh
my $search = "Distribution_Facilities_carrying_Item" ;
for my $file in { @ARGV } {
open $file ;
for my $p in //Parameter[text() = $search]
xinsert comment { $p->toString } re... |
18,509,610 | I am trying to display one particular category posts as a three column layout The problem I have is I am not sure how I can use for or forwach to loop the display of each post thumbnail so whn it comes more than three I can use one\_thrid\_last. css class.
```
<?php while ( have_posts() ) : the_post(); ?>
<?php if (i... | 2013/08/29 | [
"https://Stackoverflow.com/questions/18509610",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1079135/"
] | Using `sed`:
```
sed '/Distribution_Facilities_carrying_Item/ s/<\(.*\)>/<!--\1-->/' inputfile
```
would comment all lines containing the string `Distribution_Facilities_carrying_Item`.
If you want to modify the file in-place, add the `-i` option:
```
sed -i '/Distribution_Facilities_carrying_Item/ s/<\(.*\)>/<!--... | check with below sed equation it will comment
```
sed -i 's/\(<.*Distribution_Facilities_carrying_Item.*>\)/<!--\1-->/' filename.xml
``` |
18,509,610 | I am trying to display one particular category posts as a three column layout The problem I have is I am not sure how I can use for or forwach to loop the display of each post thumbnail so whn it comes more than three I can use one\_thrid\_last. css class.
```
<?php while ( have_posts() ) : the_post(); ?>
<?php if (i... | 2013/08/29 | [
"https://Stackoverflow.com/questions/18509610",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1079135/"
] | Using `sed`:
```
sed '/Distribution_Facilities_carrying_Item/ s/<\(.*\)>/<!--\1-->/' inputfile
```
would comment all lines containing the string `Distribution_Facilities_carrying_Item`.
If you want to modify the file in-place, add the `-i` option:
```
sed -i '/Distribution_Facilities_carrying_Item/ s/<\(.*\)>/<!--... | An awk version:
```
awk '/Distribution_Facilities_carrying_Item/ {sub(/^</,"<!--");sub(/>$/,"-->")}1' a.xml
``` |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | Unfortunately, there is no full-string escape operator in Java. You need to write the code as:
```
String aa = "E:\\dev_workspace1\\AccessCore\\WebRoot\\DataFile";
``` | Might not be a direct answer to your question, but I feel this should be pointed out:
There's a [system-dependent default name-separator character](http://java.sun.com/javase/6/docs/api/java/io/File.html#separator). |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | Unfortunately, there is no full-string escape operator in Java. You need to write the code as:
```
String aa = "E:\\dev_workspace1\\AccessCore\\WebRoot\\DataFile";
``` | The really system-independent way is to do this:
```
String aa = "E:/dev_workspace1/AccessCore/WebRoot/DataFile";
String output = aa.replace('/', File.separatorChar);
```
It will give you
**"E:\dev\_workspace1\AccessCore\WebRoot\DataFile"**
on Windows and
**"E:/dev\_workspace1/AccessCore/WebRoot/DataFile"**
jus... |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | Unfortunately, there is no full-string escape operator in Java. You need to write the code as:
```
String aa = "E:\\dev_workspace1\\AccessCore\\WebRoot\\DataFile";
``` | If you write a path, you should use the '/' as path-separator under Java. The '/' is the official path-separator under Java and will be converted to the appropriate separator for the platform (\ under windows, / under unix). The rest of the string is unchanged if passed to the system, so the '\' also works under window... |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | There is no whole string escape operator but, if it's for file access, you can use a forward slash:
```
String aa="E:/dev_workspace1/AccessCore/WebRoot/DataFile";
```
[Windows allows](http://bytes.com/groups/python/23123-when-did-windows-start-accepting-forward-slash-path-separator) both forward and backward slashes... | Might not be a direct answer to your question, but I feel this should be pointed out:
There's a [system-dependent default name-separator character](http://java.sun.com/javase/6/docs/api/java/io/File.html#separator). |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | There is no whole string escape operator but, if it's for file access, you can use a forward slash:
```
String aa="E:/dev_workspace1/AccessCore/WebRoot/DataFile";
```
[Windows allows](http://bytes.com/groups/python/23123-when-did-windows-start-accepting-forward-slash-path-separator) both forward and backward slashes... | The really system-independent way is to do this:
```
String aa = "E:/dev_workspace1/AccessCore/WebRoot/DataFile";
String output = aa.replace('/', File.separatorChar);
```
It will give you
**"E:\dev\_workspace1\AccessCore\WebRoot\DataFile"**
on Windows and
**"E:/dev\_workspace1/AccessCore/WebRoot/DataFile"**
jus... |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | There is no whole string escape operator but, if it's for file access, you can use a forward slash:
```
String aa="E:/dev_workspace1/AccessCore/WebRoot/DataFile";
```
[Windows allows](http://bytes.com/groups/python/23123-when-did-windows-start-accepting-forward-slash-path-separator) both forward and backward slashes... | If you write a path, you should use the '/' as path-separator under Java. The '/' is the official path-separator under Java and will be converted to the appropriate separator for the platform (\ under windows, / under unix). The rest of the string is unchanged if passed to the system, so the '\' also works under window... |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | Might not be a direct answer to your question, but I feel this should be pointed out:
There's a [system-dependent default name-separator character](http://java.sun.com/javase/6/docs/api/java/io/File.html#separator). | If you write a path, you should use the '/' as path-separator under Java. The '/' is the official path-separator under Java and will be converted to the appropriate separator for the platform (\ under windows, / under unix). The rest of the string is unchanged if passed to the system, so the '\' also works under window... |
1,169,842 | As we all know,we can use
```
string aa=@"E:\dev_workspace1\AccessCore\WebRoot\DataFile"
```
in c# in order not to double the '\'.
But how to do in java? | 2009/07/23 | [
"https://Stackoverflow.com/questions/1169842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133653/"
] | The really system-independent way is to do this:
```
String aa = "E:/dev_workspace1/AccessCore/WebRoot/DataFile";
String output = aa.replace('/', File.separatorChar);
```
It will give you
**"E:\dev\_workspace1\AccessCore\WebRoot\DataFile"**
on Windows and
**"E:/dev\_workspace1/AccessCore/WebRoot/DataFile"**
jus... | If you write a path, you should use the '/' as path-separator under Java. The '/' is the official path-separator under Java and will be converted to the appropriate separator for the platform (\ under windows, / under unix). The rest of the string is unchanged if passed to the system, so the '\' also works under window... |
44,825,815 | Let say a I have an object:
```js
var person= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
},
address:{
number:function(){
console.log(this);// is the number function
//return ... | 2017/06/29 | [
"https://Stackoverflow.com/questions/44825815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2894798/"
] | You could construct the address, so that it has access to its parent object:
```
function Person(n){
this.firstName=n;
this.address=new Adress(this);
}
Person.prototype= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
}
};
function Address... | You can use it like this
```
var person= {
firstName:"Renzo",
getFirstName:function(){
return this.firstName;
},
address:{
number:function(){
return person.firstName;
}
}
};
console.log(person.address.number());
``` |
44,825,815 | Let say a I have an object:
```js
var person= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
},
address:{
number:function(){
console.log(this);// is the number function
//return ... | 2017/06/29 | [
"https://Stackoverflow.com/questions/44825815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2894798/"
] | Another way you could do this is during the call itself:
```
var person = {
firstName: 'Renzo',
getFirstName() {
return this.firstName;
},
address: {
number: function() {
return this.firstName;
}
}
}
// then call it
person.address.number.call(person); // 'Renzo'
``` | You can use it like this
```
var person= {
firstName:"Renzo",
getFirstName:function(){
return this.firstName;
},
address:{
number:function(){
return person.firstName;
}
}
};
console.log(person.address.number());
``` |
44,825,815 | Let say a I have an object:
```js
var person= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
},
address:{
number:function(){
console.log(this);// is the number function
//return ... | 2017/06/29 | [
"https://Stackoverflow.com/questions/44825815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2894798/"
] | You can use ES6 classes and arrow functions to be able to achieve this.
```
class Person {
constructor() {
this.firstName = "Renzo";
this.address = {
getNumber: () => this.firstName
}
}
getFirstName() {
return this.firstName;
}
}
var person = new Person();
console.l... | You can use it like this
```
var person= {
firstName:"Renzo",
getFirstName:function(){
return this.firstName;
},
address:{
number:function(){
return person.firstName;
}
}
};
console.log(person.address.number());
``` |
44,825,815 | Let say a I have an object:
```js
var person= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
},
address:{
number:function(){
console.log(this);// is the number function
//return ... | 2017/06/29 | [
"https://Stackoverflow.com/questions/44825815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2894798/"
] | Another way you could do this is during the call itself:
```
var person = {
firstName: 'Renzo',
getFirstName() {
return this.firstName;
},
address: {
number: function() {
return this.firstName;
}
}
}
// then call it
person.address.number.call(person); // 'Renzo'
``` | You could construct the address, so that it has access to its parent object:
```
function Person(n){
this.firstName=n;
this.address=new Adress(this);
}
Person.prototype= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
}
};
function Address... |
44,825,815 | Let say a I have an object:
```js
var person= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
},
address:{
number:function(){
console.log(this);// is the number function
//return ... | 2017/06/29 | [
"https://Stackoverflow.com/questions/44825815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2894798/"
] | You can use ES6 classes and arrow functions to be able to achieve this.
```
class Person {
constructor() {
this.firstName = "Renzo";
this.address = {
getNumber: () => this.firstName
}
}
getFirstName() {
return this.firstName;
}
}
var person = new Person();
console.l... | You could construct the address, so that it has access to its parent object:
```
function Person(n){
this.firstName=n;
this.address=new Adress(this);
}
Person.prototype= {
firstName:"Renzo",
getFirstName:function(){
console.log(this);// is the person object
return this.firstName;
}
};
function Address... |
2,576,582 | Please can anybody tell the exact solution or the way to solve the integral of form
$$\int\_{-\infty}^{\infty} e^{-2b^2(x^2+a^2)}dx$$ | 2017/12/22 | [
"https://math.stackexchange.com/questions/2576582",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/442289/"
] | $$
\int\_{-\infty}^{\infty} e^{-2b^2(x^2+a^2)}dx=e^{-2b^2a^2}\int\_{-\infty}^{\infty} e^{-2b^2 x^2}dx=e^{-2b^2a^2}\sqrt{\frac{\pi}{2b^2}}
$$
done using
$$
\int\_{\mathbf R} e^{-\alpha x^2} {\rm dx}=\sqrt{\frac{\pi}{\alpha}}
$$ | after taking out $e^{-2b^2a^2}$, substitute $\sqrt 2bx=t$.
this leaves us with $\int\_{-\infty}^{\infty}e^{-t^2}\text dt$ with some factor multiplied. Now we substitute $t = \sqrt { y}$ leaves us with $\Gamma({\frac 12})$. |
20,710,981 | When I tried to write a class that accepts any `Class[_]` as a parameter:
```
case class A(klass: Class[_])
```
I got this error:
>
> test.scala:1: warning: inferred existential type Option[Class[\_$1]]
> forSome { type *$1 }, which cannot be expressed by wildcards, should
> be enabled by making the implicit val... | 2013/12/20 | [
"https://Stackoverflow.com/questions/20710981",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/590083/"
] | In this case what you're looking for is a `ClassTag`:
```
class A[T](implicit val tag : reflect.ClassTag[T])
```
This gives you the `ClassTag` object for the generic parameter that you can use to access the `Class` given when objects are being created.
As for existentials, you can check:
* [Existential types in Sc... | Heather Miller just explained on scala-user that you use the left-hand pane's search for "language", and then the right-hand pane's search for existential, since the left pane doesn't do members.
If you find a discussion you don't understand, then you know you're in the right place. |
20,710,981 | When I tried to write a class that accepts any `Class[_]` as a parameter:
```
case class A(klass: Class[_])
```
I got this error:
>
> test.scala:1: warning: inferred existential type Option[Class[\_$1]]
> forSome { type *$1 }, which cannot be expressed by wildcards, should
> be enabled by making the implicit val... | 2013/12/20 | [
"https://Stackoverflow.com/questions/20710981",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/590083/"
] | In this case what you're looking for is a `ClassTag`:
```
class A[T](implicit val tag : reflect.ClassTag[T])
```
This gives you the `ClassTag` object for the generic parameter that you can use to access the `Class` given when objects are being created.
As for existentials, you can check:
* [Existential types in Sc... | I had the same question and I hit this SO thread; none of the answers are a direct answer to the question, so I'll add it below. The Scala docs for value scala.language.existentials are probably in the JavaDoc comments, which state:
```
/** Only where enabled, existential types that cannot be expressed as wildcard
... |
23,309,985 | I need some help with my website html/css code. The site looks nice(to me), but if someone has a small 17" monitor, or if you zoom in the website, the divs in my info bar overlap each other and it looks awful. It's messy,sorry, but I have been trying out all sorts of things I found on the net... What can I do to change... | 2014/04/26 | [
"https://Stackoverflow.com/questions/23309985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3102135/"
] | Access the options, filtering by `:selected`, then get the `.text()`.
[Fiddle](http://jsfiddle.net/hyh9C/)
```
$('#cmbfotos option:selected').text();
``` | You should use jquery [`.change()`](http://api.jquery.com/change/) for select onchange event, [`:selected`](http://api.jquery.com/selected-selector/) to select all elements that are selected and [`.text()`](http://api.jquery.com/text/) to get text from element. Try this:
```
$("#cmbfotos").change(function(){
var t... |
23,309,985 | I need some help with my website html/css code. The site looks nice(to me), but if someone has a small 17" monitor, or if you zoom in the website, the divs in my info bar overlap each other and it looks awful. It's messy,sorry, but I have been trying out all sorts of things I found on the net... What can I do to change... | 2014/04/26 | [
"https://Stackoverflow.com/questions/23309985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3102135/"
] | Access the options, filtering by `:selected`, then get the `.text()`.
[Fiddle](http://jsfiddle.net/hyh9C/)
```
$('#cmbfotos option:selected').text();
``` | ```
$('#cmbfotos option:selected').text(); ////is for text and
$('#cmbfotos option:selected').val() ///is for value;
``` |
23,309,985 | I need some help with my website html/css code. The site looks nice(to me), but if someone has a small 17" monitor, or if you zoom in the website, the divs in my info bar overlap each other and it looks awful. It's messy,sorry, but I have been trying out all sorts of things I found on the net... What can I do to change... | 2014/04/26 | [
"https://Stackoverflow.com/questions/23309985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3102135/"
] | Use this solution for your requirement
// Use for multiple select in select
```
$('#cmbfotos option').each(function()
{
if($(this).val() == 'gokussj3.jpg')
{
$(this).prop("selected", true);
}
});
```
// Get the value from a drop down select
```
$( "#cmbfotos option:... | You should use jquery [`.change()`](http://api.jquery.com/change/) for select onchange event, [`:selected`](http://api.jquery.com/selected-selector/) to select all elements that are selected and [`.text()`](http://api.jquery.com/text/) to get text from element. Try this:
```
$("#cmbfotos").change(function(){
var t... |
23,309,985 | I need some help with my website html/css code. The site looks nice(to me), but if someone has a small 17" monitor, or if you zoom in the website, the divs in my info bar overlap each other and it looks awful. It's messy,sorry, but I have been trying out all sorts of things I found on the net... What can I do to change... | 2014/04/26 | [
"https://Stackoverflow.com/questions/23309985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3102135/"
] | Use this solution for your requirement
// Use for multiple select in select
```
$('#cmbfotos option').each(function()
{
if($(this).val() == 'gokussj3.jpg')
{
$(this).prop("selected", true);
}
});
```
// Get the value from a drop down select
```
$( "#cmbfotos option:... | ```
$('#cmbfotos option:selected').text(); ////is for text and
$('#cmbfotos option:selected').val() ///is for value;
``` |
1,691 | I've stumbled across a comment under a question today that made me think. It mentioned meeting on discord to escape the "question-answer" format, that is unfit for ... well, a certain range of topics; from critique request to harmless banter.
So I'm wondering if is there a meeting place that the community here is usin... | 2018/11/13 | [
"https://writers.meta.stackexchange.com/questions/1691",
"https://writers.meta.stackexchange.com",
"https://writers.meta.stackexchange.com/users/25517/"
] | I agree there's a bit of an overlap.
I'd go with your solution:
>
> ...rename the children tag to, say, childrens-stories, restrict it to questions about writings for children to read, and fold the other half of the tag into young-author?
>
>
>
since it seems the most logical thing to do.
Maybe the sentence "... | I would not rename "children" as "children-stories", I would take out the "questions about children who write". I might add the obvious, "questions about children [care, behavior, understanding of issues, attitudes, problems, mistakes]", which might be useful for authors that don't have any children of their own but ha... |
43,918,444 | I just want to know with the experience of the others which solution do you use generally to position an element out of the natural flow?
- Transform: translate
- Position: Absolute.
Thank's :) | 2017/05/11 | [
"https://Stackoverflow.com/questions/43918444",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7627074/"
] | All depends.
`position:absolute` actually can work together with `transform:translate`. For example, if you want to place a div (dynamic height/width) you can do below:
```
<div id="mydiv">
<!-- Dynamic content here meaning height and width could change -->
</div>
#mydiv {
position: absolute;
top: 50%; /... | ```
position : absolute
```
\*this does pose issues for responsive pages. |
43,106 | So Gmail has rolled out their new compose update to my company's Google Apps account. I've found the drag and drop function of Gmail to be really convenient in the past as I'm always attaching PDFs, Zip files and images to emails.
Gmail didn't get rid of this function in the new Compose rollout. They did, however chan... | 2013/04/15 | [
"https://webapps.stackexchange.com/questions/43106",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/-1/"
] | At this point the general consensus is that there is no way to turn off this "embed images" function of the otherwise "drag-to-attach" feature of the new Gmail.
There are a few criteria to keep in mind though, circumstances in which attachment will occur rather than embedding:
* Dragging in multiple images simultaneo... | This is a quick and easy workaround.Grab an extra file when you select single photo file. As soon at they start downloading, cancel the one you don't want and save the other. |
43,106 | So Gmail has rolled out their new compose update to my company's Google Apps account. I've found the drag and drop function of Gmail to be really convenient in the past as I'm always attaching PDFs, Zip files and images to emails.
Gmail didn't get rid of this function in the new Compose rollout. They did, however chan... | 2013/04/15 | [
"https://webapps.stackexchange.com/questions/43106",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/-1/"
] | At this point the general consensus is that there is no way to turn off this "embed images" function of the otherwise "drag-to-attach" feature of the new Gmail.
There are a few criteria to keep in mind though, circumstances in which attachment will occur rather than embedding:
* Dragging in multiple images simultaneo... | As of June 24, 2013 this issue is now fixed. There are now two drag & drop target zones in the compose window. The main larger one will imbed the images inline while a smaller one at the bottom of the compose window will allow you to directly attach the images. See here: <http://lifehacker.com/add-images-as-attachments... |
43,106 | So Gmail has rolled out their new compose update to my company's Google Apps account. I've found the drag and drop function of Gmail to be really convenient in the past as I'm always attaching PDFs, Zip files and images to emails.
Gmail didn't get rid of this function in the new Compose rollout. They did, however chan... | 2013/04/15 | [
"https://webapps.stackexchange.com/questions/43106",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/-1/"
] | As of June 24, 2013 this issue is now fixed. There are now two drag & drop target zones in the compose window. The main larger one will imbed the images inline while a smaller one at the bottom of the compose window will allow you to directly attach the images. See here: <http://lifehacker.com/add-images-as-attachments... | This is a quick and easy workaround.Grab an extra file when you select single photo file. As soon at they start downloading, cancel the one you don't want and save the other. |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | ### short answer
In practice, for almost all photographers, the only filter effects you can't reproduce in post are:
* the reflection-removing effect of polarising filters
* the long exposure times enabled by neutral density fitlers
There is doubtless a longer answer with more detail which would be more technically ... | Well, I'd generally argue that doing it on camera is preferrable to post-processing primarily because it means you spend less time on the computer and more time behind the camera. However, many can be emulated in software, including graduated ND filters (with multiple exposures), warming, and color correction, the obvi... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | Any filter that changes properties of the light that isn't captured by the digital sensor (or film), is impossible to reproduce in post-processing.
So:
* A polarising filter removes light beams with a specific angle. As the sensor doesn't record the angle of the light beams, it can't be recreated in post-processing.
... | Well, I'd generally argue that doing it on camera is preferrable to post-processing primarily because it means you spend less time on the computer and more time behind the camera. However, many can be emulated in software, including graduated ND filters (with multiple exposures), warming, and color correction, the obvi... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | A lot of the time when filters are used, they are not used to achieve an *effect*, but rather **optimal data** in your RAW file.
* Almost every entry before mine mentions **polarizer**, but I'd provide different reasoning. In some cases polarizer helps to control contrast in the scene and using it means getting more e... | Well, I'd generally argue that doing it on camera is preferrable to post-processing primarily because it means you spend less time on the computer and more time behind the camera. However, many can be emulated in software, including graduated ND filters (with multiple exposures), warming, and color correction, the obvi... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | Well, I'd generally argue that doing it on camera is preferrable to post-processing primarily because it means you spend less time on the computer and more time behind the camera. However, many can be emulated in software, including graduated ND filters (with multiple exposures), warming, and color correction, the obvi... | I carry three filters:
Circular Polarizer for reducing reflections on shiny objects and to darken skies. it's also useful as a neutral density filter with a +2 rating.
Neutral density filter to reduce incoming light. I typically carry a +3, which I can stack with the circular polarizer to lengthen shutter speeds to s... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | Any filter that changes properties of the light that isn't captured by the digital sensor (or film), is impossible to reproduce in post-processing.
So:
* A polarising filter removes light beams with a specific angle. As the sensor doesn't record the angle of the light beams, it can't be recreated in post-processing.
... | ### short answer
In practice, for almost all photographers, the only filter effects you can't reproduce in post are:
* the reflection-removing effect of polarising filters
* the long exposure times enabled by neutral density fitlers
There is doubtless a longer answer with more detail which would be more technically ... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | A lot of the time when filters are used, they are not used to achieve an *effect*, but rather **optimal data** in your RAW file.
* Almost every entry before mine mentions **polarizer**, but I'd provide different reasoning. In some cases polarizer helps to control contrast in the scene and using it means getting more e... | ### short answer
In practice, for almost all photographers, the only filter effects you can't reproduce in post are:
* the reflection-removing effect of polarising filters
* the long exposure times enabled by neutral density fitlers
There is doubtless a longer answer with more detail which would be more technically ... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | ### short answer
In practice, for almost all photographers, the only filter effects you can't reproduce in post are:
* the reflection-removing effect of polarising filters
* the long exposure times enabled by neutral density fitlers
There is doubtless a longer answer with more detail which would be more technically ... | I carry three filters:
Circular Polarizer for reducing reflections on shiny objects and to darken skies. it's also useful as a neutral density filter with a +2 rating.
Neutral density filter to reduce incoming light. I typically carry a +3, which I can stack with the circular polarizer to lengthen shutter speeds to s... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | Any filter that changes properties of the light that isn't captured by the digital sensor (or film), is impossible to reproduce in post-processing.
So:
* A polarising filter removes light beams with a specific angle. As the sensor doesn't record the angle of the light beams, it can't be recreated in post-processing.
... | A lot of the time when filters are used, they are not used to achieve an *effect*, but rather **optimal data** in your RAW file.
* Almost every entry before mine mentions **polarizer**, but I'd provide different reasoning. In some cases polarizer helps to control contrast in the scene and using it means getting more e... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | Any filter that changes properties of the light that isn't captured by the digital sensor (or film), is impossible to reproduce in post-processing.
So:
* A polarising filter removes light beams with a specific angle. As the sensor doesn't record the angle of the light beams, it can't be recreated in post-processing.
... | I carry three filters:
Circular Polarizer for reducing reflections on shiny objects and to darken skies. it's also useful as a neutral density filter with a +2 rating.
Neutral density filter to reduce incoming light. I typically carry a +3, which I can stack with the circular polarizer to lengthen shutter speeds to s... |
1,938 | What types of filter cannot be successfully emulated by digital post-processing?
Polarizing, obviously. and neutral density for depth-of-field control.
But what about UV filters? and are there other types that are best used on the camera rather than in the computer? | 2010/08/04 | [
"https://photo.stackexchange.com/questions/1938",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/562/"
] | A lot of the time when filters are used, they are not used to achieve an *effect*, but rather **optimal data** in your RAW file.
* Almost every entry before mine mentions **polarizer**, but I'd provide different reasoning. In some cases polarizer helps to control contrast in the scene and using it means getting more e... | I carry three filters:
Circular Polarizer for reducing reflections on shiny objects and to darken skies. it's also useful as a neutral density filter with a +2 rating.
Neutral density filter to reduce incoming light. I typically carry a +3, which I can stack with the circular polarizer to lengthen shutter speeds to s... |
396,906 | I am working on making a vacuum forming machine, and I need to power a significant length of nichrome wire off of a 120v AC wall socket. I have very little experience in electronics, but I have talked to a few people who are experienced in electronics, and they have suggested using mosfets or PWM for powering long nich... | 2018/09/19 | [
"https://electronics.stackexchange.com/questions/396906",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/198915/"
] | >
> but I have talked to a few people who are experienced in electronics, and they have suggested using mosfets or PWM for powering long nichrome wire coils.
>
>
>
That is what I would use to design a circuit to control a nichrome coil too.
But as your instructor already mentioned, you don't need to design your o... | MOSFETS are too complicated (relatively) for a simple task like this, all you need for a heating element is an SCR control, hence the suggestion of a "dimmer" because most dimmers are just a simple triac device. You could also use a simple cheap SSR (Solid State Relay) that does Time Proportional Control, that way you ... |
396,906 | I am working on making a vacuum forming machine, and I need to power a significant length of nichrome wire off of a 120v AC wall socket. I have very little experience in electronics, but I have talked to a few people who are experienced in electronics, and they have suggested using mosfets or PWM for powering long nich... | 2018/09/19 | [
"https://electronics.stackexchange.com/questions/396906",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/198915/"
] | >
> but I have talked to a few people who are experienced in electronics, and they have suggested using mosfets or PWM for powering long nichrome wire coils.
>
>
>
That is what I would use to design a circuit to control a nichrome coil too.
But as your instructor already mentioned, you don't need to design your o... | >
> I feel like that is a really bad idea, and that there should be some extra safeguards.
>
>
>
You are absolutely right. The problem with any coil directly connected to mains is that accidentally touching any part of it can be dangerous. And, unlike space heaters, the coils are usually exposed over large surface... |
53,238,409 | I have a python list of strings and want to check if all list item values are the same or not.
I tried to use condition `if/then` but then I'd need to check all combinations of list values and if list have many items then need to many hard code.
```
if item1 != item1 and item1 != item2 and item1 !=item2 ....... :
... | 2018/11/10 | [
"https://Stackoverflow.com/questions/53238409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7080457/"
] | The code snippet you have provided looks a little weird. But if I understand correctly, you are trying to check for the number of unique values in a list.
One way to do it is to convert it to a set and check its length.
```
len(set(listOfStrings))
```
Updated to include working code snippet from @iGian:
```
check... | *IN correct list all items values are the same, then my list is correct*
If you want to check if all items in a list are the same you can check if the lenght of the set of the list is equal to 1:
```
len(set(listOfStrings)) == 1
```
Characteristic for a set is that every element is unique namely to that set. |
53,238,409 | I have a python list of strings and want to check if all list item values are the same or not.
I tried to use condition `if/then` but then I'd need to check all combinations of list values and if list have many items then need to many hard code.
```
if item1 != item1 and item1 != item2 and item1 !=item2 ....... :
... | 2018/11/10 | [
"https://Stackoverflow.com/questions/53238409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7080457/"
] | This compares every element of the list to the first one:
```
listOfStrings = ['ep:1000' , 'ep:4444', 'ep:1000', 'ep:1000', 'ep:1000', 'ep:1000']
check = all(x == listOfStrings[0] for x in listOfStrings)
```
And returns `false` for your test case. | *IN correct list all items values are the same, then my list is correct*
If you want to check if all items in a list are the same you can check if the lenght of the set of the list is equal to 1:
```
len(set(listOfStrings)) == 1
```
Characteristic for a set is that every element is unique namely to that set. |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | On the grand scheme of things, what you just described is not the worst I've heard of. There are cases where a student spends years of their Ph. D. on a problem with nothing to show for in the end, for a variety of reasons. Sometimes even experienced advisors will, intentionally or unintentionally, end up letting their... | It might be worth checking the policies of your university in relation to supervision requirements. At my university a junior academic (e.g., post-doc) cannot be the primary supervisor of a student, and needs to take a secondary position under the primary supervision of a more experienced academic. From your descriptio... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | On the grand scheme of things, what you just described is not the worst I've heard of. There are cases where a student spends years of their Ph. D. on a problem with nothing to show for in the end, for a variety of reasons. Sometimes even experienced advisors will, intentionally or unintentionally, end up letting their... | A few short thoughts:
>
> I eventually also ended up defining a problem for the student,
>
>
>
That's a tad over-controlling. Defining the problem should be at most a joint endeavor of the PhD candidate and the supervisor.
>
> which after 2 months of work, we discovered it is invalid.
>
>
>
Invalid, or too... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | On the grand scheme of things, what you just described is not the worst I've heard of. There are cases where a student spends years of their Ph. D. on a problem with nothing to show for in the end, for a variety of reasons. Sometimes even experienced advisors will, intentionally or unintentionally, end up letting their... | You should give him a substitute problem. and you should know better. Heck, I knew enough as a grad STUDENT to make sure "you can publish even if it doesn't work". Leave the climbing mount Everest to people with risk tolerance. This is an area where professors over the years have burned students.
Plus, you should unde... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | On the grand scheme of things, what you just described is not the worst I've heard of. There are cases where a student spends years of their Ph. D. on a problem with nothing to show for in the end, for a variety of reasons. Sometimes even experienced advisors will, intentionally or unintentionally, end up letting their... | Before you abandon it, dig deeper into the problem to find the nugget of gold.
"Success is failure turned inside out" [Whittier]
["In response to a question about his missteps, Edison once said, “I have not failed 10,000 times—I’ve successfully found 10,000 ways that will not work.”](https://www.smithsonianmag.com/in... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | It might be worth checking the policies of your university in relation to supervision requirements. At my university a junior academic (e.g., post-doc) cannot be the primary supervisor of a student, and needs to take a secondary position under the primary supervision of a more experienced academic. From your descriptio... | A few short thoughts:
>
> I eventually also ended up defining a problem for the student,
>
>
>
That's a tad over-controlling. Defining the problem should be at most a joint endeavor of the PhD candidate and the supervisor.
>
> which after 2 months of work, we discovered it is invalid.
>
>
>
Invalid, or too... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | It might be worth checking the policies of your university in relation to supervision requirements. At my university a junior academic (e.g., post-doc) cannot be the primary supervisor of a student, and needs to take a secondary position under the primary supervision of a more experienced academic. From your descriptio... | You should give him a substitute problem. and you should know better. Heck, I knew enough as a grad STUDENT to make sure "you can publish even if it doesn't work". Leave the climbing mount Everest to people with risk tolerance. This is an area where professors over the years have burned students.
Plus, you should unde... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | It might be worth checking the policies of your university in relation to supervision requirements. At my university a junior academic (e.g., post-doc) cannot be the primary supervisor of a student, and needs to take a secondary position under the primary supervision of a more experienced academic. From your descriptio... | Before you abandon it, dig deeper into the problem to find the nugget of gold.
"Success is failure turned inside out" [Whittier]
["In response to a question about his missteps, Edison once said, “I have not failed 10,000 times—I’ve successfully found 10,000 ways that will not work.”](https://www.smithsonianmag.com/in... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | A few short thoughts:
>
> I eventually also ended up defining a problem for the student,
>
>
>
That's a tad over-controlling. Defining the problem should be at most a joint endeavor of the PhD candidate and the supervisor.
>
> which after 2 months of work, we discovered it is invalid.
>
>
>
Invalid, or too... | You should give him a substitute problem. and you should know better. Heck, I knew enough as a grad STUDENT to make sure "you can publish even if it doesn't work". Leave the climbing mount Everest to people with risk tolerance. This is an area where professors over the years have burned students.
Plus, you should unde... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | A few short thoughts:
>
> I eventually also ended up defining a problem for the student,
>
>
>
That's a tad over-controlling. Defining the problem should be at most a joint endeavor of the PhD candidate and the supervisor.
>
> which after 2 months of work, we discovered it is invalid.
>
>
>
Invalid, or too... | Before you abandon it, dig deeper into the problem to find the nugget of gold.
"Success is failure turned inside out" [Whittier]
["In response to a question about his missteps, Edison once said, “I have not failed 10,000 times—I’ve successfully found 10,000 ways that will not work.”](https://www.smithsonianmag.com/in... |
111,168 | I am a postdoc who was supposed to *co-supervise* a PhD student along with another academic who invited me for that. However, I ended up fully supervising the student after the *supervisor* became too busy to attend meetings. Eventually, I also ended up defining a problem for the student, which, after 2 months of work,... | 2018/06/14 | [
"https://academia.stackexchange.com/questions/111168",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/91335/"
] | Before you abandon it, dig deeper into the problem to find the nugget of gold.
"Success is failure turned inside out" [Whittier]
["In response to a question about his missteps, Edison once said, “I have not failed 10,000 times—I’ve successfully found 10,000 ways that will not work.”](https://www.smithsonianmag.com/in... | You should give him a substitute problem. and you should know better. Heck, I knew enough as a grad STUDENT to make sure "you can publish even if it doesn't work". Leave the climbing mount Everest to people with risk tolerance. This is an area where professors over the years have burned students.
Plus, you should unde... |
18,804,751 | Strange, but perhaps I am handling it the incorrect way - I need to quite simply check if explorer.exe is running, and if so kill it. However, the way I am currently achieving this, explorer.exe simply restarts after I kill it.
Normal taskkill through batch works fine though, does C# do something different?
```
priva... | 2013/09/14 | [
"https://Stackoverflow.com/questions/18804751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1048116/"
] | That's because Windows takes care of restarting `explorer.exe` if it happens to die.
It is possible to delay this behavior (the setup of tortoisegit does this, for example), but it's not recommended - users are going to be pissed. | Try to kill the Process with exit code `1` .
Sorry i dont have any example code because i am not a C# programmer but in my application it worked just fine.
I used the C++ Function:
[TerminateProcess](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) |
18,804,751 | Strange, but perhaps I am handling it the incorrect way - I need to quite simply check if explorer.exe is running, and if so kill it. However, the way I am currently achieving this, explorer.exe simply restarts after I kill it.
Normal taskkill through batch works fine though, does C# do something different?
```
priva... | 2013/09/14 | [
"https://Stackoverflow.com/questions/18804751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1048116/"
] | Although not C# way but you can alternatively try to set the registry key `HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoRestartShell` to 0 to stop the auto restart.
**EDIT:-**
Try this in C#:-
```
RegistryKey ourKey = Registry.LocalMachine;
ourKey = ourKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT... | Try to kill the Process with exit code `1` .
Sorry i dont have any example code because i am not a C# programmer but in my application it worked just fine.
I used the C++ Function:
[TerminateProcess](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) |
35,450,522 | Right now i am implementing a custom Renderer for my Xamarin.Forms Label with which i can make use of the marquee scrolling features of the TextView.
What i want to do now is change the scrolling mode of the text from just going to the left endlessly to "bouncing" from side to side. (Kind of like this question i found... | 2016/02/17 | [
"https://Stackoverflow.com/questions/35450522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4545369/"
] | You can use scopes:
```
class Foo < ActiveRecord::Base
scope :is_completed?, lambda { where.not(field1: [nil, ""], field2: [nil, ""], field3: [nil, ""]) }
end
```
For integers/floats/non-string types, check only for `nil` (and not `""`) or else you will get an empty Relation.
Then you can use it like this.
```
... | Use scope for these kind of queries,Check for non empty fields.
```
scope :is_completed?, ->{ where.not("field1 is null and field2 is null and field3 is null") }
```
Thn use,
```
Foo.is_completed?
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.