qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
54,638,383 | I'm a noob in java and right now I'm learning about generics. This code should delete any integer larger than five. I typed [10, 11, 12, 1], in theory, I should only get [3, 4, 6, 1]. But I'm getting [3, 4, 6, **11**, 1], I don't understand why..?
```
public static void main(String args[]) throws IOException{
Buff... | 2019/02/11 | [
"https://Stackoverflow.com/questions/54638383",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9994134/"
] | If you start the check from end of the array, it's working.
```
public static void main(String args[]) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> list = new ArrayList<Integer>();
list.add(3);
list.add(4);
list.add(56);
l... | I imagine that was the exercise to understand how to remove from a list, but otherwise, this is how you could check before adding to it:
```
public static void main(String args[]) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Integer> list = new ... |
48,977,922 | I'm trying to run a random forest on a set of variables. Most of the variables are categorical (factor), and some have a lot of values. My dataset has ~1500 variables, and i'll like to drop those which have >50 categories.
Is it possible to do this in R?
Edit: I've been trying to codify this:
If the variable is fac... | 2018/02/25 | [
"https://Stackoverflow.com/questions/48977922",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4773969/"
] | You can try something using the function `nlevels` to retrieve the number of levels per column. Here's an example using `mtcars` where all columns are converted into factors and where we only keep factors having less than 10 levels.
```
require(dplyr)
df <- as.data.frame(sapply(mtcars, as.factor))
good.columns <- na... | We can use `select_if`
```
library(dplyr)
data(mtcars)
mtcars %>%
mutate_all(factor) %>% # just to change all columns to `factor` for testing
select_if(~nlevels(.) < 10)
``` |
33,767 | The sentence I'm wondering about:
>
> Living in the [S/s]outh during the early 1900’s, the most decisive
> factor of a man’s life was determined at birth: the color of his skin.
>
>
>
Should South be capitalized because it's a noun? | 2011/07/12 | [
"https://english.stackexchange.com/questions/33767",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/3393/"
] | South here is referring to the Southern United States, not merely the cardinal direction, so it should be capitalized. | "South" here is a proper noun, so it needs to be capitalized. Yes, everytime "south" is being used to indicate a place, it needs to be capitalized.
When I say "indicate", I mean used in their name, i.e. South Pole, or The South Country, or South Australia, or just "The South" |
33,767 | The sentence I'm wondering about:
>
> Living in the [S/s]outh during the early 1900’s, the most decisive
> factor of a man’s life was determined at birth: the color of his skin.
>
>
>
Should South be capitalized because it's a noun? | 2011/07/12 | [
"https://english.stackexchange.com/questions/33767",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/3393/"
] | South here is referring to the Southern United States, not merely the cardinal direction, so it should be capitalized. | As the other answers have indicated, it should be *the South*. However, I think it needs to be made clear that the reason is that "the South" is a *proper noun* referring to the southern part of the United States. Most of the time, *south* is used as a common noun and does not need to be capitalized:
>
> I live to **... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | A font has an internal coordinate system, think of it as a unit square, within which a glyph's vector coordinates are specified at whatever arbitrary size accommodates all the glyphs in the font +- any amount of margin the font designer chooses.
At 72.0 points the font's unit square is one inch. Glyph *x* of font *y* ... | I am not sure how `-[NSString sizeWithFont:]` measures the height. Does it use line height or the difference between the peaks of the beziers? What text did you use?
I believe `-[UIFont lineHeight]` would be better to measure the height.
Edit:
Also, note that none of the measurement methods returns the size in pixels... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | I am not sure how `-[NSString sizeWithFont:]` measures the height. Does it use line height or the difference between the peaks of the beziers? What text did you use?
I believe `-[UIFont lineHeight]` would be better to measure the height.
Edit:
Also, note that none of the measurement methods returns the size in pixels... | I first wondered if this had something to do with the way [CSS pixels are defined at 96 per "inch"][1] while UI layout points are defined at 72 per "inch". (Where, of course, an "inch" has nothing to do with a physical inch.) Why would web standards factor into UIKit business? Well, you may note when examining stack tr... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | I am not sure how `-[NSString sizeWithFont:]` measures the height. Does it use line height or the difference between the peaks of the beziers? What text did you use?
I believe `-[UIFont lineHeight]` would be better to measure the height.
Edit:
Also, note that none of the measurement methods returns the size in pixels... | The truth, as far as I have been able to ascertain, is that `UIFont` lies. All of `UIKit` takes liberties with fonts. If you want the truth you need to use `CoreText`, but in a lot of cases it will be slower! (So in the case of your pixel height table I think it was that it adds some sort of a + bx factor where x is po... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | I am not sure how `-[NSString sizeWithFont:]` measures the height. Does it use line height or the difference between the peaks of the beziers? What text did you use?
I believe `-[UIFont lineHeight]` would be better to measure the height.
Edit:
Also, note that none of the measurement methods returns the size in pixels... | I agree this is very confusing. I'm trying to give you some basic explanation here to make the things clearer.
First, the DPI (dot-per-inch) thing comes from printing, on physical papers. So does font. The unit point was invented to discribe physical printing size of text, just because inch is too large for usual text... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | A font has an internal coordinate system, think of it as a unit square, within which a glyph's vector coordinates are specified at whatever arbitrary size accommodates all the glyphs in the font +- any amount of margin the font designer chooses.
At 72.0 points the font's unit square is one inch. Glyph *x* of font *y* ... | I first wondered if this had something to do with the way [CSS pixels are defined at 96 per "inch"][1] while UI layout points are defined at 72 per "inch". (Where, of course, an "inch" has nothing to do with a physical inch.) Why would web standards factor into UIKit business? Well, you may note when examining stack tr... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | A font has an internal coordinate system, think of it as a unit square, within which a glyph's vector coordinates are specified at whatever arbitrary size accommodates all the glyphs in the font +- any amount of margin the font designer chooses.
At 72.0 points the font's unit square is one inch. Glyph *x* of font *y* ... | The truth, as far as I have been able to ascertain, is that `UIFont` lies. All of `UIKit` takes liberties with fonts. If you want the truth you need to use `CoreText`, but in a lot of cases it will be slower! (So in the case of your pixel height table I think it was that it adds some sort of a + bx factor where x is po... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | A font has an internal coordinate system, think of it as a unit square, within which a glyph's vector coordinates are specified at whatever arbitrary size accommodates all the glyphs in the font +- any amount of margin the font designer chooses.
At 72.0 points the font's unit square is one inch. Glyph *x* of font *y* ... | I agree this is very confusing. I'm trying to give you some basic explanation here to make the things clearer.
First, the DPI (dot-per-inch) thing comes from printing, on physical papers. So does font. The unit point was invented to discribe physical printing size of text, just because inch is too large for usual text... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | I first wondered if this had something to do with the way [CSS pixels are defined at 96 per "inch"][1] while UI layout points are defined at 72 per "inch". (Where, of course, an "inch" has nothing to do with a physical inch.) Why would web standards factor into UIKit business? Well, you may note when examining stack tr... | The truth, as far as I have been able to ascertain, is that `UIFont` lies. All of `UIKit` takes liberties with fonts. If you want the truth you need to use `CoreText`, but in a lot of cases it will be slower! (So in the case of your pixel height table I think it was that it adds some sort of a + bx factor where x is po... |
11,776,776 | I have followed [these](https://www.windowsazure.com/en-us/develop/nodejs/how-to-guides/command-line-tools/) instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe t... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117839/"
] | I agree this is very confusing. I'm trying to give you some basic explanation here to make the things clearer.
First, the DPI (dot-per-inch) thing comes from printing, on physical papers. So does font. The unit point was invented to discribe physical printing size of text, just because inch is too large for usual text... | The truth, as far as I have been able to ascertain, is that `UIFont` lies. All of `UIKit` takes liberties with fonts. If you want the truth you need to use `CoreText`, but in a lot of cases it will be slower! (So in the case of your pixel height table I think it was that it adds some sort of a + bx factor where x is po... |
32,593 | My function calculates days elapsed from the current date. Input is fixed. I will get vector.
Please comment on this.
```
static bool daysElapsed(const std::vector<char>& vec,int& val)
{
std::string str(vec.begin(),vec.end());
char *pos;// whose value is set by the function to the next character in str... | 2013/10/12 | [
"https://codereview.stackexchange.com/questions/32593",
"https://codereview.stackexchange.com",
"https://codereview.stackexchange.com/users/30686/"
] | It's weird to take a `std::vector<char>` instead of a `std::string`. If you must take a `std::vector<char>`, then make two overloaded versions of the function, where the vector variant calls the string variant.
You never use the `val` parameter. You probably meant to use it to return the computed result? However, the ... | There is a serious bug in my code:
The function fails if the year is before 1970. `mktime` handles dates in any timezone from midnight, January 1, 1970, to January 18, 19:14:07, 2038.
See [MSDN](http://msdn.microsoft.com/en-us/library/aa246472%28v=vs.60%29.aspx) |
284 | Sometimes I have to open files (doc, zip, txt, pdf and some other) downloaded from the Internet (from unproven sites) on my computer.
How could I mitigate the risk and open them in a more or less secure way?
What types of files are more insecure than the other? | 2010/11/13 | [
"https://security.stackexchange.com/questions/284",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/3/"
] | What I can suggest:
* open files inside VM's if it is possible, or, as @Henri said, use sandbox;
* run AV software, at least it adds some security level;
* you can use online AV scanner solutions like virustotal.com;
* never trust any file from any source - friends can also be compromised, they can spread malware with... | The best way to open such files is by running them inside a sandbox. I would suggest a virtual machine.
Regarding which kind of files are safe, one can make two distinctions. In practice, files like zip, txt, jpg, png, etc are safe. Files like .exe, .msi, .com, .bat, .vbs, etc etc are unsafe. *However*, there is one b... |
284 | Sometimes I have to open files (doc, zip, txt, pdf and some other) downloaded from the Internet (from unproven sites) on my computer.
How could I mitigate the risk and open them in a more or less secure way?
What types of files are more insecure than the other? | 2010/11/13 | [
"https://security.stackexchange.com/questions/284",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/3/"
] | The best way to open such files is by running them inside a sandbox. I would suggest a virtual machine.
Regarding which kind of files are safe, one can make two distinctions. In practice, files like zip, txt, jpg, png, etc are safe. Files like .exe, .msi, .com, .bat, .vbs, etc etc are unsafe. *However*, there is one b... | [Sandboxie](http://www.sandboxie.com/) is what you are looking for (if you have windows). It's also free. |
284 | Sometimes I have to open files (doc, zip, txt, pdf and some other) downloaded from the Internet (from unproven sites) on my computer.
How could I mitigate the risk and open them in a more or less secure way?
What types of files are more insecure than the other? | 2010/11/13 | [
"https://security.stackexchange.com/questions/284",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/3/"
] | What I can suggest:
* open files inside VM's if it is possible, or, as @Henri said, use sandbox;
* run AV software, at least it adds some security level;
* you can use online AV scanner solutions like virustotal.com;
* never trust any file from any source - friends can also be compromised, they can spread malware with... | [Sandboxie](http://www.sandboxie.com/) is what you are looking for (if you have windows). It's also free. |
2,130,124 | there are 11 sweets in a box
four are soft centred and seven hard centred sweets
two sweets are selected at random
a)calculate the probability that both sweets are hard centred,
b) one sweet is soft centred and one sweet is hard centred
this what I done
a) both sweets are hard centred is 4/11 \* 7/11=28/121
is this... | 2017/02/05 | [
"https://math.stackexchange.com/questions/2130124",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/401741/"
] | Assume $d$ is a metric on the set $M = \{a, b\}$ where $a \neq b$ and let $\delta = d(a, b)$. Then $\delta \neq 0$ because otherwise $a = b$. The set $U = \{x \in M \mid d(x, a) < \delta\}$ is then open by definition of the topology on a metric space. But $U = \{a\}$ is not open in the topology described in the questio... | Any topology arising from a metric is Hausdorff. But with $\{\emptyset,M\} $ you cannot separate $a $ and $b $. |
60,299,899 | I'm trying to write a python script to get a count of some tables for monitoring which looks a bit like the code below. I'm trying to get an output such as below and have tried using python multi-dimensional arrays but not having any luck.
**Expected Output**:
```
('oltptransactions:', [(12L,)])
('oltpcases:', [(24L... | 2020/02/19 | [
"https://Stackoverflow.com/questions/60299899",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6827913/"
] | I am a bit reluctant to show this way, because best practices recommend to never build a dynamic SQL string but always use a constant string and parameters, but this is one use case where computing the string is legit:
* a table name cannot be a parameter in SQL
* the input only comes from the program itself and is fu... | I believe something as below, Unable to test code because of certificate issue.
```
sql = """SELECT 'oltptransactions', COUNT(id) FROM appuser.oltptransactions"""
sql2 = """SELECT 'oltpcases', COUNT(id) FROM appuser.oltpcases"""
sqls = [sql,sql2]
for i in sqls:
cursor.execute(i)
for name, count in cursor:
... |
40,090,997 | I have found this to be a bug, however, I need to remove the warnings
[SSIS.Pipeline] Warning: The output column "x" on output "y" and component "z" is not subsequently used in the Data Flow task.
How do I accomplish this ?
Thanks | 2016/10/17 | [
"https://Stackoverflow.com/questions/40090997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5372605/"
] | For an background image to show on pseudo-elements like ::after and ::before you should include `content: '';` on them.
I've fixed (you were trying to target ids with class selectors) and added the mentioned background image on on [this fiddle](https://jsfiddle.net/lucaslazaro/eq9qd46s/1/). But it goes like this:
```... | There are several ways to place an image to the right of a div. You should consider displaying the image with an image tag as follows:
Also, in your html you define ids, then in css you need to use `#` isntead of `.`. Check [Difference between id and class in CSS and when to use it](https://stackoverflow.com/questions... |
40,090,997 | I have found this to be a bug, however, I need to remove the warnings
[SSIS.Pipeline] Warning: The output column "x" on output "y" and component "z" is not subsequently used in the Data Flow task.
How do I accomplish this ?
Thanks | 2016/10/17 | [
"https://Stackoverflow.com/questions/40090997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5372605/"
] | For an background image to show on pseudo-elements like ::after and ::before you should include `content: '';` on them.
I've fixed (you were trying to target ids with class selectors) and added the mentioned background image on on [this fiddle](https://jsfiddle.net/lucaslazaro/eq9qd46s/1/). But it goes like this:
```... | This is a test of :before and :after, with which you can place text or an image before and after each HTML element.
```
p.test:before {
padding-right: 5px;
content: url(/pix/logo_ppk.gif);
}
p.test:after {
font-style: italic;
content: " and some text after.";
}
``` |
40,090,997 | I have found this to be a bug, however, I need to remove the warnings
[SSIS.Pipeline] Warning: The output column "x" on output "y" and component "z" is not subsequently used in the Data Flow task.
How do I accomplish this ?
Thanks | 2016/10/17 | [
"https://Stackoverflow.com/questions/40090997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5372605/"
] | There are several ways to place an image to the right of a div. You should consider displaying the image with an image tag as follows:
Also, in your html you define ids, then in css you need to use `#` isntead of `.`. Check [Difference between id and class in CSS and when to use it](https://stackoverflow.com/questions... | This is a test of :before and :after, with which you can place text or an image before and after each HTML element.
```
p.test:before {
padding-right: 5px;
content: url(/pix/logo_ppk.gif);
}
p.test:after {
font-style: italic;
content: " and some text after.";
}
``` |
50,707,226 | Hi I currently have numbers pulled from the Value tab in an Excel file. But I would like to pull it from Tab2, if Tab2 exist in that file. could somewhere suggest how to do something like if Tab2 exist, use Tab2 first, otherwise use the Value tab?
```
Workbooks(wkbk_value).Sheets("Value").Select
amount= WorksheetFunct... | 2018/06/05 | [
"https://Stackoverflow.com/questions/50707226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9453581/"
] | As described in this issue on Github <https://github.com/aspnet/SignalR/issues/2424>
Hubs are short lived by design and are disposed after every invocation.
The only way I found to access your Clients outside of the current request Scope on your Hub is by injecting the HubContext into a seperate Class.
In your case a... | The answer is implictly given by this issue on github <https://github.com/aspnet/Docs/issues/6888>. It was an "issue" in the documentation, so what I tried to do is for sure not possible (it does not mention how to do it however).
It seems the hub class instance in a whole only lives when a call has been made, and as... |
50,707,226 | Hi I currently have numbers pulled from the Value tab in an Excel file. But I would like to pull it from Tab2, if Tab2 exist in that file. could somewhere suggest how to do something like if Tab2 exist, use Tab2 first, otherwise use the Value tab?
```
Workbooks(wkbk_value).Sheets("Value").Select
amount= WorksheetFunct... | 2018/06/05 | [
"https://Stackoverflow.com/questions/50707226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9453581/"
] | This simple solution works for me. I haven't added anything extra to the start up class.
**EDIT
After some thought I decided that although this code works, it isn't a good pattern, not least because the static code ends up trying to use fields within a disposed object. A hub is a lightweight, short-lived container and... | The answer is implictly given by this issue on github <https://github.com/aspnet/Docs/issues/6888>. It was an "issue" in the documentation, so what I tried to do is for sure not possible (it does not mention how to do it however).
It seems the hub class instance in a whole only lives when a call has been made, and as... |
50,707,226 | Hi I currently have numbers pulled from the Value tab in an Excel file. But I would like to pull it from Tab2, if Tab2 exist in that file. could somewhere suggest how to do something like if Tab2 exist, use Tab2 first, otherwise use the Value tab?
```
Workbooks(wkbk_value).Sheets("Value").Select
amount= WorksheetFunct... | 2018/06/05 | [
"https://Stackoverflow.com/questions/50707226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9453581/"
] | As described in this issue on Github <https://github.com/aspnet/SignalR/issues/2424>
Hubs are short lived by design and are disposed after every invocation.
The only way I found to access your Clients outside of the current request Scope on your Hub is by injecting the HubContext into a seperate Class.
In your case a... | I was facing the same issue a while ago. I though too that the hub was the place to call when you c# backend needs to push a message, but actually this is not the case. The hub is more like a mounting point. Your c# backend should have its own client which connects to the hub as well. So your hub looks like this:
```
... |
50,707,226 | Hi I currently have numbers pulled from the Value tab in an Excel file. But I would like to pull it from Tab2, if Tab2 exist in that file. could somewhere suggest how to do something like if Tab2 exist, use Tab2 first, otherwise use the Value tab?
```
Workbooks(wkbk_value).Sheets("Value").Select
amount= WorksheetFunct... | 2018/06/05 | [
"https://Stackoverflow.com/questions/50707226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9453581/"
] | This simple solution works for me. I haven't added anything extra to the start up class.
**EDIT
After some thought I decided that although this code works, it isn't a good pattern, not least because the static code ends up trying to use fields within a disposed object. A hub is a lightweight, short-lived container and... | I was facing the same issue a while ago. I though too that the hub was the place to call when you c# backend needs to push a message, but actually this is not the case. The hub is more like a mounting point. Your c# backend should have its own client which connects to the hub as well. So your hub looks like this:
```
... |
8,533,031 | I have two DB tables `Table1` and `Table2`
I am displaying the data of `Table1` using a `gridview`. I want to show the data of `table2` in another `gridview` when a user clicks on a row on `gridview1` i.e I want to change the data in `gridview2` when the user clicks on a row on `gridview1` . Both the tables are relate... | 2011/12/16 | [
"https://Stackoverflow.com/questions/8533031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1067049/"
] | This is maybe not the most elegant solution and I'd be happy to find out about better approaches, but it works and what it does is clear.
In the getopts part you parse the command line options and assign them to variables. In the second part you control the cli option dependencies and you can directly execute the acti... | Simple solution: use different letters for development/production flags (e.g. capital D and P).
Complex solution: under `p)`, check whether the environment has been decided. If so, use the second meaning. If not, set environment to production. |
18,233,712 | I'm trying to delete records for a type I'm storing in my Sqlite database. It's failing with the following message:
```
"Cannot store type: MyNamespace.PanelLog"
```
I have the following method to delete records:
```
public static int DeletePanelLog(int id)
{
return me.db.DeleteItem<PanelLog>(id);
... | 2013/08/14 | [
"https://Stackoverflow.com/questions/18233712",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/181771/"
] | I also encountered this problem. Actually it comes from the line inside the definition of DeleteItem:
```
return Delete<T> (new T () { ID = id });
```
It should be:
```
return Delete<T> (id);
``` | Rather than use:
```
public int DeleteItem<T>(int id) where T : IBusinessEntity, new()
{
lock (locker) {
#if NETFX_CORE
return Delete(new T() { ID = id });
#else
return Delete<T> (new T () { ID = id });
#endif
}
}
```
Use this instead:
```
public int... |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | I'd use the `Executor` from the concurrency package. I believe it handles all this for you. | >
> does it really make sense to instantiate 1,0000 new instances of the Worker class every second.
>
>
>
Not necessarily however you are going to have to be putting the `Runnable`s into some sort of `BlockingQueue` to be able to be reused and the cost of the queue concurrency may outweigh the GC overhead. Using ... |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | I'd use the `Executor` from the concurrency package. I believe it handles all this for you. | I see two questions in your problem. One is about thread pooling, and another is about object pooling. For your thread pooling issue, Java has provided an [ExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html) . Below is an example of using an ExecutorService.
```
Runnabl... |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | I use a library I wrote called Java Chronicle for this. It is designed to persist and queue one million quotes per second without producing any significant garbage.
I have a demo [here](https://github.com/OpenHFT/Java-Chronicle/tree/master/chronicle-demo) where it sends quote like objects with nano second timing info... | I'd use the `Executor` from the concurrency package. I believe it handles all this for you. |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | I'd use the `Executor` from the concurrency package. I believe it handles all this for you. | Yes of course, something like [this](http://arashmd.blogspot.com/2013/06/java-threading.html#trpool), because OS and JVM don't care about what is going on a thread, so generally this is a good practice to reuse a recyclable object. |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | >
> does it really make sense to instantiate 1,0000 new instances of the Worker class every second.
>
>
>
Not necessarily however you are going to have to be putting the `Runnable`s into some sort of `BlockingQueue` to be able to be reused and the cost of the queue concurrency may outweigh the GC overhead. Using ... | I see two questions in your problem. One is about thread pooling, and another is about object pooling. For your thread pooling issue, Java has provided an [ExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html) . Below is an example of using an ExecutorService.
```
Runnabl... |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | I use a library I wrote called Java Chronicle for this. It is designed to persist and queue one million quotes per second without producing any significant garbage.
I have a demo [here](https://github.com/OpenHFT/Java-Chronicle/tree/master/chronicle-demo) where it sends quote like objects with nano second timing info... | >
> does it really make sense to instantiate 1,0000 new instances of the Worker class every second.
>
>
>
Not necessarily however you are going to have to be putting the `Runnable`s into some sort of `BlockingQueue` to be able to be reused and the cost of the queue concurrency may outweigh the GC overhead. Using ... |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | I use a library I wrote called Java Chronicle for this. It is designed to persist and queue one million quotes per second without producing any significant garbage.
I have a demo [here](https://github.com/OpenHFT/Java-Chronicle/tree/master/chronicle-demo) where it sends quote like objects with nano second timing info... | I see two questions in your problem. One is about thread pooling, and another is about object pooling. For your thread pooling issue, Java has provided an [ExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html) . Below is an example of using an ExecutorService.
```
Runnabl... |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | Yes of course, something like [this](http://arashmd.blogspot.com/2013/06/java-threading.html#trpool), because OS and JVM don't care about what is going on a thread, so generally this is a good practice to reuse a recyclable object. | I see two questions in your problem. One is about thread pooling, and another is about object pooling. For your thread pooling issue, Java has provided an [ExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html) . Below is an example of using an ExecutorService.
```
Runnabl... |
19,121,856 | I'm implementing a thread pool for processing a high volume market data feed and have a question about the strategy of reusing my worker instances that implement runnable which are submitted to the thread pool for execution. In my case I only have one type of worker that takes a String and parses it to create a Quote o... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19121856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411459/"
] | I use a library I wrote called Java Chronicle for this. It is designed to persist and queue one million quotes per second without producing any significant garbage.
I have a demo [here](https://github.com/OpenHFT/Java-Chronicle/tree/master/chronicle-demo) where it sends quote like objects with nano second timing info... | Yes of course, something like [this](http://arashmd.blogspot.com/2013/06/java-threading.html#trpool), because OS and JVM don't care about what is going on a thread, so generally this is a good practice to reuse a recyclable object. |
52,927,586 | I was wondering how can I start, join and detach threads in JS.
I saw information about Service Workers, which are meant to run as separate processes in the background, not exactly what I'm looking for. Is there something else? How can I use it? | 2018/10/22 | [
"https://Stackoverflow.com/questions/52927586",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You probably don't want [*service* workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API), but rather web workers ([spec](https://www.w3.org/TR/workers/) | [MDN article](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)) on browsers or [worker threads](https://no... | JavaScript in the main window runs on a single thread, it can run asynchronous functions that will turn to progress in the same thread. See:
* JS Concurrency model: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop>
* JS Async function: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referenc... |
35,359,018 | Giving
```
<div class="alert_right">
<p>welcome!<script>setTimeout("window.location.href ='index.php';", 1000);</script></p></div>
```
How to get the **welcome!** text using Jsoup? | 2016/02/12 | [
"https://Stackoverflow.com/questions/35359018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5307644/"
] | If your `HTML` is in a `String`, you can use the following code:
```
Document doc = Jsoup.parse(HTML);
Elements div = doc.select(".alert_right > p:nth-child(1)");
String s = div.text();
```
Now `s` is welcome! | Following is the another way to get **welcome!** text.
```
StringBuffer myHTML = new StringBuffer();
myHTML.append("<div class=\"alert_right\"><p>welcome!" +
"<script>setTimeout(\"window.location.href =\'index.php\';\", 1000);</script>" +
"</p></div>");
Document myDoc = Jsoup.parse(myHTML.toSt... |
1,098,791 | I'm trying to map the output of a stored procedure to an object in my project using nHibernate.
The object is delcared like this:
```
public class NewContentSearchResult
{
public string Name { get; set; }
public string ContentType { get; set; }
public int Count { get; set; }
public int CMIId { get; se... | 2009/07/08 | [
"https://Stackoverflow.com/questions/1098791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23902/"
] | Ok, further research has convinced me that it's not possible to have composite ids in nHibernate when you use a stored procedure.
To that end, I modified my SQL to include rownumber() and I'm using that as an id. I can only do this because it's read-only, with no writing to the db, but it works for my purpose. | In the past when I've used a composite-key I've always had to create a separate class for that ID with the properties of the class matching the separate keys for the composite. Have you tried this? |
1,098,791 | I'm trying to map the output of a stored procedure to an object in my project using nHibernate.
The object is delcared like this:
```
public class NewContentSearchResult
{
public string Name { get; set; }
public string ContentType { get; set; }
public int Count { get; set; }
public int CMIId { get; se... | 2009/07/08 | [
"https://Stackoverflow.com/questions/1098791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23902/"
] | In the past when I've used a composite-key I've always had to create a separate class for that ID with the properties of the class matching the separate keys for the composite. Have you tried this? | A bit late in the day, but I can second Mark Struzinski - this is possible.
I ran into this problem recently and solved it by using a separate class for the composite key and using elements within the mapping as follows.
```
<sql-query name="spWebGetNewContentBySalesRole" >
<return class="NewContentSearchResult">... |
1,098,791 | I'm trying to map the output of a stored procedure to an object in my project using nHibernate.
The object is delcared like this:
```
public class NewContentSearchResult
{
public string Name { get; set; }
public string ContentType { get; set; }
public int Count { get; set; }
public int CMIId { get; se... | 2009/07/08 | [
"https://Stackoverflow.com/questions/1098791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23902/"
] | Ok, further research has convinced me that it's not possible to have composite ids in nHibernate when you use a stored procedure.
To that end, I modified my SQL to include rownumber() and I'm using that as an id. I can only do this because it's read-only, with no writing to the db, but it works for my purpose. | A bit late in the day, but I can second Mark Struzinski - this is possible.
I ran into this problem recently and solved it by using a separate class for the composite key and using elements within the mapping as follows.
```
<sql-query name="spWebGetNewContentBySalesRole" >
<return class="NewContentSearchResult">... |
1,098,791 | I'm trying to map the output of a stored procedure to an object in my project using nHibernate.
The object is delcared like this:
```
public class NewContentSearchResult
{
public string Name { get; set; }
public string ContentType { get; set; }
public int Count { get; set; }
public int CMIId { get; se... | 2009/07/08 | [
"https://Stackoverflow.com/questions/1098791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23902/"
] | Ok, further research has convinced me that it's not possible to have composite ids in nHibernate when you use a stored procedure.
To that end, I modified my SQL to include rownumber() and I'm using that as an id. I can only do this because it's read-only, with no writing to the db, but it works for my purpose. | As mentioned in the accepted answer, I ended up using a unique row number hack in Oracle by using the ROWNUM function. Later, I ran into a problem when reusing the query with different parameters. Seems that nHibernate remembered the ids and wanted to associate them with newly returned results, thus bringing back incor... |
1,098,791 | I'm trying to map the output of a stored procedure to an object in my project using nHibernate.
The object is delcared like this:
```
public class NewContentSearchResult
{
public string Name { get; set; }
public string ContentType { get; set; }
public int Count { get; set; }
public int CMIId { get; se... | 2009/07/08 | [
"https://Stackoverflow.com/questions/1098791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23902/"
] | As mentioned in the accepted answer, I ended up using a unique row number hack in Oracle by using the ROWNUM function. Later, I ran into a problem when reusing the query with different parameters. Seems that nHibernate remembered the ids and wanted to associate them with newly returned results, thus bringing back incor... | A bit late in the day, but I can second Mark Struzinski - this is possible.
I ran into this problem recently and solved it by using a separate class for the composite key and using elements within the mapping as follows.
```
<sql-query name="spWebGetNewContentBySalesRole" >
<return class="NewContentSearchResult">... |
15,274,077 | I'm having some trouble when putting a very simple c++ program to listen to a given port. Mainly, I have problems when creating a basic\_resolver\_query. If I do it like this:
```
boost::asio::ip::tcp::resolver::query query( "0.0.0.0", "5938" );
```
i works flawlessly. But obviously I don't want to hardcode the port... | 2013/03/07 | [
"https://Stackoverflow.com/questions/15274077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/462087/"
] | As best as I can tell, `boost::asio::ip::basic_resolver_query` has been constructable with two `std::string` arguments since Boost.Asio was introduced. Here is the overloaded constructor documentation in [1.35](http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_qu... | The following works for me:
```
std::string host = "192.168.1.1", port = "1234";
tcp::resolver::query query(tcp::v4(), host, port);
``` |
15,274,077 | I'm having some trouble when putting a very simple c++ program to listen to a given port. Mainly, I have problems when creating a basic\_resolver\_query. If I do it like this:
```
boost::asio::ip::tcp::resolver::query query( "0.0.0.0", "5938" );
```
i works flawlessly. But obviously I don't want to hardcode the port... | 2013/03/07 | [
"https://Stackoverflow.com/questions/15274077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/462087/"
] | The following works for me:
```
std::string host = "192.168.1.1", port = "1234";
tcp::resolver::query query(tcp::v4(), host, port);
``` | I also had some problems when trying to use an IP address instead of a URL. Discovered the technique of creating an endpoint and using it in the connect method on the next\_layer object off of the socket object works for me:
```
const boost::asio::ip::address IP(boost::asio::ip::address::from_string(serverPath));
int ... |
15,274,077 | I'm having some trouble when putting a very simple c++ program to listen to a given port. Mainly, I have problems when creating a basic\_resolver\_query. If I do it like this:
```
boost::asio::ip::tcp::resolver::query query( "0.0.0.0", "5938" );
```
i works flawlessly. But obviously I don't want to hardcode the port... | 2013/03/07 | [
"https://Stackoverflow.com/questions/15274077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/462087/"
] | As best as I can tell, `boost::asio::ip::basic_resolver_query` has been constructable with two `std::string` arguments since Boost.Asio was introduced. Here is the overloaded constructor documentation in [1.35](http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/ip__basic_resolver_query/basic_resolver_qu... | I also had some problems when trying to use an IP address instead of a URL. Discovered the technique of creating an endpoint and using it in the connect method on the next\_layer object off of the socket object works for me:
```
const boost::asio::ip::address IP(boost::asio::ip::address::from_string(serverPath));
int ... |
71,626,522 | I want to execute the following two updates in single update query.
```js
// delete the user with (requestID) from friends
await User.updateOne({
_id: id,
}, {
$pull: { friends: requestID }
})
// delete the user with (id) from friends
await User.updateOne({
_id: requestID,
}, {
$pull: { friends: id }
... | 2022/03/26 | [
"https://Stackoverflow.com/questions/71626522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18586813/"
] | `Nil` does not represent a missing value or `null`, it is a value that represents an empty list. It can equivalently be expressed `List()`. `List(Nil)` is a list that contains an empty list. | ```
val x = List()
val y = Nil
println(x == y) //true
```
In some cases, you must write the type (e.g., Nil: List[Int]) when writing Nil. |
4,471,966 | I need to prove that the initial value problem $x'(t) = Ax(t)+b(t), \,x(0) = x\_0 \in \mathbb{R^n}$ can be solved by the following solution $$x(t) = \exp(At)x\_0 + \int\_0^t\exp((t-s)A)b(s)ds,$$ where $A: \mathbb{R} \rightarrow \mathbb{R^{n\times n}}, b: \mathbb{R} \rightarrow \mathbb{R^n}$ are differentiable and $b$ i... | 2022/06/13 | [
"https://math.stackexchange.com/questions/4471966",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/996159/"
] | Consider the new vector
$\mathbf{z}(t)
= \exp[-t\mathbf{A}]\mathbf{x}(t)$.
It holds using product rule
\begin{eqnarray\*}
\dot{\mathbf{z}}(t)
&=&
\exp[-t\mathbf{A}] \dot{\mathbf{x}}(t)
-\mathbf{A}\exp[-t\mathbf{A}]\mathbf{x}(t) \\
&=&
\exp[-t\mathbf{A}]
\left[
\mathbf{A}\mathbf{x}(t)+\mathbf{b}(t)
\right]
-\exp[-t\mat... | By linearity (the "superposition principle"), we can assume that $x\_0 = 0$, so we want to solve
$$x'(t) - Ax(t) = b(t), x(0) = 0.$$
We already know that the solution to the homogenous problem
$$x'(t) - Ax(t) = 0, x(0) = x\_0$$
is $x(t) = e^{tA}x\_0$. Now for each $s \in \mathbb{R}$, let $x(t; s)$ be the solution to
$$... |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | Adding reference to:
```
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey1.version}</version>
</dependency>
```
As long as adding **clientConfig.getFeatures().put(JSONConfiguration.FEATURE\_POJO\_MAPPING, true);** on client creation solved the issue fo... | This can also happen if you've recently upgraded Ant. I was using Ant 1.8.4 on a project, and upgraded Ant to 1.9.4, and started to get this error when building a fat jar using Ant.
The solution for me was to downgrade back to Ant 1.8.4 for the command line and Eclipse [using the process detailed here](https://stackov... |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | You need to specify the `@Provider` that `@Produces(MediaType.APPLICATION_XML)` from B.class
An add the package of your `MessageBodyWriter<B.class>` to your `/WEB_INF/web.xml` as:
```
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>
your.providers.package
</param-value>
<... | You have to do two things to remove this error.
1. The `@xmlElement` mapping in the model
2. The client side:
`response = resource.type(MediaType.APPLICATION_XML).put(ClientResponse.class, b1); //consume`
or
`response = resource.accept(MediaType.APPLICATION_XML).put(ClientResponse.class, b1); //produce` |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | You need to specify the `@Provider` that `@Produces(MediaType.APPLICATION_XML)` from B.class
An add the package of your `MessageBodyWriter<B.class>` to your `/WEB_INF/web.xml` as:
```
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>
your.providers.package
</param-value>
<... | This can also happen if you've recently upgraded Ant. I was using Ant 1.8.4 on a project, and upgraded Ant to 1.9.4, and started to get this error when building a fat jar using Ant.
The solution for me was to downgrade back to Ant 1.8.4 for the command line and Eclipse [using the process detailed here](https://stackov... |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | In your client code you are not specifying the content type of the data you are sending - so Jersey is not able to locate the right MessageBodyWritter to serialize the b1 object.
Modify the last line of your main method as follows:
```
ClientResponse response = resource.type(MediaType.APPLICATION_XML).put(ClientRespo... | This can also happen if you've recently upgraded Ant. I was using Ant 1.8.4 on a project, and upgraded Ant to 1.9.4, and started to get this error when building a fat jar using Ant.
The solution for me was to downgrade back to Ant 1.8.4 for the command line and Eclipse [using the process detailed here](https://stackov... |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | Include this dependencies in your POM.xml and run Maven -> Update
```
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.18.1</version>
</dependency>
<dependency>
<groupId>com.owlike</groupId>
<artifactId>genson</artifactId>
<version>0.99</version>
</dep... | Adding reference to:
```
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey1.version}</version>
</dependency>
```
As long as adding **clientConfig.getFeatures().put(JSONConfiguration.FEATURE\_POJO\_MAPPING, true);** on client creation solved the issue fo... |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | Include this dependencies in your POM.xml and run Maven -> Update
```
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.18.1</version>
</dependency>
<dependency>
<groupId>com.owlike</groupId>
<artifactId>genson</artifactId>
<version>0.99</version>
</dep... | Make sure that all these libs are in your class path:
```
compile(group: 'com.sun.jersey', name: 'jersey-core', version: '1.19.4')
compile(group: 'com.sun.jersey', name: 'jersey-server', version: '1.19.4')
compile(group: 'com.sun.jersey', name: 'jersey-servlet', version: '1.19.4')
compile(group: 'com... |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | Adding reference to:
```
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey1.version}</version>
</dependency>
```
As long as adding **clientConfig.getFeatures().put(JSONConfiguration.FEATURE\_POJO\_MAPPING, true);** on client creation solved the issue fo... | This also happens if you're missing an empty public constructor for the Entity (could be for JSON, XML etc).. |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | You need to specify the `@Provider` that `@Produces(MediaType.APPLICATION_XML)` from B.class
An add the package of your `MessageBodyWriter<B.class>` to your `/WEB_INF/web.xml` as:
```
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>
your.providers.package
</param-value>
<... | Make sure that all these libs are in your class path:
```
compile(group: 'com.sun.jersey', name: 'jersey-core', version: '1.19.4')
compile(group: 'com.sun.jersey', name: 'jersey-server', version: '1.19.4')
compile(group: 'com.sun.jersey', name: 'jersey-servlet', version: '1.19.4')
compile(group: 'com... |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | You need to specify the `@Provider` that `@Produces(MediaType.APPLICATION_XML)` from B.class
An add the package of your `MessageBodyWriter<B.class>` to your `/WEB_INF/web.xml` as:
```
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>
your.providers.package
</param-value>
<... | i was facing the same problem for a get method i was returning an "int" for the @get method Strangely when i change the return type to String the error was gone.Give it a try and if someone knows the logic behind it kindly share it |
7,832,760 | I am new at RESTful webservices and was trying to update my `@OneToMany` relationship from a standalone client application, but I am not able to do that. I am using the Jersey implementation of JAX-RS that ships with Glassfish 3.1.1.
I have a class `A` that has a `@OneToMany` relationship with class `B`.
`MyRestClie... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7832760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/411449/"
] | You need to specify the `@Provider` that `@Produces(MediaType.APPLICATION_XML)` from B.class
An add the package of your `MessageBodyWriter<B.class>` to your `/WEB_INF/web.xml` as:
```
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>
your.providers.package
</param-value>
<... | Adding reference to:
```
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey1.version}</version>
</dependency>
```
As long as adding **clientConfig.getFeatures().put(JSONConfiguration.FEATURE\_POJO\_MAPPING, true);** on client creation solved the issue fo... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | Thanks for all the help guys - I have managed to solve this issue on both localhost and deployed to a live server.
Here is my now working connect code:
```
var MONGO = {
username: "username",
password: "pa55W0rd!",
server: '******.mongolab.com',
port: '*****',
db: 'dbname',
connectionString: f... | Enable the `auto_reconnect` [`Server`](http://mongodb.github.com/node-mongodb-native/api-generated/server.html?highlight=server#server) option like this:
```
var db = mongoose.connect(mongoConnect, {server: {auto_reconnect: true}});
```
The connection you're opening here is actually a pool of 5 connections (by defau... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | **UPDATE**: Our support article for this topic (essentially a copy of this post) has moved to [our connection troubleshooting doc](http://docs.mongolab.com/connecting/#known-issues).
There is a known issue that the Azure IaaS network enforces an idle timeout of roughly thirteen minutes (empirically arrived at). We are... | Enable the `auto_reconnect` [`Server`](http://mongodb.github.com/node-mongodb-native/api-generated/server.html?highlight=server#server) option like this:
```
var db = mongoose.connect(mongoConnect, {server: {auto_reconnect: true}});
```
The connection you're opening here is actually a pool of 5 connections (by defau... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | Enable the `auto_reconnect` [`Server`](http://mongodb.github.com/node-mongodb-native/api-generated/server.html?highlight=server#server) option like this:
```
var db = mongoose.connect(mongoConnect, {server: {auto_reconnect: true}});
```
The connection you're opening here is actually a pool of 5 connections (by defau... | I had a similar problem being [disconnected from MongoDB periodically](https://stackoverflow.com/q/14301725/266536). Doing two things fixed it:
1. Make sure your computer never sleeps (that'll kill your network connection).
2. Bypass your router/firewall (or configure it properly, which I haven't figured out how to do... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | A couple of recommendations for people still having this issue:
1. Make sure you are using the latest mongodb client for node.js. I noticed significant improvements in this area when migrating from v1.2.x to v1.3.10 (the latest as of today)
2. You can pass an options object to the MongoClient.connect. The following op... | I had a similar problem being [disconnected from MongoDB periodically](https://stackoverflow.com/q/14301725/266536). Doing two things fixed it:
1. Make sure your computer never sleeps (that'll kill your network connection).
2. Bypass your router/firewall (or configure it properly, which I haven't figured out how to do... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | **UPDATE**: Our support article for this topic (essentially a copy of this post) has moved to [our connection troubleshooting doc](http://docs.mongolab.com/connecting/#known-issues).
There is a known issue that the Azure IaaS network enforces an idle timeout of roughly thirteen minutes (empirically arrived at). We are... | Increasing timeouts may help.
* "socketTimeoutMS" : How long a send or receive on a socket can take
before timing out.
* "wTimeoutMS" : It controls how many milliseconds the server waits for
the write concern to be satisfied.
* "connectTimeoutMS" : How long a connection can take to be opened
before timing out in milli... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | Thanks for all the help guys - I have managed to solve this issue on both localhost and deployed to a live server.
Here is my now working connect code:
```
var MONGO = {
username: "username",
password: "pa55W0rd!",
server: '******.mongolab.com',
port: '*****',
db: 'dbname',
connectionString: f... | I had a similar problem being [disconnected from MongoDB periodically](https://stackoverflow.com/q/14301725/266536). Doing two things fixed it:
1. Make sure your computer never sleeps (that'll kill your network connection).
2. Bypass your router/firewall (or configure it properly, which I haven't figured out how to do... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | **UPDATE**: Our support article for this topic (essentially a copy of this post) has moved to [our connection troubleshooting doc](http://docs.mongolab.com/connecting/#known-issues).
There is a known issue that the Azure IaaS network enforces an idle timeout of roughly thirteen minutes (empirically arrived at). We are... | I had a similar problem being [disconnected from MongoDB periodically](https://stackoverflow.com/q/14301725/266536). Doing two things fixed it:
1. Make sure your computer never sleeps (that'll kill your network connection).
2. Bypass your router/firewall (or configure it properly, which I haven't figured out how to do... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | A couple of recommendations for people still having this issue:
1. Make sure you are using the latest mongodb client for node.js. I noticed significant improvements in this area when migrating from v1.2.x to v1.3.10 (the latest as of today)
2. You can pass an options object to the MongoClient.connect. The following op... | Increasing timeouts may help.
* "socketTimeoutMS" : How long a send or receive on a socket can take
before timing out.
* "wTimeoutMS" : It controls how many milliseconds the server waits for
the write concern to be satisfied.
* "connectTimeoutMS" : How long a connection can take to be opened
before timing out in milli... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | Increasing timeouts may help.
* "socketTimeoutMS" : How long a send or receive on a socket can take
before timing out.
* "wTimeoutMS" : It controls how many milliseconds the server waits for
the write concern to be satisfied.
* "connectTimeoutMS" : How long a connection can take to be opened
before timing out in milli... | I had a similar problem being [disconnected from MongoDB periodically](https://stackoverflow.com/q/14301725/266536). Doing two things fixed it:
1. Make sure your computer never sleeps (that'll kill your network connection).
2. Bypass your router/firewall (or configure it properly, which I haven't figured out how to do... |
13,980,236 | I'm using nodejs and a mongoDB - and I'm having some connection issues.
Well, actually "wake" issues! It connects perfectly well - is super fast and I'm generally happy with the results.
**My problem:** If i don't use the connection for a while (i say while, because the timeframe varies 5+ mins) it seems to stall. I ... | 2012/12/20 | [
"https://Stackoverflow.com/questions/13980236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468855/"
] | Thanks for all the help guys - I have managed to solve this issue on both localhost and deployed to a live server.
Here is my now working connect code:
```
var MONGO = {
username: "username",
password: "pa55W0rd!",
server: '******.mongolab.com',
port: '*****',
db: 'dbname',
connectionString: f... | Increasing timeouts may help.
* "socketTimeoutMS" : How long a send or receive on a socket can take
before timing out.
* "wTimeoutMS" : It controls how many milliseconds the server waits for
the write concern to be satisfied.
* "connectTimeoutMS" : How long a connection can take to be opened
before timing out in milli... |
327,972 | How to underline a word with a dash-dotted line?
Actually there should be the dash-dotted line under the word and under this line here should be a dashed line.
Note: I know, that underlining shouldn't be done.
**Example:**
```
longword
._._._._
_ _ _ _
``` | 2016/09/04 | [
"https://tex.stackexchange.com/questions/327972",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/110154/"
] | My two main suggestions are
* Load the `rotating` package and use a `sidewaystable` environment instead of messing about with `\newgeometry`
* Load the `threeparttable` package with the option `para` use `\tnote{.}` in the body of the table to set a footnote marker and use a `tablenotes` environment to typeset the con... | * After sixt and half years for your table can be used `talltblr` of `tabularray` package.
* By using `tabularray` is simpler to set (nicer) table layout and achieve that table can fit in page text box.
[](https://i.stack.imgur.com/yNZ1y.png)
```
\do... |
416,441 | I am using a 13.10 Ubuntu client and I have installed a 12.04 Server with the help of VirtualBox. I am new user of Linux and this is my first Server that I am trying to create for experimentation purposes. I am trying to ping the server from the client but I keep getting this message when I terminate the process:
```
... | 2014/02/04 | [
"https://askubuntu.com/questions/416441",
"https://askubuntu.com",
"https://askubuntu.com/users/244597/"
] | That looks very much like you are using the wrong network mode for virtual box. Typically the guest cannot be reached from "outside" when using NAT (and the host is "outside" too).
You should use either "host only" if you want your guest to be completely hidden from outside - or "bridged mode" to have it be a part of ... | Change the network attached mode to 'Bridge Adapter'.
In virtualbox, goto settings-->Network.
Change attached to 'Bridge Adapter'
For more reading <https://www.virtualbox.org/manual/ch06.html> |
69,187,819 | I just downloaded the Oracle OpenJDK 17 GA LTS release and installed it into IntelliJ. I've selected the jdk v17 as my Project SDK and am attempting to set my project language level also to v17, but the only choices are version 1.3 thru 16, along with an SDK Default of "X - Experimental Features". Where is language lev... | 2021/09/15 | [
"https://Stackoverflow.com/questions/69187819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2735802/"
] | Basic support for Java 17 is available in [IntelliJ IDEA 2021.2.1](https://blog.jetbrains.com/idea/2021/08/intellij-idea-2021-2-1/) | Should have realized this sooner, but it turns out that the language level in IntelliJ is a function of the actual language support that the current version of IntelliJ has built in and does not come from the JDK. My IntelliJ version was 2021.1.3. I upgraded to 2021.2.1 and the basic 17 language support appeared. More ... |
5,792,635 | I'm hoping to have an Android broadcast to multiple Bluetooth headsets at once - the idea is to have a radio-like stream that users of an app can tap into. It is important that all users hear the music in sync (that is, the song ends at the same time for everyone).
I have not been able to determine if A2DP will allow s... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5792635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/638603/"
] | I dont think streaming to multiple devices over A2DP is currently supported. | According to <http://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html> in BluetoothA2dp class overview: "Android only supports one connected Bluetooth A2dp device at a time". |
5,792,635 | I'm hoping to have an Android broadcast to multiple Bluetooth headsets at once - the idea is to have a radio-like stream that users of an app can tap into. It is important that all users hear the music in sync (that is, the song ends at the same time for everyone).
I have not been able to determine if A2DP will allow s... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5792635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/638603/"
] | I dont think streaming to multiple devices over A2DP is currently supported. | It was possible with Windows Mobile 6.5 on a HTC Touch Pro 2 (a bad smartphone because of it´s slow CPU). I used two A2PD Headphones simultaneously. |
5,792,635 | I'm hoping to have an Android broadcast to multiple Bluetooth headsets at once - the idea is to have a radio-like stream that users of an app can tap into. It is important that all users hear the music in sync (that is, the song ends at the same time for everyone).
I have not been able to determine if A2DP will allow s... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5792635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/638603/"
] | I dont think streaming to multiple devices over A2DP is currently supported. | I have two Creative WP-380 that have ShareMe function that permit to listen the same stream audio in the same time. I and my wife watch movie with our linux notebook using that couple of headsets.
One is the master, bluetooth connected with the notebook, and the second is the slave, paired with the first.
Works excel... |
5,792,635 | I'm hoping to have an Android broadcast to multiple Bluetooth headsets at once - the idea is to have a radio-like stream that users of an app can tap into. It is important that all users hear the music in sync (that is, the song ends at the same time for everyone).
I have not been able to determine if A2DP will allow s... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5792635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/638603/"
] | According to <http://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html> in BluetoothA2dp class overview: "Android only supports one connected Bluetooth A2dp device at a time". | It was possible with Windows Mobile 6.5 on a HTC Touch Pro 2 (a bad smartphone because of it´s slow CPU). I used two A2PD Headphones simultaneously. |
5,792,635 | I'm hoping to have an Android broadcast to multiple Bluetooth headsets at once - the idea is to have a radio-like stream that users of an app can tap into. It is important that all users hear the music in sync (that is, the song ends at the same time for everyone).
I have not been able to determine if A2DP will allow s... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5792635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/638603/"
] | I have two Creative WP-380 that have ShareMe function that permit to listen the same stream audio in the same time. I and my wife watch movie with our linux notebook using that couple of headsets.
One is the master, bluetooth connected with the notebook, and the second is the slave, paired with the first.
Works excel... | It was possible with Windows Mobile 6.5 on a HTC Touch Pro 2 (a bad smartphone because of it´s slow CPU). I used two A2PD Headphones simultaneously. |
26,189,370 | Since <https://www.firebase.com/blog/2014-10-03-major-updates-to-firebase-user-auth.html>, after authenticating a user with `myRef authUser` I get `"simplelogin:userid"`
I haven't found this documented, is it normal? Should I just go on and strip the "simplelogin:" part to get the user id? | 2014/10/04 | [
"https://Stackoverflow.com/questions/26189370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/99214/"
] | Don't worry, you're doing it right. We still have this structure so we don't break anyone who has upgraded.
It's correct behavior to see a uid with the `simplelogin:userid` format. | It's not broken for me. According to the docs just get the uid property from the user object returned upon successful authentication. Can you post a jsfiddle if you still have problems?
```
var myRef = new Firebase("https://<your-firebase>.firebaseio.com");
var authClient = new FirebaseSimpleLogin(myRef, function(erro... |
64,535,963 | i just downloaded selenium and wanted to try just simple
code:
```
from selenium import webdriver
driver = webdriver.Firefox(executable_path='/usr/local/bin/geckodriver')
driver.get("https://www.youtube.com")
```
error:
```
Traceback (most recent call last):
File "/home/keksik/JetBainz/PycharmProjects/pythonProj... | 2020/10/26 | [
"https://Stackoverflow.com/questions/64535963",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14521537/"
] | Appearently, the issue occurs due to non-administrative privileges. The location where you have your driver at needs root privileges to be executed/run. I suggest you moving your driver to somewhere in your home directory where you don't need root privileges to launch the driver. | You can always install the Firefox driver on the fly. Just make sure you have the normal version of firefox installed. This doesn't have any kind of dependency on your local setup.
All you need to do is:
```
self.driver = webdriver.Firefox(executable_path=GeckoDriverManager().install())
```
from
```
from webdriver... |
950,935 | Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell.
Is there a way to safely re-create an Owncloud server using existing data disks on Linux?
Update: screen... | 2019/01/26 | [
"https://serverfault.com/questions/950935",
"https://serverfault.com",
"https://serverfault.com/users/201668/"
] | *Please note: These steps are only partially tested.*
If you had enabled file encryption, I have bad news for you: As the `config.php` contains a secret key, the files cannot be restored.
If not, I would suggest following steps:
* Backup what you currently have.
* Download and extract a fresh copy of OwnCloud
* Recr... | This depends what is on that disks that are not dead. If this includes all data directories and, most importantly, the Mysql/Postgresql database, you should have not lost anything except the time to setup a new instance and get stuff working again.
If this doesn't include the database, you are in a bad situation, as y... |
950,935 | Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell.
Is there a way to safely re-create an Owncloud server using existing data disks on Linux?
Update: screen... | 2019/01/26 | [
"https://serverfault.com/questions/950935",
"https://serverfault.com",
"https://serverfault.com/users/201668/"
] | *Please note: These steps are only partially tested.*
If you had enabled file encryption, I have bad news for you: As the `config.php` contains a secret key, the files cannot be restored.
If not, I would suggest following steps:
* Backup what you currently have.
* Download and extract a fresh copy of OwnCloud
* Recr... | In the future you should regularly create a database dump and copy it to a backup server together with the content of the data directly and the config.php file. And consider moving to Nextcloud because it is more secure, faster, fully open source and has more features. Migration from owncloud to nextcloud is fully supp... |
3,824,481 | I am developing a set of eclipse plugins, and I have several JUnit plugin tests that actually start another instance of eclipse, create a mock workspace and a mock project and runs various operations on them. I want to put that on continuous integration and I am at loss as to where to start. I am using Hudson, would th... | 2010/09/29 | [
"https://Stackoverflow.com/questions/3824481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/154722/"
] | I think the best solution for building Eclipse-based software currently is Tycho - it is based on Maven and uses your standard Eclipse files (like manifest, target platform, product definition). I got started with it using an intro from this blog: <http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bund... | As far as I know, [Buckminster](http://www.eclipse.org/buckminster/) tries to solve these problems: you can create descriptors, and then Buckminster can execute your tasks.
For Hudson there is a Buckminster module, that helps executing the Buckminster builds. |
3,824,481 | I am developing a set of eclipse plugins, and I have several JUnit plugin tests that actually start another instance of eclipse, create a mock workspace and a mock project and runs various operations on them. I want to put that on continuous integration and I am at loss as to where to start. I am using Hudson, would th... | 2010/09/29 | [
"https://Stackoverflow.com/questions/3824481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/154722/"
] | As far as I know, [Buckminster](http://www.eclipse.org/buckminster/) tries to solve these problems: you can create descriptors, and then Buckminster can execute your tasks.
For Hudson there is a Buckminster module, that helps executing the Buckminster builds. | maybe this helps you to avoid plugin tests? ;) i like to avoid them... by using mock objects...
<http://blog.srvme.de/2010/12/10/mock-eclipse-ifile/> |
3,824,481 | I am developing a set of eclipse plugins, and I have several JUnit plugin tests that actually start another instance of eclipse, create a mock workspace and a mock project and runs various operations on them. I want to put that on continuous integration and I am at loss as to where to start. I am using Hudson, would th... | 2010/09/29 | [
"https://Stackoverflow.com/questions/3824481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/154722/"
] | I think the best solution for building Eclipse-based software currently is Tycho - it is based on Maven and uses your standard Eclipse files (like manifest, target platform, product definition). I got started with it using an intro from this blog: <http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bund... | maybe this helps you to avoid plugin tests? ;) i like to avoid them... by using mock objects...
<http://blog.srvme.de/2010/12/10/mock-eclipse-ifile/> |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | I'll try to answer the question directly, without simplifying to a smaller case.
Proof with recursion, rather than induction
===========================================
If there are 100 blue eyed people on the island, person 1 sees 99 blue-eyed people.
Let's number them person 1 through person 100 (without loss of g... | As correctly stated by the OP, what happens the first night is a surprise to nobody.
So nobody has learned anything from the first night.
The OP is wrong in thinking that if there is no information learned by anybody the night has no effect.
If there are N monks and K blue-eyed monks, it can be shown that the blue-ey... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | Let's start with a simpler question. Suppose there were three blue-eyed people - then what information do the three people learn on the first night?
Before the first night, blue-eyed people see two blue-eyed people, and reason that there must be either two or three blue-eyed people total.
These people can reason hypo... | The new information gained when the oracle/guru makes a statement is that there is at least one person with blue eyes, and everyone is aware that this is the day on which it became common knowledge.
Each person also individually knows that there are at least 99 or 100 people with blue eyes (depending on whether their ... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | I'll try to answer the question directly, without simplifying to a smaller case.
Proof with recursion, rather than induction
===========================================
If there are 100 blue eyed people on the island, person 1 sees 99 blue-eyed people.
Let's number them person 1 through person 100 (without loss of g... | The new information gained when the oracle/guru makes a statement is that there is at least one person with blue eyes, and everyone is aware that this is the day on which it became common knowledge.
Each person also individually knows that there are at least 99 or 100 people with blue eyes (depending on whether their ... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | The new information gained when the oracle/guru makes a statement is that there is at least one person with blue eyes, and everyone is aware that this is the day on which it became common knowledge.
Each person also individually knows that there are at least 99 or 100 people with blue eyes (depending on whether their ... | The answer is that there is no new information learned on the first night when nobody leaves (everyone already knew that nobody would leave). There are only two times in which new information is gained:
* The moment when the guru states that someone has blue eyes.
* Night 99 when nobody leaves.
The really interesting... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | This is your mistaken assumption, I think:
>
> no new information is learnt [...] the system is static
>
>
>
There is one new piece of information learned after each day: **another day has passed and nobody has left**. These incremental pieces of information aren't enough for anyone to solve the problem for the f... | The new information gained when the oracle/guru makes a statement is that there is at least one person with blue eyes, and everyone is aware that this is the day on which it became common knowledge.
Each person also individually knows that there are at least 99 or 100 people with blue eyes (depending on whether their ... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | I'll try to answer the question directly, without simplifying to a smaller case.
Proof with recursion, rather than induction
===========================================
If there are 100 blue eyed people on the island, person 1 sees 99 blue-eyed people.
Let's number them person 1 through person 100 (without loss of g... | There is no *new* information after the first night.
====================================================
Every logician already knows everything that is learned on the first night. Many will say that it's about nested hypotheticals, which is somewhat true, but there's another way to think about it, which doesn't requ... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | The new information gained when the oracle/guru makes a statement is that there is at least one person with blue eyes, and everyone is aware that this is the day on which it became common knowledge.
Each person also individually knows that there are at least 99 or 100 people with blue eyes (depending on whether their ... | As correctly stated by the OP, what happens the first night is a surprise to nobody.
So nobody has learned anything from the first night.
The OP is wrong in thinking that if there is no information learned by anybody the night has no effect.
If there are N monks and K blue-eyed monks, it can be shown that the blue-ey... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | Let's start with a simpler question. Suppose there were three blue-eyed people - then what information do the three people learn on the first night?
Before the first night, blue-eyed people see two blue-eyed people, and reason that there must be either two or three blue-eyed people total.
These people can reason hypo... | The answer is that there is no new information learned on the first night when nobody leaves (everyone already knew that nobody would leave). There are only two times in which new information is gained:
* The moment when the guru states that someone has blue eyes.
* Night 99 when nobody leaves.
The really interesting... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | Let's start with a simpler question. Suppose there were three blue-eyed people - then what information do the three people learn on the first night?
Before the first night, blue-eyed people see two blue-eyed people, and reason that there must be either two or three blue-eyed people total.
These people can reason hypo... | There is no *new* information after the first night.
====================================================
Every logician already knows everything that is learned on the first night. Many will say that it's about nested hypotheticals, which is somewhat true, but there's another way to think about it, which doesn't requ... |
100,217 | There are good explanations on this site and xkcd of the inductive reasoning leading to the [riddle’s](https://xkcd.com/blue_eyes.html) [solution](https://xkcd.com/solution.html), but nowhere have I found an answer to the following aspect:
>
> Exactly what information is learnt — and by whom — after the first night?
... | 2020/07/22 | [
"https://puzzling.stackexchange.com/questions/100217",
"https://puzzling.stackexchange.com",
"https://puzzling.stackexchange.com/users/70583/"
] | This is your mistaken assumption, I think:
>
> no new information is learnt [...] the system is static
>
>
>
There is one new piece of information learned after each day: **another day has passed and nobody has left**. These incremental pieces of information aren't enough for anyone to solve the problem for the f... | The answer is that there is no new information learned on the first night when nobody leaves (everyone already knew that nobody would leave). There are only two times in which new information is gained:
* The moment when the guru states that someone has blue eyes.
* Night 99 when nobody leaves.
The really interesting... |
28,761,983 | I have recently created a dynamic clock using php and javascript, I have also styled it to how I want it using php. I have the clock in 4 different divs. (Text, Date, Time, Day) My only query is using CSS how do I set the width of each of these divs (or maybe the text itself) to all have a width of 180px no matter what... | 2015/02/27 | [
"https://Stackoverflow.com/questions/28761983",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4613978/"
] | Use a `<div>` to wrap things together when you need it so they inherit their parent element's width. Also, use spans to your advantage for their default 'inline' property. This will shorten the css you need.
```
<div class="clock">
<div id="day">Sunday</div>
<div><span id="time">5:34</span><span id="hour">pm</... | THIS IS EXAMPLE ONLY WHEN SECOND LINE IS LONGES:
```js
tday = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
tmonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
function GetClock() {
... |
28,761,983 | I have recently created a dynamic clock using php and javascript, I have also styled it to how I want it using php. I have the clock in 4 different divs. (Text, Date, Time, Day) My only query is using CSS how do I set the width of each of these divs (or maybe the text itself) to all have a width of 180px no matter what... | 2015/02/27 | [
"https://Stackoverflow.com/questions/28761983",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4613978/"
] | Using jQuery and taking the logic used in the linked question and answer in the comment I sent: [EXAMPLE](http://jsfiddle.net/yLga4c37/10/)
### JS
```
function FontSizes() {
var Width = $('#clock').width();
$('.clock').each(function() {
var NewFontChars = $(this).text().length;
var NewFontSize... | THIS IS EXAMPLE ONLY WHEN SECOND LINE IS LONGES:
```js
tday = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
tmonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
function GetClock() {
... |
515,094 | How can we distinguish between the metric expansion of space and the speed of light slowing over time?
I understand that the universe is expanding. But it seems that our main measurement techniques involve assuming the speed of light is constant over time. I know that we *define* length in terms of a constant speed of... | 2019/11/20 | [
"https://physics.stackexchange.com/questions/515094",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/218022/"
] | Type 1a supernovae explode with a fixed luminosity, then fade over a fixed time.
If the speed of light varies over cosmic time, the light will be redshifted for more distant supernovae, but the duration of the fading will on average be the same. Cosmic expansion, on the other hand, will increase the wavelength of the... | If the speed of light were variable, it would affect plenomena at all scales from microscopic to cosmological. However the expansion of space has no effect on matter bound by forces, such as on anything within a galaxy. The expansion of space is observed (based on the FLRW metric) only on the intergalactic cosmological... |
515,094 | How can we distinguish between the metric expansion of space and the speed of light slowing over time?
I understand that the universe is expanding. But it seems that our main measurement techniques involve assuming the speed of light is constant over time. I know that we *define* length in terms of a constant speed of... | 2019/11/20 | [
"https://physics.stackexchange.com/questions/515094",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/218022/"
] | If the speed of light were variable, it would affect plenomena at all scales from microscopic to cosmological. However the expansion of space has no effect on matter bound by forces, such as on anything within a galaxy. The expansion of space is observed (based on the FLRW metric) only on the intergalactic cosmological... | Cosmological expansion has observable effects, such as redshifts.
A change in a dimensionful constant is unobservable. See [Is it possible to speak about changes in a physical constant which is not dimensionless?](https://physics.stackexchange.com/questions/78684/is-it-possible-to-speak-about-changes-in-a-physical-con... |
515,094 | How can we distinguish between the metric expansion of space and the speed of light slowing over time?
I understand that the universe is expanding. But it seems that our main measurement techniques involve assuming the speed of light is constant over time. I know that we *define* length in terms of a constant speed of... | 2019/11/20 | [
"https://physics.stackexchange.com/questions/515094",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/218022/"
] | If the speed of light were variable, it would affect plenomena at all scales from microscopic to cosmological. However the expansion of space has no effect on matter bound by forces, such as on anything within a galaxy. The expansion of space is observed (based on the FLRW metric) only on the intergalactic cosmological... | I would just like to point out that Type 1a supernovae can not be
used to differentiate between cosmic expansion and variable speed
of light.
Since the the speed of light is a dimensionful constant, local
changes are not observable. Locally a supernova will not have a
redshift nor fade more slowly. However when observ... |
515,094 | How can we distinguish between the metric expansion of space and the speed of light slowing over time?
I understand that the universe is expanding. But it seems that our main measurement techniques involve assuming the speed of light is constant over time. I know that we *define* length in terms of a constant speed of... | 2019/11/20 | [
"https://physics.stackexchange.com/questions/515094",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/218022/"
] | Type 1a supernovae explode with a fixed luminosity, then fade over a fixed time.
If the speed of light varies over cosmic time, the light will be redshifted for more distant supernovae, but the duration of the fading will on average be the same. Cosmic expansion, on the other hand, will increase the wavelength of the... | Cosmological expansion has observable effects, such as redshifts.
A change in a dimensionful constant is unobservable. See [Is it possible to speak about changes in a physical constant which is not dimensionless?](https://physics.stackexchange.com/questions/78684/is-it-possible-to-speak-about-changes-in-a-physical-con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.