qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
55,676 | I'm looking to find some resources to read about the following:
When we talk about a general concept (the word pencil in "a pencil is made of wood"), we actually have a mental image of a **particular** object in our mind (a particular pencil with a particular color in the example).
I'm looking to read about this an... | 2018/09/22 | [
"https://philosophy.stackexchange.com/questions/55676",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/35091/"
] | The interval of a second is currently defined as exactly 9 192 631 770 cycles of a Caesium atomic clock. Furthermore the definition has changed several times.
>
> <https://en.wikipedia.org/wiki/Second>
>
>
>
From this we see that: 1. The interval of a second is completely arbitrarily chosen. 2. Scientists take gr... | It depends.
If nothing is changing because in fact there is nothing there then it's right to say that no time is passing because there is nothing there including time.
If nothing is changing because everything is actually in stasis but could potentially change then time is passing.
If nothing is changing because ev... |
55,676 | I'm looking to find some resources to read about the following:
When we talk about a general concept (the word pencil in "a pencil is made of wood"), we actually have a mental image of a **particular** object in our mind (a particular pencil with a particular color in the example).
I'm looking to read about this an... | 2018/09/22 | [
"https://philosophy.stackexchange.com/questions/55676",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/35091/"
] | Time, as we know it is a method of tracking events, the "time" we know is something that is defined by man, but something defined by man is not always created by them, "time" will always flow, without time, we would not be able to see, hear, think, thus be.
>
> That is, if everything in the universe suddenly stopped,... | It depends.
If nothing is changing because in fact there is nothing there then it's right to say that no time is passing because there is nothing there including time.
If nothing is changing because everything is actually in stasis but could potentially change then time is passing.
If nothing is changing because ev... |
55,676 | I'm looking to find some resources to read about the following:
When we talk about a general concept (the word pencil in "a pencil is made of wood"), we actually have a mental image of a **particular** object in our mind (a particular pencil with a particular color in the example).
I'm looking to read about this an... | 2018/09/22 | [
"https://philosophy.stackexchange.com/questions/55676",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/35091/"
] | I'd say you're on the right track in suggesting that there is an existential connection between change and time. Thus the Perennialists and mystics are able to deny the reality of time only because they also deny the reality of change and the things that change. It has to be all or nothing for the reasons you sketch ou... | The interval of a second is currently defined as exactly 9 192 631 770 cycles of a Caesium atomic clock. Furthermore the definition has changed several times.
>
> <https://en.wikipedia.org/wiki/Second>
>
>
>
From this we see that: 1. The interval of a second is completely arbitrarily chosen. 2. Scientists take gr... |
55,676 | I'm looking to find some resources to read about the following:
When we talk about a general concept (the word pencil in "a pencil is made of wood"), we actually have a mental image of a **particular** object in our mind (a particular pencil with a particular color in the example).
I'm looking to read about this an... | 2018/09/22 | [
"https://philosophy.stackexchange.com/questions/55676",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/35091/"
] | The interval of a second is currently defined as exactly 9 192 631 770 cycles of a Caesium atomic clock. Furthermore the definition has changed several times.
>
> <https://en.wikipedia.org/wiki/Second>
>
>
>
From this we see that: 1. The interval of a second is completely arbitrarily chosen. 2. Scientists take gr... | I don't think we can acknowledge the possibility that nothing happens in any physical universe without positing complete uniformity, having maximal entropy. Furthermore, I think there are cosmological and metaphysical issues with such a universe, not the least because it requires a very substantive infinite quantity.
... |
55,676 | I'm looking to find some resources to read about the following:
When we talk about a general concept (the word pencil in "a pencil is made of wood"), we actually have a mental image of a **particular** object in our mind (a particular pencil with a particular color in the example).
I'm looking to read about this an... | 2018/09/22 | [
"https://philosophy.stackexchange.com/questions/55676",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/35091/"
] | I'd say you're on the right track in suggesting that there is an existential connection between change and time. Thus the Perennialists and mystics are able to deny the reality of time only because they also deny the reality of change and the things that change. It has to be all or nothing for the reasons you sketch ou... | Time, as we know it is a method of tracking events, the "time" we know is something that is defined by man, but something defined by man is not always created by them, "time" will always flow, without time, we would not be able to see, hear, think, thus be.
>
> That is, if everything in the universe suddenly stopped,... |
55,676 | I'm looking to find some resources to read about the following:
When we talk about a general concept (the word pencil in "a pencil is made of wood"), we actually have a mental image of a **particular** object in our mind (a particular pencil with a particular color in the example).
I'm looking to read about this an... | 2018/09/22 | [
"https://philosophy.stackexchange.com/questions/55676",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/35091/"
] | Ernst Mach and Julian Barbour suggest that *time is our perception of change*, and perhaps that's one of the best definitions of time I've found. The only physical fact lying under such definition is *change*, which we can perceive subjectively.
Before answering your question, a mental experiment. Imagine you are a pr... | I don't think we can acknowledge the possibility that nothing happens in any physical universe without positing complete uniformity, having maximal entropy. Furthermore, I think there are cosmological and metaphysical issues with such a universe, not the least because it requires a very substantive infinite quantity.
... |
2,735,811 | I am creating an application in which user selects files and provides credentials to open that file. For that I have created three columns in a gridview.
User enters password in password column.
I want to display **`*`** in place of characters like we can create a textbox of password type.
I have tried this co... | 2010/04/29 | [
"https://Stackoverflow.com/questions/2735811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/210922/"
] | I think it should work to handle the EditingControlShowing event and in the handler add the following code:
```
if(e.ColumnIndex == 2)
{
TextBox tb = e.Control as TextBox;
if (tb != null)
{
tb.PasswordChar = '*';
}
}
```
CellFormatting Event Handler code:
```
if(e.ColumnIndex = 2)
{
if(e... | One solution would be to create your own type of cell and assign that type to your password column. For example you'll add only the standard TextBoxPassword to it and then it should work as you wish.
On the [MSDN](http://msdn.microsoft.com/en-us/library/wc06dx4f.aspx) there is more detailed description with source cod... |
2,735,811 | I am creating an application in which user selects files and provides credentials to open that file. For that I have created three columns in a gridview.
User enters password in password column.
I want to display **`*`** in place of characters like we can create a textbox of password type.
I have tried this co... | 2010/04/29 | [
"https://Stackoverflow.com/questions/2735811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/210922/"
] | I think it should work to handle the EditingControlShowing event and in the handler add the following code:
```
if(e.ColumnIndex == 2)
{
TextBox tb = e.Control as TextBox;
if (tb != null)
{
tb.PasswordChar = '*';
}
}
```
CellFormatting Event Handler code:
```
if(e.ColumnIndex = 2)
{
if(e... | You can create a custom cell and column, and use a textbox with the password mask as your edit control.
To get around returning the clear text when you leave edit mode, you can store the actual password value in a seperate property of the cell, and in the GetFormattedValue event (i believe) you can return a string ma... |
27,493,438 | Does anyone know of any tutorials for coding autolayout in Swift? Usually I'd try using an Objective-C one but there is code that doesn't seem to be convertible to Swift. Basically I want a banner which slides in to the view from the bottom of the navigation bar, shrinking down a UITextView which is usually in place. I... | 2014/12/15 | [
"https://Stackoverflow.com/questions/27493438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1861474/"
] | You could jump on the edge and then you have in/out with Identity and User reference and then make the projection like this
```
select out.emailAddress, out.firstName, out.lastName from (SELECT expand(inE()) from Identity where email="abcd@temp.com")
``` | As an alternative, this select statement lets you select properties from both User and Identity.
* FROM clause, points to the edge (sitting between User and Identity)
* SELECT outV('User').property, points to start-node User, going out to edge
* SELECT inV('Identity').property, points ending node Identity, coming in f... |
35,354 | Здравствуйте! Подскажите, пожалуйста, как правильно называется процесс обработки белья утюгом: глажка, глажение или утюжка? Заранее спасибо! | 2014/07/07 | [
"https://rus.stackexchange.com/questions/35354",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/3921/"
] | Согласно словарям, белье можно гладить и утюжить, а сам процесс имеет несколько названий: глажение, глаженье и глажка, а также утюжение и утюжка.
С точки зрения частотности употребления "глажение, глаженье и глажка" употребляются одинаково часто, реже используется "утюжка", и практически не используется "утюжение". | Глажка - дома.
А в технологическом процессе, на предприятии, в швейном производстве есть разные действия: заутюжить, разутюжить и др.
Утюжка - профессионально. |
5,098,768 | This is how I typically do it but it usually causes issues. Then I'll float the images but then the content below that gets screwed up because they don't float. Suggestions?
```
<p>This is content</p> <img src="" />
<img src="" /> <p>This is more
content</p>
``` | 2011/02/23 | [
"https://Stackoverflow.com/questions/5098768",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/107074/"
] | You can use `display: inline-block`. | If you use float, give the element "below" the floated elements the CSS `clear: both`. |
5,098,768 | This is how I typically do it but it usually causes issues. Then I'll float the images but then the content below that gets screwed up because they don't float. Suggestions?
```
<p>This is content</p> <img src="" />
<img src="" /> <p>This is more
content</p>
``` | 2011/02/23 | [
"https://Stackoverflow.com/questions/5098768",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/107074/"
] | You can use `display: inline-block`. | ```
p { font-size:1.2em; line-height:1.5; margin-bottom:1.25em; vertical-align:middle; }
img { vertical-align:middle; margin:0 0.5em;} // margin is optional
<p>This is content <img src="/imgs/btn-notify.png" hspace="5" /> <img src="/imgs/btn-notify.png" hspace="5" /> This is more content</p>
```
**Inside** the parag... |
47,092,567 | I want to fill missing values of a specific column only if a condition is met.
```
e.g. A B
Nan 0
Nan 0
0 0
Nan 1
Nan 1
.....................
.....................
```
In the above case I want to fill Nan values in column A only when corresponding value in column B is 0. ... | 2017/11/03 | [
"https://Stackoverflow.com/questions/47092567",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5870809/"
] | Use [`mask`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.mask.html) with [`fillna`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.fillna.html):
```
df['A'] = df['A'].mask(df['B'] == 0, df['A'].fillna(3))
```
Alternatives with [`loc`](http://pandas.pydata.org/pandas-docs/... | You should use a loop over all elements, something like this:
```
for i in range(len(A))
if numpy.isnan(A[i]) && B[i] == 0:
A[i] = value
```
There are nicer ways to implement these loops, but I don't know what structures you are using. |
47,092,567 | I want to fill missing values of a specific column only if a condition is met.
```
e.g. A B
Nan 0
Nan 0
0 0
Nan 1
Nan 1
.....................
.....................
```
In the above case I want to fill Nan values in column A only when corresponding value in column B is 0. ... | 2017/11/03 | [
"https://Stackoverflow.com/questions/47092567",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5870809/"
] | Use [`mask`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.mask.html) with [`fillna`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.fillna.html):
```
df['A'] = df['A'].mask(df['B'] == 0, df['A'].fillna(3))
```
Alternatives with [`loc`](http://pandas.pydata.org/pandas-docs/... | np.where is quicke and simple solution.
```
In [47]: df['A'] = np.where(np.isnan(df['A']) & df['B'] == 0, 3, df['A'])
In [48]: df
Out[48]:
A B
0 3.0 0
1 3.0 0
2 3.0 0
3 NaN 1
4 NaN 1
``` |
47,092,567 | I want to fill missing values of a specific column only if a condition is met.
```
e.g. A B
Nan 0
Nan 0
0 0
Nan 1
Nan 1
.....................
.....................
```
In the above case I want to fill Nan values in column A only when corresponding value in column B is 0. ... | 2017/11/03 | [
"https://Stackoverflow.com/questions/47092567",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5870809/"
] | np.where is quicke and simple solution.
```
In [47]: df['A'] = np.where(np.isnan(df['A']) & df['B'] == 0, 3, df['A'])
In [48]: df
Out[48]:
A B
0 3.0 0
1 3.0 0
2 3.0 0
3 NaN 1
4 NaN 1
``` | You should use a loop over all elements, something like this:
```
for i in range(len(A))
if numpy.isnan(A[i]) && B[i] == 0:
A[i] = value
```
There are nicer ways to implement these loops, but I don't know what structures you are using. |
4,320,335 | I have the following in a text file called: values.txt
```
1 4
2.5 3.76
122 10
277.543
165.4432
```
I am trying to read the content of this text file, and add each two pairs together and output the result ...
the output would be something like this :
```
1 Pair:(1, 4) = 5
2 Pair:(2.5, 3.76)= 6.26
```
and so on... | 2010/12/01 | [
"https://Stackoverflow.com/questions/4320335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525942/"
] | The following code does what you expect. myfile should be declared as FILE\*. fopen returns a pointer to FILE structure. If the file is very large, I would recommend reading in buffers of big size (eg: 65535 etc) and parse it char by char and convert it to float values. It reduces system call overhead which takes more ... | For this simple task, use
```
double a, b;
if (fscanf(myfile, "%lf %lf", &a, &b) == 2)
printf("%f + %f = %f\n", a, b, a+b);
```
. |
4,320,335 | I have the following in a text file called: values.txt
```
1 4
2.5 3.76
122 10
277.543
165.4432
```
I am trying to read the content of this text file, and add each two pairs together and output the result ...
the output would be something like this :
```
1 Pair:(1, 4) = 5
2 Pair:(2.5, 3.76)= 6.26
```
and so on... | 2010/12/01 | [
"https://Stackoverflow.com/questions/4320335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525942/"
] | The following code does what you expect. myfile should be declared as FILE\*. fopen returns a pointer to FILE structure. If the file is very large, I would recommend reading in buffers of big size (eg: 65535 etc) and parse it char by char and convert it to float values. It reduces system call overhead which takes more ... | looks like a homework problem but `fscanf` can read the string into a variable like:
```
int n;
fscanf (myfile,"%d",&n);
``` |
4,320,335 | I have the following in a text file called: values.txt
```
1 4
2.5 3.76
122 10
277.543
165.4432
```
I am trying to read the content of this text file, and add each two pairs together and output the result ...
the output would be something like this :
```
1 Pair:(1, 4) = 5
2 Pair:(2.5, 3.76)= 6.26
```
and so on... | 2010/12/01 | [
"https://Stackoverflow.com/questions/4320335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525942/"
] | The following code does what you expect. myfile should be declared as FILE\*. fopen returns a pointer to FILE structure. If the file is very large, I would recommend reading in buffers of big size (eg: 65535 etc) and parse it char by char and convert it to float values. It reduces system call overhead which takes more ... | You haven't shown what you need as output for the single-value lines, but this looks like a case for `fgets()` and `sscanf()`, unless you really want the two lines with a single value to be processed as a unit.
```
char buffer[256];
int rownum = 0;
while (fgets(buffer, sizeof(buffer), myfile) != 0)
{
double aa, bb... |
4,320,335 | I have the following in a text file called: values.txt
```
1 4
2.5 3.76
122 10
277.543
165.4432
```
I am trying to read the content of this text file, and add each two pairs together and output the result ...
the output would be something like this :
```
1 Pair:(1, 4) = 5
2 Pair:(2.5, 3.76)= 6.26
```
and so on... | 2010/12/01 | [
"https://Stackoverflow.com/questions/4320335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525942/"
] | The following code does what you expect. myfile should be declared as FILE\*. fopen returns a pointer to FILE structure. If the file is very large, I would recommend reading in buffers of big size (eg: 65535 etc) and parse it char by char and convert it to float values. It reduces system call overhead which takes more ... | its in c++ sorry :( i dont know c
this is a very simple logic code for simple minde :D im a begineer too, i havent tested this prog so sorry if something goes wrong but exactly
on a same principle was working my parser and it worked fine. so this is a true method. not very efficent but...
do not use this program strai... |
3,435 | Note: I am aware that the Tor Project recommends against this and I want to do it anyway.
I've downloaded the Tor Relay Bundle and everything seems to be working fine. I can see myself as a relay on Atlas. However, I can't seem to configure Google Chrome to use Tor.
I've changed my proxy settings to use `localhost` a... | 2014/07/03 | [
"https://tor.stackexchange.com/questions/3435",
"https://tor.stackexchange.com",
"https://tor.stackexchange.com/users/-1/"
] | **Warning:** The Tor Project advises against configuring systems manually like this. The safe method is the **Tor Browser Bundle**, you can *not* expect Chrome to keep you anonymous just like this. Another option might be to tunnel an entire (virtual) machine's traffic through Tor (like Tails OS does I think) but that ... | I just figured it out!! In the past I used Proxy Switchy on chrome to set up Tor (following that lifehack website) and it all worked great, but recently I couldn't get it to work. Maybe it was that the extension has been redeveloped (it is called SwitchyOmega now), maybe it's windows 10, who knows... However, If you've... |
3,435 | Note: I am aware that the Tor Project recommends against this and I want to do it anyway.
I've downloaded the Tor Relay Bundle and everything seems to be working fine. I can see myself as a relay on Atlas. However, I can't seem to configure Google Chrome to use Tor.
I've changed my proxy settings to use `localhost` a... | 2014/07/03 | [
"https://tor.stackexchange.com/questions/3435",
"https://tor.stackexchange.com",
"https://tor.stackexchange.com/users/-1/"
] | **Warning:** The Tor Project advises against configuring systems manually like this. The safe method is the **Tor Browser Bundle**, you can *not* expect Chrome to keep you anonymous just like this. Another option might be to tunnel an entire (virtual) machine's traffic through Tor (like Tails OS does I think) but that ... | Since 0.3.2.1 version you can easily also use the `HTTPTunnelPort` option. eg:
Run `tor.exe --HTTPTunnelPort 8118` and set `127.0.0.1:8118` as proxy.
See [this answer](https://tor.stackexchange.com/a/16561) for more information. |
178,383 | I'm using Yosemite (OS X 10.10.1). If I search for the term "foo" and want a list of all files that include that term, I get foo.doc and bar.foo.doc and foodstuffs.xlsx and even The Foo History. But it does not include snafoos.docx and AllTheFooReports.xlsx. How can I change it to the (obvious!?!) behaviour of returnin... | 2015/03/26 | [
"https://apple.stackexchange.com/questions/178383",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/87761/"
] | The Finder searches for word prefixes.
If you save your search as a Smart Folder and then inspect that using a text editor (e.g. TextMate) you will see the raw Spotlight query:
```
((kMDItemDisplayName = "foo*"cdw))
```
The "w" modifier tells Spotlight to search for words. The "\*" wildcard at the end of the search... | If you are stuck you could use a find command in a terminal window.
Open a terminal window and type :$ `find . -iname \*foo\*`
Here's an example using the files you mentioned in your question.
```
mgagnon-mbp:tmp mgagnon$ ls
AllTheFooReports.xlsx bar.foo.doc foo.doc foodstuffs.xlsx snafoos.docx
mg... |
9,940 | I'm interested if there is any ArcGIS tool which give us the same result like GRASS command r.sun. I need to get drop shadows. You can suggest some other software? | 2011/05/19 | [
"https://gis.stackexchange.com/questions/9940",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2451/"
] | You can use **Spatial Analyst** extension from ESRI to perform the solar radiation modelling.
Refer the link below:
<http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=An_overview_of_the_Solar_Radiation_tools>
1. Area solar radiation analysis
2. Point solar radiation analysis
Cheers! | The equivalent tool in ArcGIS is the [solar radiation toolset](http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/An_overview_of_the_Solar_Radiation_tools/009z000000t4000000/), part of spatial analyst. I'm not sure of exactly what you mean by 'drop shadows', but it does support control over a large number of... |
21,116,763 | In R, there is a great function `as.roman` in the very base setup:
```
as.roman(79)
# [1] LXXIX
```
Is there an inverse function that would convert roman numerals to numbers?
(I know I can write it myself but I prefer to use already prepared or preferably standard functions, unfortunatelly cannot find one. Standar... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21116763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/684229/"
] | `as.roman()` returns an object of class *roman*, so R recognizes it as such. You can directly turn it back into an Arabic numeral with `as.numeric()`. If you have a string that meets the criteria such that it could be a valid roman numeral, you can coerce it to a class roman object with `as.roman()`, and then coerce it... | The `roman` numbers in R are, according to [the docs](http://stat.ethz.ch/R-manual/R-devel/library/utils/html/roman.html):
>
> objects of class `"roman"` which are internally represented as integers, and have suitable methods for printing, formatting, subsetting, and coercion to `character`.
>
>
>
You should ther... |
21,116,763 | In R, there is a great function `as.roman` in the very base setup:
```
as.roman(79)
# [1] LXXIX
```
Is there an inverse function that would convert roman numerals to numbers?
(I know I can write it myself but I prefer to use already prepared or preferably standard functions, unfortunatelly cannot find one. Standar... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21116763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/684229/"
] | `as.roman()` returns an object of class *roman*, so R recognizes it as such. You can directly turn it back into an Arabic numeral with `as.numeric()`. If you have a string that meets the criteria such that it could be a valid roman numeral, you can coerce it to a class roman object with `as.roman()`, and then coerce it... | From `as.roman` code you can find `.roman2numeric` and its code can be seen if you run `getAnywhere(".roman2numeric")`
The code is:
```
function (x)
{
romans <- c("M", "CM", "D", "CD", "C", "XC", "L", "XL", "X",
"IX", "V", "IV", "I")
numbers <- c(1000L, 900L, 500L, 400L, 100L, 90L, 50L, 40L,
... |
21,116,763 | In R, there is a great function `as.roman` in the very base setup:
```
as.roman(79)
# [1] LXXIX
```
Is there an inverse function that would convert roman numerals to numbers?
(I know I can write it myself but I prefer to use already prepared or preferably standard functions, unfortunatelly cannot find one. Standar... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21116763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/684229/"
] | From `as.roman` code you can find `.roman2numeric` and its code can be seen if you run `getAnywhere(".roman2numeric")`
The code is:
```
function (x)
{
romans <- c("M", "CM", "D", "CD", "C", "XC", "L", "XL", "X",
"IX", "V", "IV", "I")
numbers <- c(1000L, 900L, 500L, 400L, 100L, 90L, 50L, 40L,
... | The `roman` numbers in R are, according to [the docs](http://stat.ethz.ch/R-manual/R-devel/library/utils/html/roman.html):
>
> objects of class `"roman"` which are internally represented as integers, and have suitable methods for printing, formatting, subsetting, and coercion to `character`.
>
>
>
You should ther... |
10,456,605 | This is totally stupid and unimportant, but I'm just curious: using [RSpec](http://rspec.info/), can I somehow access what "depth" of scope I'm in? That is...
```
describe SomeClass do
describe "#some_method" do
context "within some context" do
it "is possible, what I'm asking" do
# Actually, I'm n... | 2012/05/04 | [
"https://Stackoverflow.com/questions/10456605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/105570/"
] | Within your examples, you can use `example.metadata`, which is a hash that provides a ton of info. | Following the suggestion by @Myron Marston, I implemented something like this:
```
def mysterious_method_to_get_depth(meta)
if !meta.has_key?(:example_group)
0
else
1 + mysterious_method_to_get_depth(meta[:example_group])
end
end
```
You should call it like this: `mysterious_method_to_get... |
136,768 | I'm a bit confused about how [getdeb.net](http://getdeb.net) works now. The last time I got a package from there was a while ago; at that point the procedure was that you would just download a .deb for each package that you wanted to install/upgrade and then install it using `dpkg -i`. However the inexorable march of p... | 2010/05/01 | [
"https://superuser.com/questions/136768",
"https://superuser.com",
"https://superuser.com/users/22011/"
] | apt does not provide an user friendly way to achieve that, you will need to use apt pinning, check the following url:
<http://jaqque.sbih.org/kplug/apt-pinning.html>
To prevent any package to be upgraded from getdeb, you will need to create /etc/apt\_preferences with:
Package: \*
Pin: release o=GetDeb
Pin-Priority: 50 | You're looking for something called pinning. I've never been able to figure it out myself, so I'll let others point you in the right direction. |
136,768 | I'm a bit confused about how [getdeb.net](http://getdeb.net) works now. The last time I got a package from there was a while ago; at that point the procedure was that you would just download a .deb for each package that you wanted to install/upgrade and then install it using `dpkg -i`. However the inexorable march of p... | 2010/05/01 | [
"https://superuser.com/questions/136768",
"https://superuser.com",
"https://superuser.com/users/22011/"
] | You're looking for something called pinning. I've never been able to figure it out myself, so I'll let others point you in the right direction. | After trying for hours, I finally got the solution:
```
Package: *
Pin: origin archive.getdeb.net
Pin-Priority: -1
``` |
136,768 | I'm a bit confused about how [getdeb.net](http://getdeb.net) works now. The last time I got a package from there was a while ago; at that point the procedure was that you would just download a .deb for each package that you wanted to install/upgrade and then install it using `dpkg -i`. However the inexorable march of p... | 2010/05/01 | [
"https://superuser.com/questions/136768",
"https://superuser.com",
"https://superuser.com/users/22011/"
] | it should look like this, but without the empty line after the asteriks. Empty lines are not allowed between package, pin and pin-priority in /etc/apt/preferences.
Dont know why, this page changed the layout automaticaly.
Package: \*
Pin: origin archive.getdeb.net
Pin-Priority: -1 | You're looking for something called pinning. I've never been able to figure it out myself, so I'll let others point you in the right direction. |
136,768 | I'm a bit confused about how [getdeb.net](http://getdeb.net) works now. The last time I got a package from there was a while ago; at that point the procedure was that you would just download a .deb for each package that you wanted to install/upgrade and then install it using `dpkg -i`. However the inexorable march of p... | 2010/05/01 | [
"https://superuser.com/questions/136768",
"https://superuser.com",
"https://superuser.com/users/22011/"
] | apt does not provide an user friendly way to achieve that, you will need to use apt pinning, check the following url:
<http://jaqque.sbih.org/kplug/apt-pinning.html>
To prevent any package to be upgraded from getdeb, you will need to create /etc/apt\_preferences with:
Package: \*
Pin: release o=GetDeb
Pin-Priority: 50 | After trying for hours, I finally got the solution:
```
Package: *
Pin: origin archive.getdeb.net
Pin-Priority: -1
``` |
136,768 | I'm a bit confused about how [getdeb.net](http://getdeb.net) works now. The last time I got a package from there was a while ago; at that point the procedure was that you would just download a .deb for each package that you wanted to install/upgrade and then install it using `dpkg -i`. However the inexorable march of p... | 2010/05/01 | [
"https://superuser.com/questions/136768",
"https://superuser.com",
"https://superuser.com/users/22011/"
] | apt does not provide an user friendly way to achieve that, you will need to use apt pinning, check the following url:
<http://jaqque.sbih.org/kplug/apt-pinning.html>
To prevent any package to be upgraded from getdeb, you will need to create /etc/apt\_preferences with:
Package: \*
Pin: release o=GetDeb
Pin-Priority: 50 | it should look like this, but without the empty line after the asteriks. Empty lines are not allowed between package, pin and pin-priority in /etc/apt/preferences.
Dont know why, this page changed the layout automaticaly.
Package: \*
Pin: origin archive.getdeb.net
Pin-Priority: -1 |
136,768 | I'm a bit confused about how [getdeb.net](http://getdeb.net) works now. The last time I got a package from there was a while ago; at that point the procedure was that you would just download a .deb for each package that you wanted to install/upgrade and then install it using `dpkg -i`. However the inexorable march of p... | 2010/05/01 | [
"https://superuser.com/questions/136768",
"https://superuser.com",
"https://superuser.com/users/22011/"
] | it should look like this, but without the empty line after the asteriks. Empty lines are not allowed between package, pin and pin-priority in /etc/apt/preferences.
Dont know why, this page changed the layout automaticaly.
Package: \*
Pin: origin archive.getdeb.net
Pin-Priority: -1 | After trying for hours, I finally got the solution:
```
Package: *
Pin: origin archive.getdeb.net
Pin-Priority: -1
``` |
20,347,469 | I am using the command
```
nosetests -v --with-coverage --cover-package=task --cover-erase --cover-html-dir=cover --cover-html --with-xunit task
```
to run the test cases
but in the end after running all the testcases I get the nosetests.xml blank and the following error.
```
Traceback (most recent call last):
Fi... | 2013/12/03 | [
"https://Stackoverflow.com/questions/20347469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1075358/"
] | Have you debug your code, I mean, you must have to debug and see that it returns the Entry box value or not, if it returns value, then check what value it return. | You're probably dealing with whitespace (either in the data you read from the file, or from your user input.) Call [`.strip()`](http://docs.python.org/2/library/stdtypes.html#str.strip) to remove leading and trailing whitespace from a string. |
11,859 | In the early stage, it's said that radiating loving kindness to opposite sex can potentially arouse lust. While I'm not sure if the person who we radiate loving kindness to can have their lust aroused, is radiating loving kindness in any stage of practice by any means can increase the attachment to that person? What is... | 2015/10/01 | [
"https://buddhism.stackexchange.com/questions/11859",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/5315/"
] | * **Lovingkindness**, good-will (metta): **Near enemy** – **attachment/lust**; far enemy – hatred
* Compassion (karuna): Near enemy – pity; far enemy – cruelty
* Sympathetic joy, Appreciation (mudita), joy at the good fortune of
others: Near enemy – comparison,hypocrisy, insincerity, joy for
others but tinged with iden... | Generally you should not do Metta to:
* Lingavisabhāga (opposite sex - generally directed at a specific person)
* Kālakatapuggala (a dead person)
See page 81 of [Knowing and Seeing](http://www.paaukforestmonastery.org/books/1PAS%2001%20Knowing%20and%20Seeing%204th%20Rev%20Ed%20-%20pamc%20112014.pdf) revised edition b... |
10,188,686 | Is this method signature valid?
```
public Boolean isBikeTyreFlat(){}
```
Note that I am trying to return an Object not a primitive here.
Thanks :) | 2012/04/17 | [
"https://Stackoverflow.com/questions/10188686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1287477/"
] | In JavaBeans, the getter method for `boolean` can be `getXXX()` or `isXXX()`. Since `Boolean` is not a primitive type, a `getXXX()` is required. The `isXXX()` is only for the boolean primitive type (thanks @Kemoda).
Refer to [section 8.3.2 of the JavaBeans Specification](http://download.oracle.com/otndocs/jcp/7224-jav... | In strict JavaBeans, this is a valid name (see the answer of @TheEliteGentleman).
However, please make sure you are not doing something like this:
```
public class BikeTyre {
private boolean flat;
public Boolean isBikeTyreFlat() {
return flat;
}
}
```
This is not recommended, since the name of y... |
10,188,686 | Is this method signature valid?
```
public Boolean isBikeTyreFlat(){}
```
Note that I am trying to return an Object not a primitive here.
Thanks :) | 2012/04/17 | [
"https://Stackoverflow.com/questions/10188686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1287477/"
] | In JavaBeans, the getter method for `boolean` can be `getXXX()` or `isXXX()`. Since `Boolean` is not a primitive type, a `getXXX()` is required. The `isXXX()` is only for the boolean primitive type (thanks @Kemoda).
Refer to [section 8.3.2 of the JavaBeans Specification](http://download.oracle.com/otndocs/jcp/7224-jav... | I have to disagree with [this answer](https://stackoverflow.com/a/10189265/953327). I had this same question and wrote a quick test.
Given the JavaBean as:
```
package example;
public class FooBean {
private Boolean published;
public void setPublished(Boolean published) {
this.published = published... |
10,741,522 | I've made test Program for some Sharepoint WSS3 features but I have run into an odd exception.
```
public XmlNode GetListsCollection()
{
XmlNode nodeLists;
ShareLists.Lists lists = new ShareLists.Lists(); // <--- Exception causing line
lists.Credentials = CredentialCache.DefaultCredentials;
return no... | 2012/05/24 | [
"https://Stackoverflow.com/questions/10741522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1193596/"
] | There is no Microsoft.CSharp.dll for 3.5, but quite often it is added automatically to 4.0 projects without it being needed (unless you are using things like the dynamic keyword in which case your projects needs to be 4.0) , so I would try removing this reference.
Re version 4 of system.dll , you say this file is fou... | It looks like you still have some 4.0 assemblies used in your tool. When you switch target to 2.0-3.5 you must stop using 4.0 assemblies. Unfortunately since you are moving to older version of the Framework there would be cases you have to change your code to not use 4.0-only features. |
11,251,923 | I am trying to format a string to display two columns for a high score table. Python is able to do this well when using print
```
print '{0:2d} {1:3d} {2:4d}'.format(x, x*x, x*x*x)
```
but when trying to use a formatted string, but becomes more challenging it seems. This is the result I am trying to get:
```
#for n... | 2012/06/28 | [
"https://Stackoverflow.com/questions/11251923",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1164049/"
] | Is something like this acceptable?
```
>>> names = ["Firstname Lastname", "First Last", "Name Name"]
>>> scores = [49900, 93000, 6400]
>>> for i,v in enumerate(zip(names, scores)):
... name, score = v[0], v[1]
... print "% *d. % -*s %d" % (3, i, 30, name, score)
...
0. Firstname Lastname 49900
... | You have two options:
1. Change the font of the PyGTK label to a font that has equal width characters (not unreasonable in a game, it reminds us of the old arcade days). You can do this with [`set_markup`](http://www.pygtk.org/docs/pygtk/class-pangolayout.html#method-pangolayout--set-markup) of `pango.Layout`.
2. Use ... |
3,727,693 | I've built an ajax-based website that utilizes the address jquery plugin for back forward button browser compatibility. However, since pages are fetched via ajax page conventional page refresh is not obvious and rather disorienting in terms of user navigation etc. User clicks a link, ajax fetches the page, although suc... | 2010/09/16 | [
"https://Stackoverflow.com/questions/3727693",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/196103/"
] | Take a look at
```
$.address.wrap(value)
```
<http://www.asual.com/jquery/address/docs/#api-reference>
Or you can use the jquery animate to scroll up. What I've done before is animate the scroling and then change the $.address.value. Like this:
```
$('a').click(function(e){
e.preventDefault();
var a = $(t... | I had exactly the same problem, tried several ways to scroll to top and i ended up removing the scroll to top button.
Now i have been testing my website with iphone (using bootstrap responsive) and i found out that only the top of the page would be displayed and i wasnt able to scroll at all.
Both issues seems to be ... |
349,352 | I am hoping someone can explain in simple terms, what it really means that windows XP will be [end of life](http://windows.microsoft.com/en-us/windows/products/lifecycle)?
It looks like SP2 is already not being patched, but maybe SP3 is going to be patched up until 4/18/2014?
So I assume that means there will be wind... | 2012/01/12 | [
"https://serverfault.com/questions/349352",
"https://serverfault.com",
"https://serverfault.com/users/41580/"
] | Simply put EOL means no patches no support. From <http://support.microsoft.com/lifecycle/?LN=en-gb&C2=1173> "Support ends 24 months after the next service pack releases or at the end of the product's support lifecycle, whichever comes first. For more information, please see the service pack policy..."
For service pack... | [This Microsoft Table](http://support.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=Windows%20XP&Filter=FilterNO) and the [revelant article](http://support.microsoft.com/gp/lifepolicy) to crossmatch with Extended Support,Mainstream support etc. In windows XP terms it means upgrade where possible.
>
> It l... |
349,352 | I am hoping someone can explain in simple terms, what it really means that windows XP will be [end of life](http://windows.microsoft.com/en-us/windows/products/lifecycle)?
It looks like SP2 is already not being patched, but maybe SP3 is going to be patched up until 4/18/2014?
So I assume that means there will be wind... | 2012/01/12 | [
"https://serverfault.com/questions/349352",
"https://serverfault.com",
"https://serverfault.com/users/41580/"
] | Simply put EOL means no patches no support. From <http://support.microsoft.com/lifecycle/?LN=en-gb&C2=1173> "Support ends 24 months after the next service pack releases or at the end of the product's support lifecycle, whichever comes first. For more information, please see the service pack policy..."
For service pack... | Just some further information, many vendors only provide support for their products when they are used in a supported environment. For example JoeAccounting is the software your accounting department uses on their Windows XP computers. Say something happens and you have to re-install JoeAccounting on their computers, b... |
349,352 | I am hoping someone can explain in simple terms, what it really means that windows XP will be [end of life](http://windows.microsoft.com/en-us/windows/products/lifecycle)?
It looks like SP2 is already not being patched, but maybe SP3 is going to be patched up until 4/18/2014?
So I assume that means there will be wind... | 2012/01/12 | [
"https://serverfault.com/questions/349352",
"https://serverfault.com",
"https://serverfault.com/users/41580/"
] | I won't speak to WHEN it will happen, since the date has fluctuated...but to answer your questions and help make this question a `canonical` for this topic that is sure to pop up a lot...
>
> **So I assume that means there will be windows update patches available
> until that date?**
>
>
>
MS will continue to rel... | Simply put EOL means no patches no support. From <http://support.microsoft.com/lifecycle/?LN=en-gb&C2=1173> "Support ends 24 months after the next service pack releases or at the end of the product's support lifecycle, whichever comes first. For more information, please see the service pack policy..."
For service pack... |
349,352 | I am hoping someone can explain in simple terms, what it really means that windows XP will be [end of life](http://windows.microsoft.com/en-us/windows/products/lifecycle)?
It looks like SP2 is already not being patched, but maybe SP3 is going to be patched up until 4/18/2014?
So I assume that means there will be wind... | 2012/01/12 | [
"https://serverfault.com/questions/349352",
"https://serverfault.com",
"https://serverfault.com/users/41580/"
] | I won't speak to WHEN it will happen, since the date has fluctuated...but to answer your questions and help make this question a `canonical` for this topic that is sure to pop up a lot...
>
> **So I assume that means there will be windows update patches available
> until that date?**
>
>
>
MS will continue to rel... | [This Microsoft Table](http://support.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=Windows%20XP&Filter=FilterNO) and the [revelant article](http://support.microsoft.com/gp/lifepolicy) to crossmatch with Extended Support,Mainstream support etc. In windows XP terms it means upgrade where possible.
>
> It l... |
349,352 | I am hoping someone can explain in simple terms, what it really means that windows XP will be [end of life](http://windows.microsoft.com/en-us/windows/products/lifecycle)?
It looks like SP2 is already not being patched, but maybe SP3 is going to be patched up until 4/18/2014?
So I assume that means there will be wind... | 2012/01/12 | [
"https://serverfault.com/questions/349352",
"https://serverfault.com",
"https://serverfault.com/users/41580/"
] | I won't speak to WHEN it will happen, since the date has fluctuated...but to answer your questions and help make this question a `canonical` for this topic that is sure to pop up a lot...
>
> **So I assume that means there will be windows update patches available
> until that date?**
>
>
>
MS will continue to rel... | Just some further information, many vendors only provide support for their products when they are used in a supported environment. For example JoeAccounting is the software your accounting department uses on their Windows XP computers. Say something happens and you have to re-install JoeAccounting on their computers, b... |
21,749,640 | I want to commit binaries when i create a tag, those binaries are .gitignored and git-add says "Use -f if you really want to add them." So, i wonder if this would be a safe thing to do or not.
I want to use this to checkout binaries on a target computer. The old "system" is to keep old versions in a subdirectory named ... | 2014/02/13 | [
"https://Stackoverflow.com/questions/21749640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3239702/"
] | Find your notes.ini file on your computer. Look for two lines:
```
MailServer=CN=mail01/O=xxx
MailFile=mail\aaa.nsf
```
These are the values that you need in arguments for the `getDatabase()` method. Note that you should double the backslashes in Java because the language will treat them as escapes, or just change ... | The Problem is that the db ist not found. So try to change the path from the db. if your db is in a folder on the server give the path for the folder in java. Your path variable must have the right format.
In your case for Example it must be
session = NotesFactory.createSession();
db = session.getDatabase("mail01/xxx",... |
21,749,640 | I want to commit binaries when i create a tag, those binaries are .gitignored and git-add says "Use -f if you really want to add them." So, i wonder if this would be a safe thing to do or not.
I want to use this to checkout binaries on a target computer. The old "system" is to keep old versions in a subdirectory named ... | 2014/02/13 | [
"https://Stackoverflow.com/questions/21749640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3239702/"
] | This is more of a comment than an answer, but I need more reputation points to create a comment (*hint, hint*).
When debugging a problem like this it can be helpful to look at the error code in the NotesException object. Assuming you are catching NotesException, what is the value of the public `NotesException.id` fiel... | The Problem is that the db ist not found. So try to change the path from the db. if your db is in a folder on the server give the path for the folder in java. Your path variable must have the right format.
In your case for Example it must be
session = NotesFactory.createSession();
db = session.getDatabase("mail01/xxx",... |
22,046,633 | ```
departments = (from p in _context.DateSnippets
where query.UserInfo.Departments.Contains(p.DepartmentId)
group p by p.DepartmentId
into g
select new Tuple<int, DateTime>(g.Key, g.Max(x... | 2014/02/26 | [
"https://Stackoverflow.com/questions/22046633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1510644/"
] | The problem is here:
```
new Tuple<int, DateTime>(g.Key, g.Max(x => x.FromDate)
```
Unfortunately when you execute this against database, it won't work because you can not pass parameters in constructors. one of the many workarounds could be using an object
```
new MyData {Key = g.Key, Date = g.Max(x => x.FromDate... | Change the `Contains` to an `Any`
```
where query.UserInfo.Departments.Any(d => d.DepartmentId == p.DepartmentId)
```
Change the Select to projecting to an annoymous class or poco. The error explicitly states you can not have parameters in the constructor
```
select new
{
g.Key,
g.Max(x => x.FromDate)
}
``... |
33,077,067 | I have a table in html ,containing 5 rows , and each row , has 3 td, the second td for each row has a random number of images , I want to count the number of images that created in that td .
in my code , I get a random number and make a loop to create number of pictures in td that has an id ="one" and so on
but I need... | 2015/10/12 | [
"https://Stackoverflow.com/questions/33077067",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5287684/"
] | You can use `querySelectorAll` for that :
```
var count = document.querySelectorAll('td img').length
```
If you want to count images in one `td`, you can use the `id` of the `td` :
```
var count = document.querySelectorAll('#one img').length;
``` | In plain js you can do this:
```
var cnt = document.getElementById('myTable').getElementsByTagName('img').length
``` |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Notice that the denominators are equal, save for a factor of $-1$: which has no impact since the fraction is squared. $$\; (4 - x^2)^2 = (-(x^2 - 4))^2 = (x^2 - 4)^2$$
So multiply both sides by $(x^2 - 4)^2$, and you'll cancel both denominators. Then there's no need to divide by $5x$.
After multiplying both sides by ... | As others have noted, it is valid so long as $x\ne0,$ since otherwise you're dividing by $0$. Let me offer another approach, using the difference of squares formula $a^2-b^2=(a-b)(a+b)$, together with the fact that $(-c)^2=c^2.$ The following, then, are equivalent:
$$\left(\frac{x^2+6}{x^2-4}\right)^2=\left(\frac{5x}{... |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Yes.
In response to your edit: You squared both sides of the equation to correct your post. However, this doesn't make a difference, it's still valid. Since you squared both sides of the equation (applied the same operation), you didn't effectively change anything.
The solution is therefore:
1. take the square root
... | If you are solving for $x$, it's OK as long as in the end you check whether the expression you divided by, $5x$, is non-zero.
In general, you would have to follow through with everything assuming all transformations are legal, and then check for weak spots like division by zero ($5x=0$ or $x^2-4=0$, or square roots or... |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Notice that the denominators are equal, save for a factor of $-1$: which has no impact since the fraction is squared. $$\; (4 - x^2)^2 = (-(x^2 - 4))^2 = (x^2 - 4)^2$$
So multiply both sides by $(x^2 - 4)^2$, and you'll cancel both denominators. Then there's no need to divide by $5x$.
After multiplying both sides by ... | If you are solving for $x$, it's OK as long as in the end you check whether the expression you divided by, $5x$, is non-zero.
In general, you would have to follow through with everything assuming all transformations are legal, and then check for weak spots like division by zero ($5x=0$ or $x^2-4=0$, or square roots or... |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Yes.
In response to your edit: You squared both sides of the equation to correct your post. However, this doesn't make a difference, it's still valid. Since you squared both sides of the equation (applied the same operation), you didn't effectively change anything.
The solution is therefore:
1. take the square root
... | As others have noted, it is valid so long as $x\ne0,$ since otherwise you're dividing by $0$. Let me offer another approach, using the difference of squares formula $a^2-b^2=(a-b)(a+b)$, together with the fact that $(-c)^2=c^2.$ The following, then, are equivalent:
$$\left(\frac{x^2+6}{x^2-4}\right)^2=\left(\frac{5x}{... |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Yes.
In response to your edit: You squared both sides of the equation to correct your post. However, this doesn't make a difference, it's still valid. Since you squared both sides of the equation (applied the same operation), you didn't effectively change anything.
The solution is therefore:
1. take the square root
... | Notice that the denominators are equal, save for a factor of $-1$: which has no impact since the fraction is squared. $$\; (4 - x^2)^2 = (-(x^2 - 4))^2 = (x^2 - 4)^2$$
So multiply both sides by $(x^2 - 4)^2$, and you'll cancel both denominators. Then there's no need to divide by $5x$.
After multiplying both sides by ... |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Notice that the denominators are equal, save for a factor of $-1$: which has no impact since the fraction is squared. $$\; (4 - x^2)^2 = (-(x^2 - 4))^2 = (x^2 - 4)^2$$
So multiply both sides by $(x^2 - 4)^2$, and you'll cancel both denominators. Then there's no need to divide by $5x$.
After multiplying both sides by ... | Yes, that operation is legal. It just comes from multiplying $\frac{(4-x^2)}{5x}$ on both sides. |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Yes.
In response to your edit: You squared both sides of the equation to correct your post. However, this doesn't make a difference, it's still valid. Since you squared both sides of the equation (applied the same operation), you didn't effectively change anything.
The solution is therefore:
1. take the square root
... | Yes, that operation is legal. It just comes from multiplying $\frac{(4-x^2)}{5x}$ on both sides. |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Assuming $x \neq 0$, then yes. Otherwise you're dividing by zero.
Hope that helps, | Yes, that operation is legal. It just comes from multiplying $\frac{(4-x^2)}{5x}$ on both sides. |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Assuming $x \neq 0$, then yes. Otherwise you're dividing by zero.
Hope that helps, | Notice that the denominators are equal, save for a factor of $-1$: which has no impact since the fraction is squared. $$\; (4 - x^2)^2 = (-(x^2 - 4))^2 = (x^2 - 4)^2$$
So multiply both sides by $(x^2 - 4)^2$, and you'll cancel both denominators. Then there's no need to divide by $5x$.
After multiplying both sides by ... |
507,048 | Is this operation allowed?
Going from this:
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6 \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4 \right )5x} \right )^{2}= 1$ | 2013/09/27 | [
"https://math.stackexchange.com/questions/507048",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/51030/"
] | Assuming $x \neq 0$, then yes. Otherwise you're dividing by zero.
Hope that helps, | As others have noted, it is valid so long as $x\ne0,$ since otherwise you're dividing by $0$. Let me offer another approach, using the difference of squares formula $a^2-b^2=(a-b)(a+b)$, together with the fact that $(-c)^2=c^2.$ The following, then, are equivalent:
$$\left(\frac{x^2+6}{x^2-4}\right)^2=\left(\frac{5x}{... |
545 | How long is the term for moderator? Is it one year? | 2011/09/14 | [
"https://security.meta.stackexchange.com/questions/545",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/2737/"
] | There is no specific term - it is until a moderator steps down or is removed.
[Should Community Moderators be "elected for life", or have terms?](https://meta.stackexchange.com/questions/984/should-community-moderators-be-elected-for-life-or-have-terms) | There are no "terms" for moderators. Instead, they retain their position mostly indefinitely. This is subject to challenge if, say, the moderator wishes to step down (such as if they never had the time for it) or if things go south. Otherwise, they stick around all the time. |
545 | How long is the term for moderator? Is it one year? | 2011/09/14 | [
"https://security.meta.stackexchange.com/questions/545",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/2737/"
] | There is no specific term - it is until a moderator steps down or is removed.
[Should Community Moderators be "elected for life", or have terms?](https://meta.stackexchange.com/questions/984/should-community-moderators-be-elected-for-life-or-have-terms) | Would we be interested in an unofficial community standard for that? Kind of a polite, "we go for six months at a time and then rotate it up among those interested?"
... Though our current crowd of pro tempore folk has been pretty awesome. |
5,416,901 | I am parsing XML Data using NSXMLParser and I notice now, that the Elements can contain ALL characters, including for example a `&`. Since the parser is giving an error when it comes across this character I replaced every Occurence of this character.
Now I want to make sure to handle every of these characters that may ... | 2011/03/24 | [
"https://Stackoverflow.com/questions/5416901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/338476/"
] | To answer half your question, XML has 5 special characters that you may want to escape:
< -- replace with <
> -- replace with >
& -- replace with &
' -- replace with '
and
" -- replace with "
Now, for the other half--how to find and replace these without also replacing all the tags, etc... N... | You should encode these characters for instance & becomes `&` or " becomes `"`
When it goes through the parser it should come out ok. Your other option is to use a different XML parser like TBXML which doesn't do format checking. |
55,005,646 | I am behind a proxy settings with the environment variables on the proxy settings set properly. The environment variables are working properly when doing pip installs for instance. I retrieve the proxy settings with the getproxies method, which I checked and returns the correct dict.
I am trying the following approach... | 2019/03/05 | [
"https://Stackoverflow.com/questions/55005646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5726297/"
] | Ok, figured it out. The issue with my environment variables was that the username and password were not specified because I work in a single sign on environment. Therefore the password needs to be properly set. Just substituting my credentials in the proxy definition did not work, so I had to use the urllib opener to f... | The HTTP 407 code states that you need to authenticate to the proxy server.
The http response header `Proxy-Authenticate` will tell you what kind of authentication is required - print out the response headers.
It might also be a problem with the url...try removing the www bit
For reference : <https://developer.moz... |
115,074 | Is there an instrument that can produce a sub bass sine wave like tone, that also has a lot of volume? Something that would sound a bit like an 808 bass.
I've listened to some contrabass type flutes but it sounds very breathy and there are too many overtone sounds.
I know that an ocarina produces a tone that comes cl... | 2021/06/07 | [
"https://music.stackexchange.com/questions/115074",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/74657/"
] | There really is no such thing as a sub bass sine like tone with a lot of volume. There are some organs with 32" subbass flutes (which produce a comparatively sine-like tone). They are monstrous in size and move a lot of air, but due to the limits of human hearing, the audible volume is not all that large. You feel thei... | What do you mean by sub bass? Are you referring to a sub harmonic of the instrument?
I will assume you are asking whether an instrument can produce a pure sine wave.
It would be very unlikely to get a pure sine wave from a musical instrument. Even a function generator will produce transient harmonics due to being "sw... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | Your best bet is a [Feyslaughter Weapon](http://www.wizards.com/dndinsider/compendium/item.aspx?id=1463):
>
> Feyslaughter weapon
>
>
> Level: 14
>
>
> Property: When you hit a creature with this weapon, that creature cannot teleport until the end of your next turn.
>
>
>
Other Items: [Forbidding Weapon](http... | Normal teleportation [requires line of sight](https://rpg.stackexchange.com/q/2238/8). So if you can break line of sight from a valid target space, you can prevent teleporation.
Some tactics and methods to accomplish that:
* make them blind.
* tactically use walls (like a `Wall of Fire`) to "box them in".
* immobiliz... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | You might need to have a talk with your DM. Ask him why he keeps using these kinds of monsters. Remind him that you are here to kill things and take their stuff. :) This kind of tactic, used right, could be an interesting twist in the game. Having to track down and finally kill an annoying bad guy is very rewarding. If... | It's possible the DM is just enjoying a power trip, in which case there's nothing you can do to fix this situation at the *technical level*. As other answers suggest, you need to sit down with your DM and figure out why this is happening at the *social level*.
But that aside...
**Let the DM teleport his monsters away... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | Normal teleportation [requires line of sight](https://rpg.stackexchange.com/q/2238/8). So if you can break line of sight from a valid target space, you can prevent teleporation.
Some tactics and methods to accomplish that:
* make them blind.
* tactically use walls (like a `Wall of Fire`) to "box them in".
* immobiliz... | Aside from any special anti-teleportation powers already mentioned, there's only three things I know of that prevent teleportation:
* A successful save to avoid involuntary teleportation into "hindering terrain".
* The person using the power does not have Line of Sight to either the target object, or the target endpoi... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | Your best bet is a [Feyslaughter Weapon](http://www.wizards.com/dndinsider/compendium/item.aspx?id=1463):
>
> Feyslaughter weapon
>
>
> Level: 14
>
>
> Property: When you hit a creature with this weapon, that creature cannot teleport until the end of your next turn.
>
>
>
Other Items: [Forbidding Weapon](http... | Aside from any special anti-teleportation powers already mentioned, there's only three things I know of that prevent teleportation:
* A successful save to avoid involuntary teleportation into "hindering terrain".
* The person using the power does not have Line of Sight to either the target object, or the target endpoi... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | I've attempted here to find some of the lowest level stuff that will do what you want, here's a couple of suggestions:
**Dimensional Warding - Swordmage Utility 6 - Daily**
It's a close burst 2 arcane/stance/zone that prevents teleport in or out.
[Dimensional Warding compendium entry](http://www.wizards.com/dndinsid... | It's possible the DM is just enjoying a power trip, in which case there's nothing you can do to fix this situation at the *technical level*. As other answers suggest, you need to sit down with your DM and figure out why this is happening at the *social level*.
But that aside...
**Let the DM teleport his monsters away... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | Your best bet is a [Feyslaughter Weapon](http://www.wizards.com/dndinsider/compendium/item.aspx?id=1463):
>
> Feyslaughter weapon
>
>
> Level: 14
>
>
> Property: When you hit a creature with this weapon, that creature cannot teleport until the end of your next turn.
>
>
>
Other Items: [Forbidding Weapon](http... | It's possible the DM is just enjoying a power trip, in which case there's nothing you can do to fix this situation at the *technical level*. As other answers suggest, you need to sit down with your DM and figure out why this is happening at the *social level*.
But that aside...
**Let the DM teleport his monsters away... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | You might need to have a talk with your DM. Ask him why he keeps using these kinds of monsters. Remind him that you are here to kill things and take their stuff. :) This kind of tactic, used right, could be an interesting twist in the game. Having to track down and finally kill an annoying bad guy is very rewarding. If... | Normal teleportation [requires line of sight](https://rpg.stackexchange.com/q/2238/8). So if you can break line of sight from a valid target space, you can prevent teleporation.
Some tactics and methods to accomplish that:
* make them blind.
* tactically use walls (like a `Wall of Fire`) to "box them in".
* immobiliz... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | I've attempted here to find some of the lowest level stuff that will do what you want, here's a couple of suggestions:
**Dimensional Warding - Swordmage Utility 6 - Daily**
It's a close burst 2 arcane/stance/zone that prevents teleport in or out.
[Dimensional Warding compendium entry](http://www.wizards.com/dndinsid... | You might need to have a talk with your DM. Ask him why he keeps using these kinds of monsters. Remind him that you are here to kill things and take their stuff. :) This kind of tactic, used right, could be an interesting twist in the game. Having to track down and finally kill an annoying bad guy is very rewarding. If... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | I've attempted here to find some of the lowest level stuff that will do what you want, here's a couple of suggestions:
**Dimensional Warding - Swordmage Utility 6 - Daily**
It's a close burst 2 arcane/stance/zone that prevents teleport in or out.
[Dimensional Warding compendium entry](http://www.wizards.com/dndinsid... | Normal teleportation [requires line of sight](https://rpg.stackexchange.com/q/2238/8). So if you can break line of sight from a valid target space, you can prevent teleporation.
Some tactics and methods to accomplish that:
* make them blind.
* tactically use walls (like a `Wall of Fire`) to "box them in".
* immobiliz... |
4,153 | In our gaming group, our storyteller loves to use creatures with teleportation abilities. This is starting to get frustrating since as soon as a creature is bloodied, it teleports away with its next action. We've only managed to kill 1 creature in our last 10 combat encounters.
I'm looking for any powers or magical it... | 2010/11/04 | [
"https://rpg.stackexchange.com/questions/4153",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/913/"
] | It's possible the DM is just enjoying a power trip, in which case there's nothing you can do to fix this situation at the *technical level*. As other answers suggest, you need to sit down with your DM and figure out why this is happening at the *social level*.
But that aside...
**Let the DM teleport his monsters away... | Aside from any special anti-teleportation powers already mentioned, there's only three things I know of that prevent teleportation:
* A successful save to avoid involuntary teleportation into "hindering terrain".
* The person using the power does not have Line of Sight to either the target object, or the target endpoi... |
64,972,148 | So the issue is that when using c# the char is 4 bytes so "abc" is (65 0 66 0 67 0).
When inputing that to a wstring in c++ thru sending it in a socket i get the following output a.
How i am able to convert such a string to a c++ string? | 2020/11/23 | [
"https://Stackoverflow.com/questions/64972148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14144653/"
] | Sounds like you need ASCII or UTF-8 encoding instead of Unicode.
`65 0 66 0 67 0` is only going to get you the `A`, since the next zero is interpreted as a null termination character in C++.
Strategies for converting Unicode to ASCII can be found [here](https://stackoverflow.com/q/2460206/102937). | >
> using c# the char is 4 bytes
>
>
>
No, in CSharp Strings are encoded in UTF16. Code units need at least two bytes in UTF16. For simple charachters a single code unit can represent a code point (e.g. 65 0).
On Windows wstring is usually UTF16 (2-4 Bytes) encoded, too. But on Unix/Linux wstring uses usually UTF... |
64,972,148 | So the issue is that when using c# the char is 4 bytes so "abc" is (65 0 66 0 67 0).
When inputing that to a wstring in c++ thru sending it in a socket i get the following output a.
How i am able to convert such a string to a c++ string? | 2020/11/23 | [
"https://Stackoverflow.com/questions/64972148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14144653/"
] | I have been able to solve the issue by using a std::u16string.
Here is some example code
```
std::vector<char> data = { 65, 0, 66, 0, 67, 0 };
std::u16string string(&data[0], data.size() / 2);
// now string should be encoded right
``` | >
> using c# the char is 4 bytes
>
>
>
No, in CSharp Strings are encoded in UTF16. Code units need at least two bytes in UTF16. For simple charachters a single code unit can represent a code point (e.g. 65 0).
On Windows wstring is usually UTF16 (2-4 Bytes) encoded, too. But on Unix/Linux wstring uses usually UTF... |
44,531,243 | I am trying to set up a React project that uses webpack and ESLint with the airbnb config for ESLint. When I try starting up the project with webpack dev server, I get the following error:
>
> "Module build failed: Error:
> /react-template/node\_modules/eslint-config-airbnb/rules/react-a11y.js:
> ESLint configurati... | 2017/06/13 | [
"https://Stackoverflow.com/questions/44531243",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7400976/"
] | Global eslint has been upgraded from 3.19.0-1 to 4.0.0-1 when the problem appeared for me.
>
> `eslint` v4 is not yet supported in `eslint-config-airbnb` and `eslint-config-airbnb-base`
>
>
>
<https://github.com/eslint/eslint/issues/8726#issuecomment-308367541> | You JSON isn't valid. It's missing quotes around first "parser";
```
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"extends": ["airbnb"]
}
``` |
44,531,243 | I am trying to set up a React project that uses webpack and ESLint with the airbnb config for ESLint. When I try starting up the project with webpack dev server, I get the following error:
>
> "Module build failed: Error:
> /react-template/node\_modules/eslint-config-airbnb/rules/react-a11y.js:
> ESLint configurati... | 2017/06/13 | [
"https://Stackoverflow.com/questions/44531243",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7400976/"
] | I figured out a solution.
You have to edit `react-a11y.js` and `react.js` located in `./node_modules/.bin/eslint-config-airbnb/rules/`.
In `react-a11y.js` remove:
```
ecmaFeatures: {
jsx: true
},
```
and replace it with:
```
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
```
In `react.js` just remo... | You JSON isn't valid. It's missing quotes around first "parser";
```
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"extends": ["airbnb"]
}
``` |
44,531,243 | I am trying to set up a React project that uses webpack and ESLint with the airbnb config for ESLint. When I try starting up the project with webpack dev server, I get the following error:
>
> "Module build failed: Error:
> /react-template/node\_modules/eslint-config-airbnb/rules/react-a11y.js:
> ESLint configurati... | 2017/06/13 | [
"https://Stackoverflow.com/questions/44531243",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7400976/"
] | I figured out a solution.
You have to edit `react-a11y.js` and `react.js` located in `./node_modules/.bin/eslint-config-airbnb/rules/`.
In `react-a11y.js` remove:
```
ecmaFeatures: {
jsx: true
},
```
and replace it with:
```
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
```
In `react.js` just remo... | Global eslint has been upgraded from 3.19.0-1 to 4.0.0-1 when the problem appeared for me.
>
> `eslint` v4 is not yet supported in `eslint-config-airbnb` and `eslint-config-airbnb-base`
>
>
>
<https://github.com/eslint/eslint/issues/8726#issuecomment-308367541> |
27,129,402 | I have this code and i wanna know why tha variable is not returning any value outside the for loop.
```
void juizes_nota_alta(str_nomepont a)
{
int i,j;
int notamax=0;
for (i=0;i<MAX_JUIZES;i++)
{
if (a.pontuacao[i]>notamax)
{
notamax=a.pontuacao[i];
j=i;
... | 2014/11/25 | [
"https://Stackoverflow.com/questions/27129402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4141989/"
] | Your `printf()` is wrong.
It should include a `%d` conversion specifier. The string controls what gets printed, just passing more arguments won't make them show up unless the string says so.
Addressing that will bring you one more step closer. Also add `j = 0` before the loop to make sure `j` has a valid value when y... | Initializing a variable based on some condition is not a good idea.
If the condition fails and the variable never gets initialized and when you try to use the variable you have an indeterminate variable value
So just before assigning `j` to anything while declaring make
```
int j=0;
```
In your `printf()` as sugg... |
58,407,978 | I'm reading an article on Apache Spark and I came across the following sentence:
"Hadoop as a big data processing technology has been around for 10 years and has proven to be the solution of choice for processing large data sets. MapReduce is a great solution for one-pass computations, but not very efficient for use ... | 2019/10/16 | [
"https://Stackoverflow.com/questions/58407978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7253901/"
] | Map Reduce
==========
[](https://i.stack.imgur.com/LEqzi.png)
Source : <https://www.guru99.com/introduction-to-mapreduce.html>
Here you can see, the input file is processed as follows.
1. first split
2. goes into mapping phase
3. Shuffling
4. Redu... | One pass computations is when you are reading the dataset once whereas multipass computations is when a dataset is read once from the disk and multiple computations or operation are done on the same dataset. Apache Spark processing framework allows you to read data once which is then cached into memory and then we can ... |
4,552 | I'm a complete newbie to woodwork - please bear with me!
I'm trying to build a free-standing fence or barrier that will sit on top of concrete similar to this picture:
[](https://i.stack.imgur.com/3utB1.jpg)
The fence I want to build is a bit taller - 6-8ft. How wide doe... | 2016/08/23 | [
"https://woodworking.stackexchange.com/questions/4552",
"https://woodworking.stackexchange.com",
"https://woodworking.stackexchange.com/users/2614/"
] | >
> How wide does the "feet" of the fence have to be to keep it from falling over in the wind?
>
>
>
There are too many unknown variables to be able to get a definitive answer on how long the "feet" need to be, but if you guestimate the dimensions of the fence in the photo and multiply up to your possible heights... | Don't try to guess how much wind will force your fence and how wide feet would be needed and how much weights adds to the equation.
Instead figure out a way (construction) to adapt (change) the feet (and weights) to what you observe (learn). |
2,735,994 | Is there any way to remove the URL from a URLClassloader?
If suppose we removed the URL from classloader what all possible problems can happen? | 2010/04/29 | [
"https://Stackoverflow.com/questions/2735994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269154/"
] | >
> Is there any way to remove the URL from a URLClassloader?
>
>
>
AFAIK, no.
>
> If suppose we removed the URL from classloader what all possible problems can happen?
>
>
>
Well, for a start it can break code that relies on being able to dynamically load classes and resources. It is also possible this kind... | >
> Is there any way to remove the URL
> from a URLClassloader?
>
>
>
No.
>
> If suppose we removed the URL from
> classloader what all possible problems
> can happen?
>
>
>
As you can't the question is pointless. |
2,735,994 | Is there any way to remove the URL from a URLClassloader?
If suppose we removed the URL from classloader what all possible problems can happen? | 2010/04/29 | [
"https://Stackoverflow.com/questions/2735994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269154/"
] | >
> Is there any way to remove the URL from a URLClassloader?
>
>
>
AFAIK, no.
>
> If suppose we removed the URL from classloader what all possible problems can happen?
>
>
>
Well, for a start it can break code that relies on being able to dynamically load classes and resources. It is also possible this kind... | You could use `URL`s with `URLStreamHandler`s which shutdown, if you were desperate. That may not affect load classes and resources from already open Jar files.
I don't see a particular problem with this. Unlike `addURL` where a class may not be on the set of URLs when first asked for, and cannot be subsequently added... |
2,735,994 | Is there any way to remove the URL from a URLClassloader?
If suppose we removed the URL from classloader what all possible problems can happen? | 2010/04/29 | [
"https://Stackoverflow.com/questions/2735994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269154/"
] | >
> Is there any way to remove the URL
> from a URLClassloader?
>
>
>
No.
>
> If suppose we removed the URL from
> classloader what all possible problems
> can happen?
>
>
>
As you can't the question is pointless. | You could use `URL`s with `URLStreamHandler`s which shutdown, if you were desperate. That may not affect load classes and resources from already open Jar files.
I don't see a particular problem with this. Unlike `addURL` where a class may not be on the set of URLs when first asked for, and cannot be subsequently added... |
64,327,977 | I have a landing page that is made up of multiple routes as a single page application. But now I want to add in another route called `/dashboard` which shows live data from an API so when a user clicks on the button to the `dashboard` all they see is the contents of the dashboard and not the navbar and the footer above... | 2020/10/13 | [
"https://Stackoverflow.com/questions/64327977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13337635/"
] | You could wrap your navbar in a route with a render function. [Route render](https://reactrouter.com/core/api/Route/render-func)
Inside the render function you get access to the match object. Witch has the path and url so you can filter yourself when to render the navbar. [match](https://reactrouter.com/core/api/match... | Needed to use the match and specify that the Navbar & Footer are not displayed when the path is `/dashboard`.
Works but maybe there is a more elegant solution.
```
return (
<Router>
<Route
path="*"
render={({ match }) => {
if (match.url !== "... |
35,127,787 | I am using an `ArrayAdapter`
```
ArrayAdapter<Product> adapter = new ArrayAdapter<Product>(this,
android.R.layout.simple_list_item_1, items);
listView1.setAdapter(adapter);
```
The problem is when I select first item from `listview` it select another item automatically.
[![enter image description h... | 2016/02/01 | [
"https://Stackoverflow.com/questions/35127787",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4269829/"
] | It is because your adapter reuses the inflated views.
One solution is to override your `ArrayAdapter's` `getView()` method in order to properly render your views and (even better) implement a `ViewHolder` so that your don't loose any performance by inflating again and again! | Try to make this change
```
listView1.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
String item = listView1.getItemAtPosition(position);
... |
35,127,787 | I am using an `ArrayAdapter`
```
ArrayAdapter<Product> adapter = new ArrayAdapter<Product>(this,
android.R.layout.simple_list_item_1, items);
listView1.setAdapter(adapter);
```
The problem is when I select first item from `listview` it select another item automatically.
[![enter image description h... | 2016/02/01 | [
"https://Stackoverflow.com/questions/35127787",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4269829/"
] | In `CustomArrayAdapter` shared at link <http://paste.ubuntu.com/14848762/> , you are changing color of `relativeLayout` on `Click Listener`, when you scroll or view is recycled, you should reset this layout and should enable color for the item you clicked. You can for example use this approach.
```
relativeLayout.setO... | It is because your adapter reuses the inflated views.
One solution is to override your `ArrayAdapter's` `getView()` method in order to properly render your views and (even better) implement a `ViewHolder` so that your don't loose any performance by inflating again and again! |
35,127,787 | I am using an `ArrayAdapter`
```
ArrayAdapter<Product> adapter = new ArrayAdapter<Product>(this,
android.R.layout.simple_list_item_1, items);
listView1.setAdapter(adapter);
```
The problem is when I select first item from `listview` it select another item automatically.
[![enter image description h... | 2016/02/01 | [
"https://Stackoverflow.com/questions/35127787",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4269829/"
] | In `CustomArrayAdapter` shared at link <http://paste.ubuntu.com/14848762/> , you are changing color of `relativeLayout` on `Click Listener`, when you scroll or view is recycled, you should reset this layout and should enable color for the item you clicked. You can for example use this approach.
```
relativeLayout.setO... | Try to make this change
```
listView1.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
String item = listView1.getItemAtPosition(position);
... |
584,377 | I'm using Debian 10.3 + GNOME 3.
When i start my computer i get opened window of MEGAsync program in desktop.
I can close this window by ESCape key. But this will have to do every time the operating system starts. It is not comfortable.
How to configure automatic removal of this window from the desktop, for example,... | 2020/05/04 | [
"https://unix.stackexchange.com/questions/584377",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/410475/"
] | A workaround is to use hwclock from busybox, which does not do the synchronization procedure. | Did you tried :
```
sudo i2cdetect -y 1
```
You should see a wall of text appear, if UU appears instead of 68 then we have successfully loaded in the Kernel driver for our RTC circuit
If your RTC is correct maybe you missed :
```
sudo hwclock -w
```
This command will write the time from the Raspberry Pi to the R... |
62,561,233 | One thing i noticed is if i write
```
Console.WriteLine("The answer to 2+3 is", 2+3)
```
It wont give an error but all it will print is "The answer to 2+3 is" without the answer to the equation outside the quotation marks.
So what even is the point of the comma in Console.WriteLine outside of quotation marks? | 2020/06/24 | [
"https://Stackoverflow.com/questions/62561233",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | My guess is that
```
Console.WriteLine("The answer to 2+3 is", 2+3)
```
Is using the overload that treats the first argument as a format string and the subsequent arguments as a variable-length parameter list to replace into the format string. Because you don't have any elements in the format string into which to re... | There are many overloaded method that accept different parameters. The purpose of the second parameter is to pass an object which could represent a method function such as "Concat" or the format of the string.
if you need to calculate the value your way. you need to add {0}, and then do that operation in the second arg... |
23,763,781 | Is there a way to implement OpenUrl functionality(as in iOS OpenUrl) in android?
for example,
If a user is redirected from a webpage(in a browser) to "`myapp://main`",
android will launch my app. | 2014/05/20 | [
"https://Stackoverflow.com/questions/23763781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1951967/"
] | the answer is just to add this to manifest inside the activity you want to start :
```
<activity
android:name="com.dimrix.something.BootActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
... | That can be done with Intent Filters.
See [Allowing Other Apps to Start Your Activity](http://developer.android.com/training/basics/intents/filters.html) in the Android documentation, or answers to [this question](https://stackoverflow.com/questions/5596261/intent-filter-to-launch-my-activity-when-custom-uri-is-clicke... |
23,763,781 | Is there a way to implement OpenUrl functionality(as in iOS OpenUrl) in android?
for example,
If a user is redirected from a webpage(in a browser) to "`myapp://main`",
android will launch my app. | 2014/05/20 | [
"https://Stackoverflow.com/questions/23763781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1951967/"
] | Define a **[Custom URL Scheme](https://developer.appcelerator.com/question/120393/custom-url-scheme---iphone--android)**, for example to open your SplashScreen Activity when a user type in the browser `myapp://main`
```
<activity
android:name="com.myapp.SplashScreen"
android:exported="true"
android:label="... | That can be done with Intent Filters.
See [Allowing Other Apps to Start Your Activity](http://developer.android.com/training/basics/intents/filters.html) in the Android documentation, or answers to [this question](https://stackoverflow.com/questions/5596261/intent-filter-to-launch-my-activity-when-custom-uri-is-clicke... |
36,606,190 | Hello I'm build a function are printing array with pointers
on c with Visual Studio 2015.
while i run the function this send me this massage:
Run-Time Check Failure #2 - Stack around the variable 'arr' was corrupted.
this the function:
```
void arrprint(int* arr, int size)//printing numbers:
{
size = (int)arr +... | 2016/04/13 | [
"https://Stackoverflow.com/questions/36606190",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5596908/"
] | This line
```
*arr = firstAdress; //for not destroy the array
```
destroys the array. You are writing into the memory when you dereference `arr`.
---
Since in C, everything is passed by value, you do not have to worry about corruption when you change `arr` in the function. So, you do not need `firstAdress`.
```
... | You're trying to use `size` as an `int *`. Use an actual `int *` instead.
Also, by setting `*arr = firstAddress`, what you're really doing is writing the address of the array into the first *element* in the array. Also, since `arr` is a local variable, changes to it don't affect the variable in the calling function.
... |
36,606,190 | Hello I'm build a function are printing array with pointers
on c with Visual Studio 2015.
while i run the function this send me this massage:
Run-Time Check Failure #2 - Stack around the variable 'arr' was corrupted.
this the function:
```
void arrprint(int* arr, int size)//printing numbers:
{
size = (int)arr +... | 2016/04/13 | [
"https://Stackoverflow.com/questions/36606190",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5596908/"
] | This line
```
*arr = firstAdress; //for not destroy the array
```
destroys the array. You are writing into the memory when you dereference `arr`.
---
Since in C, everything is passed by value, you do not have to worry about corruption when you change `arr` in the function. So, you do not need `firstAdress`.
```
... | Personally think the best solution is:
```
void arrprint(int* arr, int size)//printing numbers:
{
int *lastAddress = arr + size
int *firstAddress = arr;
for (firstAddress = arr; firstaddress < lastAddress; firstaddress++)
{
printf("%2d", *firstAddress); //printing
}
printf("\n");
}
... |
32,704 | During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others.
However, my most recent job is at a small company. Currently the company's listing on Glassd... | 2014/08/21 | [
"https://workplace.stackexchange.com/questions/32704",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/8233/"
] | I find Glassdoor to be invaluable in reviewing companies, though not infallible. Your issue is one I've stumbled across a few times where I've worked or contracted with a small company and want to leave a review.
Some points to consider:
* If there's only one review on the site, the odds are no one at the company is ... | Personally I make it a policy to never bad mouth past employers in writing anywhere. I have run into past colleagues at new workplaces many times. It makes no sense to do something that might mean I am unable to get a job at a place I wanted to work at because ten years ago I insulted the person who is now friends with... |
32,704 | During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others.
However, my most recent job is at a small company. Currently the company's listing on Glassd... | 2014/08/21 | [
"https://workplace.stackexchange.com/questions/32704",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/8233/"
] | First of all, I smell its going to be a bad one.
If you are so sure of being identified, and your review may hurt you within the company, I would suggest avoiding that. Anyway, all job seekers don't take reviews to their heart and are not strict believers, it is just taken as a suggestion.
If the review is a positive... | If you are going to stay more in that company, **never ever leave negative feedback**. Full stop. This will only go against you. Even if you are not the **single** employee in that position, reducing the chances to two or three people is too risky.
You might be recognized as the author even in the future. For example ... |
32,704 | During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others.
However, my most recent job is at a small company. Currently the company's listing on Glassd... | 2014/08/21 | [
"https://workplace.stackexchange.com/questions/32704",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/8233/"
] | I find Glassdoor to be invaluable in reviewing companies, though not infallible. Your issue is one I've stumbled across a few times where I've worked or contracted with a small company and want to leave a review.
Some points to consider:
* If there's only one review on the site, the odds are no one at the company is ... | >
> How can I go about leaving an anonymous review (what Glassdoor is
> intended for) when the company is so small that they will know it is
> me?
>
>
>
It's not clear what your motivation for leaving a review might be, and clearly you don't want to leave a positive review, but there are several possibilities he... |
32,704 | During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others.
However, my most recent job is at a small company. Currently the company's listing on Glassd... | 2014/08/21 | [
"https://workplace.stackexchange.com/questions/32704",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/8233/"
] | First of all, I smell its going to be a bad one.
If you are so sure of being identified, and your review may hurt you within the company, I would suggest avoiding that. Anyway, all job seekers don't take reviews to their heart and are not strict believers, it is just taken as a suggestion.
If the review is a positive... | Leaving a review about the company on Glassdoor.com has two purposes:
1. You want your concerns to be addressed, a lot of genuine employers do attend to employees' (ex or current) concerns if any...
2. Your review helps other job seekers get a fair view on choosing this specific employer as a next stop in their career... |
32,704 | During my job search, I found [Glassdoor](http://www.glassdoor.com) to be a very useful tool for getting to know about the companies I was searching for. I'd like to give back to that and submit my own reviews to help others.
However, my most recent job is at a small company. Currently the company's listing on Glassd... | 2014/08/21 | [
"https://workplace.stackexchange.com/questions/32704",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/8233/"
] | >
> How can I go about leaving an anonymous review (what Glassdoor is
> intended for) when the company is so small that they will know it is
> me?
>
>
>
It's not clear what your motivation for leaving a review might be, and clearly you don't want to leave a positive review, but there are several possibilities he... | If you are going to stay more in that company, **never ever leave negative feedback**. Full stop. This will only go against you. Even if you are not the **single** employee in that position, reducing the chances to two or three people is too risky.
You might be recognized as the author even in the future. For example ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.