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 |
|---|---|---|---|---|---|
70,992,183 | I currently have a dataframe of customers, contracts, and contract dates like this ex
```
Cust Contract Start End
A 123 10/1/2021 11/3/2021
B 987 7/4/2022 8/12/2022
```
For each row, I want to generate a variable that tells me if it was active during a set r... | 2022/02/04 | [
"https://Stackoverflow.com/questions/70992183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17996183/"
] | This assignment
```
if(a[1]==' '){s[0]=a[1];
```
invokes undefined behavior because the string `s` is empty and you may not use the subscript operator for an empty string to assign a value.
Instead you could write for example
```
if(a[1]==' '){s += a[1];
```
Pay attention to that in this case the string s will c... | Thats because "s" is empty string with size 0.
It means there is no element at index [0] in it.
When you ask "s" for [0] element it leads to UB.
If you want to add a[1] to "s", you can use:
```
s.push_back(a[1]);
```
Or:
```
s += a[1];
```
Or:
```
s.insert(s.begin(), a[1]); // That's bad way, dont use it.
``` |
70,992,183 | I currently have a dataframe of customers, contracts, and contract dates like this ex
```
Cust Contract Start End
A 123 10/1/2021 11/3/2021
B 987 7/4/2022 8/12/2022
```
For each row, I want to generate a variable that tells me if it was active during a set r... | 2022/02/04 | [
"https://Stackoverflow.com/questions/70992183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17996183/"
] | You are not allocating any character memory for `s` to refer to, so `s.size()` is 0 and thus `[0]` is out of bounds, and writing anything to it is [**undefined behavior**](https://en.cppreference.com/w/cpp/language/ub) 1.
1: in C++11 and later, you can safely write `'\0'` to `s[s.size()]`, but you are not doing that h... | My guess is that this is a naive attempt to parse the string. Is this what you are looking for?
```
#include <string>
#include <iostream>
using namespace std;
int main()
{
string a = "1 23";
string s;
if (a[1] == ' ') {
s = a.substr(2);
cout << s;
}
return 0;
}
``` |
70,992,183 | I currently have a dataframe of customers, contracts, and contract dates like this ex
```
Cust Contract Start End
A 123 10/1/2021 11/3/2021
B 987 7/4/2022 8/12/2022
```
For each row, I want to generate a variable that tells me if it was active during a set r... | 2022/02/04 | [
"https://Stackoverflow.com/questions/70992183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17996183/"
] | You are not allocating any character memory for `s` to refer to, so `s.size()` is 0 and thus `[0]` is out of bounds, and writing anything to it is [**undefined behavior**](https://en.cppreference.com/w/cpp/language/ub) 1.
1: in C++11 and later, you can safely write `'\0'` to `s[s.size()]`, but you are not doing that h... | Thats because "s" is empty string with size 0.
It means there is no element at index [0] in it.
When you ask "s" for [0] element it leads to UB.
If you want to add a[1] to "s", you can use:
```
s.push_back(a[1]);
```
Or:
```
s += a[1];
```
Or:
```
s.insert(s.begin(), a[1]); // That's bad way, dont use it.
``` |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | ```
Table: Album
ID/PK (your choice of primary key philosophy)
AlbumName
Table: Track
ID/PK (optional, could make AlbumFK, TrackNumber the primary key)
AlbumFK REFERENCES (Album.PK)
TrackNumber
TrackName
TrackURL
``` | Conventional approach would be to have one table with a row for each track (with any meta data). Have another table for each Album, and a third table that records the association for which tracks are on which album(s) and in which order. |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | It's entirely possible, you could store the field as comma-separated or XML data for example.
Whether it's *sensible* is another question - if you ever want to query how many albums have more than 10 tracks for example you aren't going to be able to write an SQL query for that and you'll have to resort to pulling the... | Conventional approach would be to have one table with a row for each track (with any meta data). Have another table for each Album, and a third table that records the association for which tracks are on which album(s) and in which order. |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | Conventional approach would be to have one table with a row for each track (with any meta data). Have another table for each Album, and a third table that records the association for which tracks are on which album(s) and in which order. | The Wikipedia article on [Database Normalization](http://en.wikipedia.org/wiki/Normal_forms) makes a reasonable effort to explain the purpose of normalization ... and the sorts of anomalies that the normalization rules are intended to prevent. |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | ```
Table: Album
ID/PK (your choice of primary key philosophy)
AlbumName
Table: Track
ID/PK (optional, could make AlbumFK, TrackNumber the primary key)
AlbumFK REFERENCES (Album.PK)
TrackNumber
TrackName
TrackURL
``` | Use two tables, one for albums, and one for tracks.
```
Album
-----
Id
Name
Artist
etc...
Track
-----
Id
AlbumId(Foreign Key to Album Table)
Name
URL
```
You could also augment this with a third table that joined the trackId and AlbumId fields (so don't have the AlbumId in the Track table). The advantage of this se... |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | It's entirely possible, you could store the field as comma-separated or XML data for example.
Whether it's *sensible* is another question - if you ever want to query how many albums have more than 10 tracks for example you aren't going to be able to write an SQL query for that and you'll have to resort to pulling the... | Use two tables, one for albums, and one for tracks.
```
Album
-----
Id
Name
Artist
etc...
Track
-----
Id
AlbumId(Foreign Key to Album Table)
Name
URL
```
You could also augment this with a third table that joined the trackId and AlbumId fields (so don't have the AlbumId in the Track table). The advantage of this se... |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | Use two tables, one for albums, and one for tracks.
```
Album
-----
Id
Name
Artist
etc...
Track
-----
Id
AlbumId(Foreign Key to Album Table)
Name
URL
```
You could also augment this with a third table that joined the trackId and AlbumId fields (so don't have the AlbumId in the Track table). The advantage of this se... | The Wikipedia article on [Database Normalization](http://en.wikipedia.org/wiki/Normal_forms) makes a reasonable effort to explain the purpose of normalization ... and the sorts of anomalies that the normalization rules are intended to prevent. |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | ```
Table: Album
ID/PK (your choice of primary key philosophy)
AlbumName
Table: Track
ID/PK (optional, could make AlbumFK, TrackNumber the primary key)
AlbumFK REFERENCES (Album.PK)
TrackNumber
TrackName
TrackURL
``` | The Wikipedia article on [Database Normalization](http://en.wikipedia.org/wiki/Normal_forms) makes a reasonable effort to explain the purpose of normalization ... and the sorts of anomalies that the normalization rules are intended to prevent. |
2,961,536 | * I would like to store album's
track names in a single field in a
database.
* The number of tracks are arbitrary
for each album.
* Each album is one record in the table.
* Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a ... | 2010/06/02 | [
"https://Stackoverflow.com/questions/2961536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83819/"
] | It's entirely possible, you could store the field as comma-separated or XML data for example.
Whether it's *sensible* is another question - if you ever want to query how many albums have more than 10 tracks for example you aren't going to be able to write an SQL query for that and you'll have to resort to pulling the... | The Wikipedia article on [Database Normalization](http://en.wikipedia.org/wiki/Normal_forms) makes a reasonable effort to explain the purpose of normalization ... and the sorts of anomalies that the normalization rules are intended to prevent. |
39,542,132 | My php script from PuTTY on a synology sever returns this:
>
> PHP Fatal error: Call to undefined function mysqli\_connect()`.
>
>
>
Mysqli is installed on the server and has been used many times before in scripts via a browser. I don't understand why `mysqli_connect()` is supposedly undefined. How can I resolve ... | 2016/09/17 | [
"https://Stackoverflow.com/questions/39542132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | create a php file and have code <?php phpinfo(); ?> check whether mysqli section is displayed or not. It should display the following string in HTML Table format.
mysqli
MysqlI Support enabled
if mysqli is not available, then you need to enable it in php.ini / while configuring with apachee. | Web version and CLI version are using different php.ini files.
you can find out which ini file is used by the following command
```
php -i | grep php.ini
```
then configure this php.ini to make it support mysqli. |
39,542,132 | My php script from PuTTY on a synology sever returns this:
>
> PHP Fatal error: Call to undefined function mysqli\_connect()`.
>
>
>
Mysqli is installed on the server and has been used many times before in scripts via a browser. I don't understand why `mysqli_connect()` is supposedly undefined. How can I resolve ... | 2016/09/17 | [
"https://Stackoverflow.com/questions/39542132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | By running this from CLI (from Putty):
`php70 --ini`
i printed list of ini files used by PHP.
I found, that web server is using
`/usr/syno/etc/packages/WebStation/php70/conf.d/user_settings.ini`
while CLI doesn't use that file. It only using
`/usr/local/etc/php70/php.ini`
So, I had to add few lines to ... | create a php file and have code <?php phpinfo(); ?> check whether mysqli section is displayed or not. It should display the following string in HTML Table format.
mysqli
MysqlI Support enabled
if mysqli is not available, then you need to enable it in php.ini / while configuring with apachee. |
39,542,132 | My php script from PuTTY on a synology sever returns this:
>
> PHP Fatal error: Call to undefined function mysqli\_connect()`.
>
>
>
Mysqli is installed on the server and has been used many times before in scripts via a browser. I don't understand why `mysqli_connect()` is supposedly undefined. How can I resolve ... | 2016/09/17 | [
"https://Stackoverflow.com/questions/39542132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | By running this from CLI (from Putty):
`php70 --ini`
i printed list of ini files used by PHP.
I found, that web server is using
`/usr/syno/etc/packages/WebStation/php70/conf.d/user_settings.ini`
while CLI doesn't use that file. It only using
`/usr/local/etc/php70/php.ini`
So, I had to add few lines to ... | Web version and CLI version are using different php.ini files.
you can find out which ini file is used by the following command
```
php -i | grep php.ini
```
then configure this php.ini to make it support mysqli. |
10,316,702 | I have a program that is reading from plain text files. the amount of these files can be more that 5 Million!
When I'm reading them I found them by name! the names are basically save as x and y of a matrix for example 440x300.txt
Now I want to put all of them in one big file and index them
I mean I want to now exac... | 2012/04/25 | [
"https://Stackoverflow.com/questions/10316702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029483/"
] | The only thing that worked for me was using
```
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
```
in my ViewController and prese... | You can manually set the transform of the view to rotate it. For example, to rotate 90 degrees:
```
view.transform = CGAffineTransformMakeRotation( M_PI / 2 );
``` |
10,316,702 | I have a program that is reading from plain text files. the amount of these files can be more that 5 Million!
When I'm reading them I found them by name! the names are basically save as x and y of a matrix for example 440x300.txt
Now I want to put all of them in one big file and index them
I mean I want to now exac... | 2012/04/25 | [
"https://Stackoverflow.com/questions/10316702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029483/"
] | You can manually set the transform of the view to rotate it. For example, to rotate 90 degrees:
```
view.transform = CGAffineTransformMakeRotation( M_PI / 2 );
``` | ```
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
```
Write in your Event. |
10,316,702 | I have a program that is reading from plain text files. the amount of these files can be more that 5 Million!
When I'm reading them I found them by name! the names are basically save as x and y of a matrix for example 440x300.txt
Now I want to put all of them in one big file and index them
I mean I want to now exac... | 2012/04/25 | [
"https://Stackoverflow.com/questions/10316702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029483/"
] | The only thing that worked for me was using
```
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
```
in my ViewController and prese... | ```
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
```
Write in your Event. |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | This would have major impacts across society. First, pornography and prostitution, gone. However, any concept of father hood? Also gone. Since sex is so common, without any DNA testing it would be impossible to tell who the father is. Over time, that would lead to a system of female inheritance. Since you don't know wh... | My initial response is to think of something along the lines of a conservative Arabic family structure, though with women even more tightly controlled as a burka won't be enough. This only lasts for a week per month, so perhaps it would only be strict isolation for that week, but otherwise a fully integrated member of ... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | I think your initial presumption should be clarified a bit. Human sexuality is not naturally private, nocturnal, or selective. Those attributes of sexuality are socially constructed and did not exist for the majority of human evolution. Privacy in any respect was really only created during the Industrial Revolution. Pr... | The most obvious result would be that there would be no concept of a family. Now the concept of a family influences a lot of things; for one, the concept of inheriting goods might not develop; without that, also the concept of property would be less strong. A lack of sexual/compassionate bindings would probably give a ... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | Well, extrapolating from chimpanzees and dolphins, the results might be rather grim.
Males and females have contradictory goals in species where multiple mates are an option. The reproductive expenditure in males is minimal compared to the huge expenditure of females. Therefore they follow contradictory strategies. M... | I think your initial presumption should be clarified a bit. Human sexuality is not naturally private, nocturnal, or selective. Those attributes of sexuality are socially constructed and did not exist for the majority of human evolution. Privacy in any respect was really only created during the Industrial Revolution. Pr... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | Well, extrapolating from chimpanzees and dolphins, the results might be rather grim.
Males and females have contradictory goals in species where multiple mates are an option. The reproductive expenditure in males is minimal compared to the huge expenditure of females. Therefore they follow contradictory strategies. M... | My initial response is to think of something along the lines of a conservative Arabic family structure, though with women even more tightly controlled as a burka won't be enough. This only lasts for a week per month, so perhaps it would only be strict isolation for that week, but otherwise a fully integrated member of ... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | Well, extrapolating from chimpanzees and dolphins, the results might be rather grim.
Males and females have contradictory goals in species where multiple mates are an option. The reproductive expenditure in males is minimal compared to the huge expenditure of females. Therefore they follow contradictory strategies. M... | The solution my early-iron-age settlers came up with is gender segregation enabled by the design of their settlements. Men live in one district, women in another, and between them is two districts, one for trade where both men and women can meet (and accept the risk that they may encounter or be a woman going into heat... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | This would have major impacts across society. First, pornography and prostitution, gone. However, any concept of father hood? Also gone. Since sex is so common, without any DNA testing it would be impossible to tell who the father is. Over time, that would lead to a system of female inheritance. Since you don't know wh... | The most obvious result would be that there would be no concept of a family. Now the concept of a family influences a lot of things; for one, the concept of inheriting goods might not develop; without that, also the concept of property would be less strong. A lack of sexual/compassionate bindings would probably give a ... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | Given that humanity has evolved from what we believe were such species, I would expect that any such society would not be as successful as ours. We evolved our current forms of sexuality precisely because they were more successful.
In your description of human sexuality you miss the most important factor behind the va... | There is plenty of material in the earlier answers to make them nearly comprehensive; so while I agree with those earlier answers, I will only expand on a devil's advocate view for the fun of it:
For women, due to both sexual dimorphism and having to bear all the burdens of pregnancy, these urges (if unchecked) will c... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | This would have major impacts across society. First, pornography and prostitution, gone. However, any concept of father hood? Also gone. Since sex is so common, without any DNA testing it would be impossible to tell who the father is. Over time, that would lead to a system of female inheritance. Since you don't know wh... | The solution my early-iron-age settlers came up with is gender segregation enabled by the design of their settlements. Men live in one district, women in another, and between them is two districts, one for trade where both men and women can meet (and accept the risk that they may encounter or be a woman going into heat... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | Given that humanity has evolved from what we believe were such species, I would expect that any such society would not be as successful as ours. We evolved our current forms of sexuality precisely because they were more successful.
In your description of human sexuality you miss the most important factor behind the va... | The ability to think more logically when it is "not time for sex" could help the Society to be stable. Female politicians may be precluded from taking decisions on those 5 days (and also to going to work, to avoid influencing Male politicians). Same for policemen and policewomen, judges and the military, and you have a... |
144 | Consider a group of humans at a bronze-age to early iron-age technological level colonizing a new earthlike planet. There is just one difference - there exists on the planet *something* which changes the nature of human sexuality - and the colonists don't know what it is, nor can they stop it from having its effect.
N... | 2014/09/17 | [
"https://worldbuilding.stackexchange.com/questions/144",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/75/"
] | This would have major impacts across society. First, pornography and prostitution, gone. However, any concept of father hood? Also gone. Since sex is so common, without any DNA testing it would be impossible to tell who the father is. Over time, that would lead to a system of female inheritance. Since you don't know wh... | I think your initial presumption should be clarified a bit. Human sexuality is not naturally private, nocturnal, or selective. Those attributes of sexuality are socially constructed and did not exist for the majority of human evolution. Privacy in any respect was really only created during the Industrial Revolution. Pr... |
946,588 | Does a limit that equals to infinity considered to exist ?? am confused !!
for Example 1/(x-2)--> when evaluating the limit at 2 the result is 1/0 which is infinity
while after looking at the graph the left hand limit equals -inf while right hand limit
equals +inf does the one sided limits exists ??
pls an expert d... | 2014/09/26 | [
"https://math.stackexchange.com/questions/946588",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/177540/"
] | The limit exists if the values approach some real number. If the values are getting bigger and bigger the limit doesn't exist. There are other ways the limit could not exist. Saying the limit is infinity is being more specific about how the limit fails to exist.
Also, saying "the result is 1/0" causes many math folks ... | If we consider the real number or complex number system then the limit does not exist. But if we include ∞ with that system, which is called extended real number or extended complex number system, then obviously we have to say that the limit exists. |
118,336 | We know Bohr said that the angular momentum of an electron is an integral multiple of $nh/(2π).$ And in de Broglie's wave equation, he said the circumference of the path of the electron traveling as a way is $n$ times the wavelength, which is equal to $2πr.$
But in Bohr's model $n$ is the principal quantum number, whi... | 2019/07/22 | [
"https://chemistry.stackexchange.com/questions/118336",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/81201/"
] | **de Brogile explains why orbitals are quantised**
Strictly speaking de Brogile doesn't prove Bohr's postulates which are mostly wrong. But he did provide an explanation for the most important of Bohr's ideas: electron orbitals are *quantised*.
Bohr's whole model starts with the classical idea that electrons "orbit" ... | Bohr's theory that angular momentum $mvr$ is an integer multiple of $\frac{h}{2π}$ has been reinterpreted by de Broglie to show that the electron is characterised by a standing wave condition. This means that a whole number of wavelengths must fit around the circumference of its orbit, and that it behaves like a wave.1... |
55,581,124 | I’m currently working with spring boot and kubernetes and came across a problem.
I’ve already implemented service discovery in spring boot with spring-boot-cloud-kubernetes and it’s working fine, but (and this is something I’m not stoked about) I have to redeploy my microservices to minikube every time I want to observ... | 2019/04/08 | [
"https://Stackoverflow.com/questions/55581124",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7723191/"
] | You could use Consul in combination with [consul-template](https://github.com/hashicorp/consul-template) or [envconsul](https://github.com/hashicorp/envconsul) to do service discovery and config file templating, including automatic restarting of the application if required. | Use k8s services that point to respective endpoints. You can always change the service endpoints and will be reflected any time there are changes to services. |
200,507 | I'm currently hosting sites for clients using the following setup:
* Apache 2.2.16
* mod\_fastcgi 2.4.7
* php 5.3.3
Apache uses the worker MPM and serves PHP through a dynamic FastCGI config:
```
FastCgiSuexec /usr/sbin/suexec
FastCgiConfig -singleThreshold 0 -pass-header Authorization -idle-timeout 3600
SuexecUser... | 2010/11/10 | [
"https://serverfault.com/questions/200507",
"https://serverfault.com",
"https://serverfault.com/users/59871/"
] | If you have a windows server to look after these clients then I'd suggest [Windows Deployment Services](http://technet.microsoft.com/en-us/library/cc772106%28WS.10%29.aspx), which is included in Windows Server.
Failing that, I'd consider [FOG](http://www.fogproject.org/), which is a very decent open source alternative... | if you are installing operating systems, and have the hardware to support it [PXE booting](http://en.wikipedia.org/wiki/Preboot_Execution_Environment) is the way to go, you can maintain installation images on a single server, boot from the media using pxe and away you go |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | I never seem to name them anything like what you proposed (i.e. keeping one way). It just seems to be much more clear when I can find a "proper name" for the hash. It might be "person\_details" or "file\_sizes" or "album\_tracks" etc. (although the last 2 seem to have key\_value names, first one a bit less). In rare ca... | I usually use <something>`map` since it's usually a map such as strings to functions, or numbers to classes, or whatnot. Unnamed dicts usually end up in a larger structure, so I don't worry about them. |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | `key_to_value`, for example `surname_to_salary` may be useful when there are closely interrelated maps in code: a to b, b to a, c to b etc. | I usually use <something>`map` since it's usually a map such as strings to functions, or numbers to classes, or whatnot. Unnamed dicts usually end up in a larger structure, so I don't worry about them. |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | I never seem to name them anything like what you proposed (i.e. keeping one way). It just seems to be much more clear when I can find a "proper name" for the hash. It might be "person\_details" or "file\_sizes" or "album\_tracks" etc. (although the last 2 seem to have key\_value names, first one a bit less). In rare ca... | I will contrast with many answers so far (including the chosen answer) and say:
I avoid adding type references like `dict` or `map` to the variable name. It feels too much like Hungarian notation to me, which feels very anti-pythonic.
To answer the question of what I DO use:
I use names of the form `values`, `values... |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | I never seem to name them anything like what you proposed (i.e. keeping one way). It just seems to be much more clear when I can find a "proper name" for the hash. It might be "person\_details" or "file\_sizes" or "album\_tracks" etc. (although the last 2 seem to have key\_value names, first one a bit less). In rare ca... | `values_by_key`
1. it is not so confusing as `value_key_map`: you can't confuse what is
value name and what is key name
2. it doesn't name the type directly -- python style naming |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | I never seem to name them anything like what you proposed (i.e. keeping one way). It just seems to be much more clear when I can find a "proper name" for the hash. It might be "person\_details" or "file\_sizes" or "album\_tracks" etc. (although the last 2 seem to have key\_value names, first one a bit less). In rare ca... | I think it makes sense to name the dict after the values in the dict, and drop any mention of the key. After all, you are going to be using the dict in situations like `values[key]` which makes it perfectly clear what the keys are, assuming you named `key` well. |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | I never seem to name them anything like what you proposed (i.e. keeping one way). It just seems to be much more clear when I can find a "proper name" for the hash. It might be "person\_details" or "file\_sizes" or "album\_tracks" etc. (although the last 2 seem to have key\_value names, first one a bit less). In rare ca... | In our projects, we adopted following convention:
* `key_to_value_map` when it is a map
* `aname_dict` for larger more complex structure. |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | I will contrast with many answers so far (including the chosen answer) and say:
I avoid adding type references like `dict` or `map` to the variable name. It feels too much like Hungarian notation to me, which feels very anti-pythonic.
To answer the question of what I DO use:
I use names of the form `values`, `values... | In our projects, we adopted following convention:
* `key_to_value_map` when it is a map
* `aname_dict` for larger more complex structure. |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | `key_to_value`, for example `surname_to_salary` may be useful when there are closely interrelated maps in code: a to b, b to a, c to b etc. | I will contrast with many answers so far (including the chosen answer) and say:
I avoid adding type references like `dict` or `map` to the variable name. It feels too much like Hungarian notation to me, which feels very anti-pythonic.
To answer the question of what I DO use:
I use names of the form `values`, `values... |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | I will contrast with many answers so far (including the chosen answer) and say:
I avoid adding type references like `dict` or `map` to the variable name. It feels too much like Hungarian notation to me, which feels very anti-pythonic.
To answer the question of what I DO use:
I use names of the form `values`, `values... | I usually use <something>`map` since it's usually a map such as strings to functions, or numbers to classes, or whatnot. Unnamed dicts usually end up in a larger structure, so I don't worry about them. |
2,405,958 | While other questions have tackled the broader category of [sequences](https://stackoverflow.com/questions/659415/python-sequence-naming-convention) and [modules](https://stackoverflow.com/questions/711884/python-naming-conventions-for-modules), I ask this very specific question:
**"What naming convention do you use f... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2405958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/158687/"
] | `values_by_key`
1. it is not so confusing as `value_key_map`: you can't confuse what is
value name and what is key name
2. it doesn't name the type directly -- python style naming | In our projects, we adopted following convention:
* `key_to_value_map` when it is a map
* `aname_dict` for larger more complex structure. |
58,002,042 | Hostinger offers this really cheap plan that is 1 dollar per month but it doesn't have SSH support. Do I need SSH support to host NodeJS? The plan provides shared hosting. | 2019/09/18 | [
"https://Stackoverflow.com/questions/58002042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11655959/"
] | This is false. Consider a two-state NFA with a non-accepting initial state leading to an accepting state by means of a lambda- (or epsilon-, or empty) transition. The empty string is accepted by this NFA by traversing the transition, but the initial state is non-accepting.
If the claim were about DFAs, then it would b... | Yes, it is true. When the start state become the final state, then without reading any string you reached the final state. So the string accepted is empty.
Refer <https://www.udemy.com/course/introduction-to-theory-of-computations/> |
58,002,042 | Hostinger offers this really cheap plan that is 1 dollar per month but it doesn't have SSH support. Do I need SSH support to host NodeJS? The plan provides shared hosting. | 2019/09/18 | [
"https://Stackoverflow.com/questions/58002042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11655959/"
] | This is false. Consider a two-state NFA with a non-accepting initial state leading to an accepting state by means of a lambda- (or epsilon-, or empty) transition. The empty string is accepted by this NFA by traversing the transition, but the initial state is non-accepting.
If the claim were about DFAs, then it would b... | Yes it is true.
By defualt NFA means NFA without Epsilon transition.
If it is an Epsilon NFA (NFA which can change state without consuming the input symbol) then the answer is false. |
58,002,042 | Hostinger offers this really cheap plan that is 1 dollar per month but it doesn't have SSH support. Do I need SSH support to host NodeJS? The plan provides shared hosting. | 2019/09/18 | [
"https://Stackoverflow.com/questions/58002042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11655959/"
] | Yes it is true.
By defualt NFA means NFA without Epsilon transition.
If it is an Epsilon NFA (NFA which can change state without consuming the input symbol) then the answer is false. | Yes, it is true. When the start state become the final state, then without reading any string you reached the final state. So the string accepted is empty.
Refer <https://www.udemy.com/course/introduction-to-theory-of-computations/> |
72,266,632 | I have a form that once certain checkboxes are checked, I need them to v-show additional form components. I can get it to work, sort of. If you only choose 1 option, it will populate the correct form, however, If multiple choices are made it doesn't show the additional forms components. Here is my code. It seems that a... | 2022/05/16 | [
"https://Stackoverflow.com/questions/72266632",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18994237/"
] | Only create the new image once, if it hasn't been created already. On click, copy the src attribute of the clicked image to the one created inside the `playerbox` div.
See how it works by running the snippet and clicking one of the three images...
```js
// this "lazy" getter for playerImg will either return or create... | HTML elements with an id are directly put into javascript variables.
It's not the case with classes (since multiple html elements can have the same class name).
So if you'd use
```
<div id="user">
<img id="select" id="rock" src="images/rock-removebg-preview.png" onclick="addImg()">
<img id="select" id="paper"... |
72,266,632 | I have a form that once certain checkboxes are checked, I need them to v-show additional form components. I can get it to work, sort of. If you only choose 1 option, it will populate the correct form, however, If multiple choices are made it doesn't show the additional forms components. Here is my code. It seems that a... | 2022/05/16 | [
"https://Stackoverflow.com/questions/72266632",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18994237/"
] | ***Details are commented in example below***
```js
// Reference the <form>
const RPS = document.forms.RPS
// Register the click event to <form>
RPS.onclick = addIMG;
// Pass the Event Object
function addIMG(e) {
// Reference all form controls
const IO = this.elements;
// The tag that the user cklicked
const cl... | HTML elements with an id are directly put into javascript variables.
It's not the case with classes (since multiple html elements can have the same class name).
So if you'd use
```
<div id="user">
<img id="select" id="rock" src="images/rock-removebg-preview.png" onclick="addImg()">
<img id="select" id="paper"... |
647,194 | I am trying to get Grub to look nice.
But, for some reason the changes do not apply. I tried background images, (custom ones and the ones from grub2-splashimages), color changing (all the options), but it does not want to apply. It does save correctly(without any errors), and as far as I know, grub is installed on the... | 2015/07/11 | [
"https://askubuntu.com/questions/647194",
"https://askubuntu.com",
"https://askubuntu.com/users/428648/"
] | To add a custom background image:
1. Save your background image to your Pictures directory as .png
2. Open terminal and paste `sudo gedit /etc/grub.d/05_debian_theme`
3. Paste the line `GRUB_BACKGROUND="/home/YOURUSERNAME/Pictures/NAME-OF-BACKGROUND.png"` on its own line in the file.
4. In terminal run `sudo update-gr... | Grub works better with **png** images than jpg.
Have a look at this page: [Ubuntu Community - Grub2/Displays](https://help.ubuntu.com/community/Grub2/Displays)
>
> GRUB 2 can use PNG, JPG/JPEG and TGA images for the background. The
> image must meet the following specifications:
>
>
> * JPG/JPEG images must be 8-... |
647,194 | I am trying to get Grub to look nice.
But, for some reason the changes do not apply. I tried background images, (custom ones and the ones from grub2-splashimages), color changing (all the options), but it does not want to apply. It does save correctly(without any errors), and as far as I know, grub is installed on the... | 2015/07/11 | [
"https://askubuntu.com/questions/647194",
"https://askubuntu.com",
"https://askubuntu.com/users/428648/"
] | To add a custom background image:
1. Save your background image to your Pictures directory as .png
2. Open terminal and paste `sudo gedit /etc/grub.d/05_debian_theme`
3. Paste the line `GRUB_BACKGROUND="/home/YOURUSERNAME/Pictures/NAME-OF-BACKGROUND.png"` on its own line in the file.
4. In terminal run `sudo update-gr... | If you only want to change the background image you can do this:
Put the image under /boot/grub/ and run:
```
sudo update-grub
```
For some reason `grub-customizer` doesn't work you should fill a bug.
It happens to a lot of users.
This [article](https://www.thegeekstuff.com/2012/10/grub-splash-image/) for Debia... |
647,194 | I am trying to get Grub to look nice.
But, for some reason the changes do not apply. I tried background images, (custom ones and the ones from grub2-splashimages), color changing (all the options), but it does not want to apply. It does save correctly(without any errors), and as far as I know, grub is installed on the... | 2015/07/11 | [
"https://askubuntu.com/questions/647194",
"https://askubuntu.com",
"https://askubuntu.com/users/428648/"
] | Grub works better with **png** images than jpg.
Have a look at this page: [Ubuntu Community - Grub2/Displays](https://help.ubuntu.com/community/Grub2/Displays)
>
> GRUB 2 can use PNG, JPG/JPEG and TGA images for the background. The
> image must meet the following specifications:
>
>
> * JPG/JPEG images must be 8-... | If you only want to change the background image you can do this:
Put the image under /boot/grub/ and run:
```
sudo update-grub
```
For some reason `grub-customizer` doesn't work you should fill a bug.
It happens to a lot of users.
This [article](https://www.thegeekstuff.com/2012/10/grub-splash-image/) for Debia... |
41,259,138 | I am attempting to get multiple views to use the same controller. I've tried a couple of things so far, none seem to work. By "doesnt work" I mean the controller `MapController` isnt instantiated and the views cannot see the controller
**1**
```
$stateProvider.state(PageStateNames.COMPONENTS_LIVEMAP, {
url: "/com... | 2016/12/21 | [
"https://Stackoverflow.com/questions/41259138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/94278/"
] | all you need to do is just use a custom drawable as **track** of **switch**
this is the code for custom drawable:
```
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape android:shape="rectangle">
<corners
android:radius="@dimen/_40... | In style.xml
```
<style name="switchCompatStyle">
<item name="colorControlActivated">@color/colorPrimary</item>
</style>
```
And code for switch is like
```
<android.support.v7.widget.SwitchCompat
android:id="@+id/switch"
android:layout_width="wrap_content"
... |
41,259,138 | I am attempting to get multiple views to use the same controller. I've tried a couple of things so far, none seem to work. By "doesnt work" I mean the controller `MapController` isnt instantiated and the views cannot see the controller
**1**
```
$stateProvider.state(PageStateNames.COMPONENTS_LIVEMAP, {
url: "/com... | 2016/12/21 | [
"https://Stackoverflow.com/questions/41259138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/94278/"
] | all you need to do is just use a custom drawable as **track** of **switch**
this is the code for custom drawable:
```
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape android:shape="rectangle">
<corners
android:radius="@dimen/_40... | You create Thumb in drawable xml:
thumb.xml
```
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/ic_thumbselecter"/>
<item android:drawable="@drawable/ic_thumbselecter"/>
</selector>
```... |
41,259,138 | I am attempting to get multiple views to use the same controller. I've tried a couple of things so far, none seem to work. By "doesnt work" I mean the controller `MapController` isnt instantiated and the views cannot see the controller
**1**
```
$stateProvider.state(PageStateNames.COMPONENTS_LIVEMAP, {
url: "/com... | 2016/12/21 | [
"https://Stackoverflow.com/questions/41259138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/94278/"
] | all you need to do is just use a custom drawable as **track** of **switch**
this is the code for custom drawable:
```
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape android:shape="rectangle">
<corners
android:radius="@dimen/_40... | Change the thumb (circle on the switch) color by using:
```
android:thumbTint="@color/thumbColor"
```
On your colors.xml:
```
<color name="thumbColor">#FFFFFF</color>
``` |
55,318,985 | I am defining a function, standard\_deviation that consumes a list of numbers and returns a float representing their standard deviation. I need to use the len function to return None if the list has fewer than 2 elements.
This is what I have written:
```
SURVEY_RESULTS = [0, 1, 2, 0, 2, 3, 1, 1, 1, 2]
def standard_d... | 2019/03/23 | [
"https://Stackoverflow.com/questions/55318985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11140950/"
] | `sp_send_dbmail` only queues up the mail. Does not attempt to deliver, does not validate the email profile, cannot raise any of the errors you complain are missing.
Read here how to check the status of emails queued: [Check the Status of E-Mail Messages Sent With Database Mail](https://learn.microsoft.com/en-us/sql/re... | Your error is pretty clear in what is required. First off, create a profile and note down all the values that you will input on the wizard. [This](https://learn.microsoft.com/en-us/sql/relational-databases/database-mail/create-a-database-mail-profile?view=sql-server-2017) guide will help you create the profile correctl... |
60,213,218 | I've been searching through many forums and articles and did not find any successful way to define an interface for a function component in React that has required properties which are defined in defaultProps without throwing a "property is missing" Typescript error.
I've tried to set a default value directly in props... | 2020/02/13 | [
"https://Stackoverflow.com/questions/60213218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5334773/"
] | Since `color` is the only property on the `ButtonProps` type, you can use [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialt), which will set the properties of the type as optional:
```
const Button: FunctionComponent<Partial<ButtonProps>> = ({
// First way to define default value
... | Change your ButtonProps like this
```js
type ButtonProps = {
color?: "white" | "green";
};
```
Making the color props optional. And then you can initialize it with a default value, just like you are doing.
```js
const Button: FunctionComponent<ButtonProps> = ({
// First way to define default value
color = "gr... |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | This worked for me, modify your web.config file
Section 1.
```
<system.webServer>
<handlers>
<add name="MSCaptcha" verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</handlers>
</system.webServer>
```
Section 2.
```
<system.web>
<httpHandlers>
<add ver... | I had the same issue, I am using asp.net 5.0 vs2013
i changed my web.config as follows
```
<system.web>
<httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.captchaImageHandler, MSCaptcha"/>
</httpHandlers>
<system.webServer>
<handlers>
<add name="CAPTCHAHandler" verb="GET" p... |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | Got it...
Web.config is Case Sensitive.. So change the Capital "C" to small "c" in captchaImageHandler
Change: type="MSCaptcha.\**C*\*aptchaImageHandler, MSCaptcha"
To: type="MSCaptcha.\**c*\*aptchaImageHandler, MSCaptcha"
Hope this will work for you..
happy coding...:) | This path should be like this: `path="/CaptchaImage.axd"` in `system.webServer`.
```
<system.webServer>
<handlers>
<add name = " MSCaptcha" verb = "GET" path = "/CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler,MSCaptcha"/>
</handlers>
</system.webServer>
``` |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | Got it...
Web.config is Case Sensitive.. So change the Capital "C" to small "c" in captchaImageHandler
Change: type="MSCaptcha.\**C*\*aptchaImageHandler, MSCaptcha"
To: type="MSCaptcha.\**c*\*aptchaImageHandler, MSCaptcha"
Hope this will work for you..
happy coding...:) | If you're using Forms Authentication then it's probably a permissions issue, so try this:
<http://www.aspsnippets.com/post/2009/04/03/How-to-implement-Captcha-in-ASPNet.aspx#id_9f698584-ecb7-4fa1-99f5-797ee1a8f593> |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | This path should be like this: `path="/CaptchaImage.axd"` in `system.webServer`.
```
<system.webServer>
<handlers>
<add name = " MSCaptcha" verb = "GET" path = "/CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler,MSCaptcha"/>
</handlers>
</system.webServer>
``` | I had the same issue, I am using asp.net 5.0 vs2013
i changed my web.config as follows
```
<system.web>
<httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.captchaImageHandler, MSCaptcha"/>
</httpHandlers>
<system.webServer>
<handlers>
<add name="CAPTCHAHandler" verb="GET" p... |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | This worked for me, modify your web.config file
Section 1.
```
<system.webServer>
<handlers>
<add name="MSCaptcha" verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</handlers>
</system.webServer>
```
Section 2.
```
<system.web>
<httpHandlers>
<add ver... | I have solved my issue. As Web.config is case sensitive so be careful when you edit it. Here is the code of 2 sections.
```
<httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</httpHandlers>
```
And make sure that you put **forward slash(/)** for the **path... |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | This worked for me, modify your web.config file
Section 1.
```
<system.webServer>
<handlers>
<add name="MSCaptcha" verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</handlers>
</system.webServer>
```
Section 2.
```
<system.web>
<httpHandlers>
<add ver... | If you use form authentication then you may not be able to see the image. To resolve this add ,
<location path="CaptchaImage.axd">
<system.web>
<authorization>
<allow users="\*" />
</authorization>
</system.web>
</location>
this section in the web.config |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | If you use form authentication then you may not be able to see the image. To resolve this add ,
<location path="CaptchaImage.axd">
<system.web>
<authorization>
<allow users="\*" />
</authorization>
</system.web>
</location>
this section in the web.config | If you're using Forms Authentication then it's probably a permissions issue, so try this:
<http://www.aspsnippets.com/post/2009/04/03/How-to-implement-Captcha-in-ASPNet.aspx#id_9f698584-ecb7-4fa1-99f5-797ee1a8f593> |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | This path should be like this: `path="/CaptchaImage.axd"` in `system.webServer`.
```
<system.webServer>
<handlers>
<add name = " MSCaptcha" verb = "GET" path = "/CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler,MSCaptcha"/>
</handlers>
</system.webServer>
``` | If you're using Forms Authentication then it's probably a permissions issue, so try this:
<http://www.aspsnippets.com/post/2009/04/03/How-to-implement-Captcha-in-ASPNet.aspx#id_9f698584-ecb7-4fa1-99f5-797ee1a8f593> |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | This worked for me, modify your web.config file
Section 1.
```
<system.webServer>
<handlers>
<add name="MSCaptcha" verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</handlers>
</system.webServer>
```
Section 2.
```
<system.web>
<httpHandlers>
<add ver... | This path should be like this: `path="/CaptchaImage.axd"` in `system.webServer`.
```
<system.webServer>
<handlers>
<add name = " MSCaptcha" verb = "GET" path = "/CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler,MSCaptcha"/>
</handlers>
</system.webServer>
``` |
1,548,153 | Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.
// what my web.config says:
```
<handlers>
<add name="MSCaptchaImage"
path="CaptchaImage.axd"
verb="GET"
type="MSCaptcha.CaptchaImageHandler, MSC... | 2009/10/10 | [
"https://Stackoverflow.com/questions/1548153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450681/"
] | If you use form authentication then you may not be able to see the image. To resolve this add ,
<location path="CaptchaImage.axd">
<system.web>
<authorization>
<allow users="\*" />
</authorization>
</system.web>
</location>
this section in the web.config | I have solved my issue. As Web.config is case sensitive so be careful when you edit it. Here is the code of 2 sections.
```
<httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
</httpHandlers>
```
And make sure that you put **forward slash(/)** for the **path... |
16,780,053 | I have a method that takes an array as an argument, and returns true or false depending on the presence of a particular value.
In this scenario how many test cases should be written?
I think 3:
1. If the value is present
2. If the value is not present
3. If the array is empty (could be covered by 2 though?? ) | 2013/05/27 | [
"https://Stackoverflow.com/questions/16780053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1189880/"
] | I can think of 3 test cases:
1. If the array is not empty (or not null)
2. If the value is valid or not (I can pass an object where it expects a string :) )
3. If the value is present in array | It is the code of the function you want to test, so you cannot tell how many test cases are useful. Think again what your code does, how will the value be found?
An example: If your code tries to find a value with a certain name, and you make a string comparison, then think of the problems that can arise with string c... |
35,926,509 | I'm using MVC Razor's @Html.DropDownList to generate dropdown list.
```
IEnumerable<SelectListItem> cSfRR = db.TABLE.Where(m => m.cRoleName == dbrole)
.Select(c => new SelectListItem
{
Value = c.ID,
Text = c.Name
});
ViewBag.cSfRR = cSfRR;
```
This... | 2016/03/10 | [
"https://Stackoverflow.com/questions/35926509",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1803051/"
] | I don't promote the use of `ViewBag`, but this should work:
```
IEnumerable<SelectListItem> cSfRR = db.TABLE.Where(m => m.cRoleName == dbrole)
.Select(c => new SelectListItem
{
Value = c.ID,
Text = c.Name + (c.ACTIVITY == "N" ? " - NOT ACTIVE" : string.empty)
});
ViewBag.cSfRR = cSf... | You could try something like this:
```
IEnumerable<SelectListItem> cSfRR = db.TABLE.Where(m => m.cRoleName == dbrole)
.Select(c => new SelectListItem
{
Value = c.ID,
Text = c.Name + (c.Activity == "N") ? " - Not Active " : "";
});
View... |
35,926,509 | I'm using MVC Razor's @Html.DropDownList to generate dropdown list.
```
IEnumerable<SelectListItem> cSfRR = db.TABLE.Where(m => m.cRoleName == dbrole)
.Select(c => new SelectListItem
{
Value = c.ID,
Text = c.Name
});
ViewBag.cSfRR = cSfRR;
```
This... | 2016/03/10 | [
"https://Stackoverflow.com/questions/35926509",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1803051/"
] | You can use [conditional operator - ?: Operator](https://msdn.microsoft.com/en-us/library/ty67wk28.aspx)
```
IEnumerable<SelectListItem> cSfRR = db.TABLE.Where(m => m.cRoleName == dbrole)
.Select(c => new SelectListItem
{
Value = c.ID,
Text = c.Name + (c.Activity == "N" ? " - NOT ACTIVE" : "")
});
ViewBag.cSf... | You could try something like this:
```
IEnumerable<SelectListItem> cSfRR = db.TABLE.Where(m => m.cRoleName == dbrole)
.Select(c => new SelectListItem
{
Value = c.ID,
Text = c.Name + (c.Activity == "N") ? " - Not Active " : "";
});
View... |
4,639,166 | Consider the matrix given as $$A=\begin{bmatrix}a\_0 & a\_2 & a\_1\\ a\_1 & a\_0 & a\_2\\ a\_2 & a\_1 & a\_0\end{bmatrix}$$
Write down a formual for $A^n$ for $n\in\mathbb{N}$.
$$$$
**My attempt:** The first that comes to mind is to diagonalize it and hence find the formual for $A^n$, but that is very messy, so I tri... | 2023/02/14 | [
"https://math.stackexchange.com/questions/4639166",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/872144/"
] | $A$ is a so-called circulant matrix, which can be denoted as ${\rm circ}(a\_0,a\_1,a\_2)$. Let $\alpha = \exp{2\pi i/3}$; $\alpha$ is a 3rd root of unity, and satisfies $\alpha^3 = 1$ and $1 + \alpha + \alpha^2 = 0$ (as does its conjugate). By the general theory of circulants, we can diagonalize $A$ as follows:
$$ A = ... | I think you've reached a decent result and by just using the multinomial theorem you can obtain a generalized solution.
$A=a\_0I+ a\_1U + a\_2 U^2 \\
A^n = (a\_0I+ a\_1U + a\_2 U^2)^n\\$
Then the coeffecients of $U^3$, $U^2$ and $U^1$ are determined using the multinomial theorem and just plugged back into the result ... |
4,639,166 | Consider the matrix given as $$A=\begin{bmatrix}a\_0 & a\_2 & a\_1\\ a\_1 & a\_0 & a\_2\\ a\_2 & a\_1 & a\_0\end{bmatrix}$$
Write down a formual for $A^n$ for $n\in\mathbb{N}$.
$$$$
**My attempt:** The first that comes to mind is to diagonalize it and hence find the formual for $A^n$, but that is very messy, so I tri... | 2023/02/14 | [
"https://math.stackexchange.com/questions/4639166",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/872144/"
] | Circulant matrices are related to Fourier transform.
Consider the DFT matrix of length $N=3$
$$
\mathbf{W}
=
\begin{pmatrix}
1 & 1 & 1 \\
1 & \Omega & \Omega^2 \\
1 & \Omega^2 & \Omega^4
\end{pmatrix}
$$
where
$\Omega
= e^{-2\pi i/N}$.
Consider now the DFT of the signal
$$
\mathbf{y}=
\mathbf{W}
\begin{pmatrix}
a\_0... | I think you've reached a decent result and by just using the multinomial theorem you can obtain a generalized solution.
$A=a\_0I+ a\_1U + a\_2 U^2 \\
A^n = (a\_0I+ a\_1U + a\_2 U^2)^n\\$
Then the coeffecients of $U^3$, $U^2$ and $U^1$ are determined using the multinomial theorem and just plugged back into the result ... |
17,958,173 | Omniture/SiteCatalyst's code is integrated onto the webpage to collect the analytics in our firm.
Current process: SiteCatalyst id deployed by pasting HTML code onto each page of the website. This HTML code contains variables and other identifiers that facilitate the data collection process. These variables may be dyn... | 2013/07/30 | [
"https://Stackoverflow.com/questions/17958173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2631288/"
] | There are a few different ways to automate testing. I've been looking into it lately myself. So far I'm looking into Selenium, Zombiejs and Phantomjs. You can search for "headless testing" which basically let's run code as a browser and test conditions on the page you visit.
Here's a good place to start <https://githu... | we usually do this using a more customizable proxy application called Fiddler which we use to capture all the traffic sent from our brower.
Fiddler has an internal scripting language that let you make any type of check on the data passing in the Adobe Analytics call and highlight in the interface any bad call. |
86,303 | I clipped a concrete block at dead slow speed. It bent my rear bumper.
This is the view of the full bumper now. You can see the "knee" I put in it.
[](https://i.stack.imgur.com/sFeOA.jpg)
The bumper itself has a piece of angle iron running through the center to giv... | 2021/12/13 | [
"https://mechanics.stackexchange.com/questions/86303",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/61103/"
] | I think it is very unlikely that you can straighten the steel.
I would carefully cut the steel out from the back, get some new steel, weld the brackets back on if necessary, then fibreglass it back in place.
That is what I would do if a second hand replacement is not readily available. It would be a lot easier to rep... | You shouldn't attempt to repair a bumper. You will not be able to restore the original performance correctly - remember that its job is to *absorb impact* in order to protect the vehicle (including occupants) and environment (including other road users).
If you make it too stiff or too soft, you have compromised the s... |
25,105,541 | I'm writing a program that will read a text file containing 5,163 names. (text file can be seen [here](http://pastebin.com/BAKTJKy6))
Then I want to store the names into a list called 'names', afterwards, I sort the list based on how many letters the name contains, shorter names are at the start of the list and the lo... | 2014/08/03 | [
"https://Stackoverflow.com/questions/25105541",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2412444/"
] | You have simply hit the recursion limits. Your list of names is too large for Python's limited recursion capabilities. Your Quicksort works just fine otherwise.
You *could* raise the recursion limit by setting the limit higher with [`sys.setrecursionlimit()`](https://docs.python.org/2/library/sys.html#sys.setrecursion... | You exceed python default recursion size. The default recursion limit is 1000. You can increase recursion limit but it is not recommended. Here is how to do
```
import sys
sys.setrecursionlimit(1500)
```
**Suggestion**
My suggestion is use [numpy.argsort()](http://docs.scipy.org/doc/numpy-1.10.1/reference/generat... |
22,524,403 | I am new to RubyOnRails and SoundCloud.
I want to integrate SoundCloud API in my ruby on rails application.
For this I have registered on [SoundCloud](http://developers.soundcloud.com/) And I got the ClientID and ClientSecret. Also I have [downloaded the SDK](https://github.com/soundcloud/soundcloud-ruby).
Now I hav... | 2014/03/20 | [
"https://Stackoverflow.com/questions/22524403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1147080/"
] | There's a typo in the soundcloud github page change the line:
```
client = SoundCloud.new(:client_id => 'my-client-id')
```
to
```
client = Soundcloud.new(:client_id => 'my-client-id')
```
[notice the lowercase c in Soundcloud] | Also you are going to need your client secret for SoundCloud's API to verify you.
Perhaps put client method and in it have client = SoundCloud.new(your-client-id,your-secret-key-your-redirect-uri) in a controller or helper with your client\_id, client\_secret, and redirect uri values protected in a .env file.
I think... |
17,208,227 | I'm trying to export a gridview to pdf with package iTextSharp.
I'm doing it in my .aspx files :
```
<form id="formOptions" runat="server">
[...]
<asp:GridView ID="gvReportingStockComp" runat="server" AutoGenerateColumns="false" Visible="true">
<Columns>
... | 2013/06/20 | [
"https://Stackoverflow.com/questions/17208227",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2265252/"
] | Add below code to avoid runat="server" error.
```
public override void VerifyRenderingInServerForm(Control control)
{
/* Verifies that the control is rendered */
}
```
You may want to disable paging so that it exports all rows of Gridview to PDF.
Add below code before gridview's rendercontrol method.
```
gvRe... | Add the `Rendering` Function after your PDF code
```
public override void VerifyRenderingInServerForm(Control control)
{
// verifies the control is rendered here
}
``` |
6,359,654 | I need to use 4 dimensional matrix as an accumulator for voting 4 parameters. every parameters vary in the range of 1~300. for that, I define Acc = zeros(300,300,300,300) in MATLAB. and somewhere for example, I used:
```
Acc(4,10,120,78)=Acc(4,10,120,78)+1
```
however, MATLAB says some error happened because of mem... | 2011/06/15 | [
"https://Stackoverflow.com/questions/6359654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/787978/"
] | As @Rasman mentioned, you probably want to use a sparse representation of the matrix Acc.
Unfortunately, the `sparse` function is geared toward 2D matrices, not arbitrary n-D.
But that's ok, because we can take advantage of `sub2ind` and *linear indexing* to go back and forth to 4D.
```
Dims = [300, 300, 300, 300]; ... | See [Avoiding 'Out of Memory' Errors](http://www.mathworks.com/support/tech-notes/1100/1107.html)
Your statement would require more than 4 GB of RAM (Around 16 Gigs, to be specific).
>
> Solutions to 'Out of Memory' problems
> fall into two main categories:
>
>
> * Maximizing the memory available to
> MATLAB (i.... |
6,359,654 | I need to use 4 dimensional matrix as an accumulator for voting 4 parameters. every parameters vary in the range of 1~300. for that, I define Acc = zeros(300,300,300,300) in MATLAB. and somewhere for example, I used:
```
Acc(4,10,120,78)=Acc(4,10,120,78)+1
```
however, MATLAB says some error happened because of mem... | 2011/06/15 | [
"https://Stackoverflow.com/questions/6359654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/787978/"
] | edit: see lambdageek for the exact same answer with a bit more elegance.
The other answers are helping to guide you to use a sparse mat instead of your current dense solution. This is made a little more difficult since current matlab doesn't support N-dimensional sparse arrays. One implementation to do this is
replac... | See [Avoiding 'Out of Memory' Errors](http://www.mathworks.com/support/tech-notes/1100/1107.html)
Your statement would require more than 4 GB of RAM (Around 16 Gigs, to be specific).
>
> Solutions to 'Out of Memory' problems
> fall into two main categories:
>
>
> * Maximizing the memory available to
> MATLAB (i.... |
631,108 | Prove by induction that for $q\neq1$, we have $1+q+...+q^{n-1}=\dfrac{q^{n}-1}{q-1}, \forall n\in \mathbb N $
-------------------------------------------------------------------------------------------------------------
Let $P(n)$ be the proposition we want to prove.
For $P(1)$ we have:
$q^0=\dfrac{q^1-1}{q-1}\implie... | 2014/01/08 | [
"https://math.stackexchange.com/questions/631108",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/116309/"
] | $$
\frac{q^k-1}{q-1}+q^k=\frac{q^{k+1}-1}{q-1}
$$ | Assume it for $k$ and we show the formula for $k+1$:
$1+q+...+q^{k}+q^{k+1}=\frac{q^{k+1}-1}{q-1}+q^{k+1}=\frac{q^{k+1}-1+q^{k+1}(q-1)}{q-1}=\frac{q^{k+1}-1+q^{k+2}-q^{k+1}}{q-1}=\frac{q^{k+1}-1}{q-1}$ |
631,108 | Prove by induction that for $q\neq1$, we have $1+q+...+q^{n-1}=\dfrac{q^{n}-1}{q-1}, \forall n\in \mathbb N $
-------------------------------------------------------------------------------------------------------------
Let $P(n)$ be the proposition we want to prove.
For $P(1)$ we have:
$q^0=\dfrac{q^1-1}{q-1}\implie... | 2014/01/08 | [
"https://math.stackexchange.com/questions/631108",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/116309/"
] | $$
\frac{q^k-1}{q-1}+q^k=\frac{q^{k+1}-1}{q-1}
$$ | Note that $\frac{q^k-1}{q-1} + q^k = \frac{q^k-1 + (q-1)q^k}{q-1} = \frac{q^{k+1} + q^k - q^k - 1}{q-1} = \frac{q^{k+1}-1}{q-1}$ |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | Of course! You can use the same keystore file as many times you want. It's always better to use the same keystore file for all the applications you develop. That will help if you want to update or modify the application. At that time you need to sign your application with the same key. | **Recent Update**
If you want to enrol in **App signing by google** you have to use new different key to sign your apk or bundle otherwise after uploading google console will give you error message saying
>
> You uploaded an APK or Android App Bundle that is signed with a key
> that is also used to sign APKs that ar... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | The official documentation tells us:
>
> In general, the recommended strategy for all developers is to sign all of your applications with the same certificate, throughout the expected lifespan of your applications. There are several reasons why you should do so ...
>
>
>
<https://developer.android.com/studio/publ... | I want to add some clarification here, because this question and the answers provided lead to confusion for me. It is crucial to understand what a keystore actually is.
A keystore is just a means to securely store the public/private key pair which is used to sign your Android apks. So yes, you can use the same *keysto... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | I'll make a counter argument to the consensus answer so far.
I agree that for most app authors most of the time, sharing the same keystore/certificate/password between your apps will work fine. The critical thing is to use "[the same certificate throughout the expected lifespan of your applications](http://developer.... | I do sign all my apps using the same certificate (keystore). This gives an advantage if i change my mind and want my apps to share their data.
As you might know Android identifies each app with an UID. If all your apps are signed by the same certificate you can request android to assign same user id more than one app ... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | I want to add some clarification here, because this question and the answers provided lead to confusion for me. It is crucial to understand what a keystore actually is.
A keystore is just a means to securely store the public/private key pair which is used to sign your Android apks. So yes, you can use the same *keysto... | I do sign all my apps using the same certificate (keystore). This gives an advantage if i change my mind and want my apps to share their data.
As you might know Android identifies each app with an UID. If all your apps are signed by the same certificate you can request android to assign same user id more than one app ... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | I'll make a counter argument to the consensus answer so far.
I agree that for most app authors most of the time, sharing the same keystore/certificate/password between your apps will work fine. The critical thing is to use "[the same certificate throughout the expected lifespan of your applications](http://developer.... | **Recent Update**
If you want to enrol in **App signing by google** you have to use new different key to sign your apk or bundle otherwise after uploading google console will give you error message saying
>
> You uploaded an APK or Android App Bundle that is signed with a key
> that is also used to sign APKs that ar... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | You can use that `keystore` for any number of applications.
No need to generate a new keystore. | I want to add some clarification here, because this question and the answers provided lead to confusion for me. It is crucial to understand what a keystore actually is.
A keystore is just a means to securely store the public/private key pair which is used to sign your Android apks. So yes, you can use the same *keysto... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | The official documentation tells us:
>
> In general, the recommended strategy for all developers is to sign all of your applications with the same certificate, throughout the expected lifespan of your applications. There are several reasons why you should do so ...
>
>
>
<https://developer.android.com/studio/publ... | **Recent Update**
If you want to enrol in **App signing by google** you have to use new different key to sign your apk or bundle otherwise after uploading google console will give you error message saying
>
> You uploaded an APK or Android App Bundle that is signed with a key
> that is also used to sign APKs that ar... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | You can use that `keystore` for any number of applications.
No need to generate a new keystore. | I'll make a counter argument to the consensus answer so far.
I agree that for most app authors most of the time, sharing the same keystore/certificate/password between your apps will work fine. The critical thing is to use "[the same certificate throughout the expected lifespan of your applications](http://developer.... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | You can use that `keystore` for any number of applications.
No need to generate a new keystore. | The official documentation tells us:
>
> In general, the recommended strategy for all developers is to sign all of your applications with the same certificate, throughout the expected lifespan of your applications. There are several reasons why you should do so ...
>
>
>
<https://developer.android.com/studio/publ... |
7,685,458 | I have to upload a new application, It's just the design that's a little different. Yesterday I generated the keystore file to sign application. Can I use the same? | 2011/10/07 | [
"https://Stackoverflow.com/questions/7685458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/806972/"
] | You can use that `keystore` for any number of applications.
No need to generate a new keystore. | Of course! You can use the same keystore file as many times you want. It's always better to use the same keystore file for all the applications you develop. That will help if you want to update or modify the application. At that time you need to sign your application with the same key. |
38,265,987 | i am facing problem (i really frustrated), while i connecting the io.on function. i am using express,ioredis and socket.io. redis working properly but socket.io is not working. it is'nt working.please help.
```
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(ser... | 2016/07/08 | [
"https://Stackoverflow.com/questions/38265987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6502612/"
] | Server side
```
var express = require('express');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server); // it was require('socket.io')(server);
server.listen(3000);
```
Client side
```
io.sockets.on('connection', function(socket){
console.log("new cl... | const { Server } = require("socket.io")
const io = new Server(server) |
17,481,866 | I must be missing something really obvious here I think, but what I am trying to do is use MySQL 5.6 and return values through memcache
So I have set up MYSQL to use the memcache plugin, set up the details in the innodb\_memcache.containers table
I now have two items in that table, the default ones entered by MySQL a... | 2013/07/05 | [
"https://Stackoverflow.com/questions/17481866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585958/"
] | From: <http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-intro.html>
>
> Namespaces: memcached is like a single giant directory, where to keep files from conflicting with each other you might give them elaborate names with prefixes and suffixes. The integrated InnoDB / memcached server lets you use these same n... | ```
<?php
$memc = new Memcache;
$memc->addServer('localhost','11211');
if(empty($_POST['film'])) {
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Memcache Lookup</title>
</head>
... |
17,481,866 | I must be missing something really obvious here I think, but what I am trying to do is use MySQL 5.6 and return values through memcache
So I have set up MYSQL to use the memcache plugin, set up the details in the innodb\_memcache.containers table
I now have two items in that table, the default ones entered by MySQL a... | 2013/07/05 | [
"https://Stackoverflow.com/questions/17481866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585958/"
] | The table name (`table_id` in `@@table_id`) must be the value from your mappings (`innodb_memcache.containers`), not the actual table name, if that varies.
And if you table name in mappings is `mycode`, then the resulting query through *memcache* should look like this:
```
$table = 'mycode';
$key = '123456';
$memca... | ```
<?php
$memc = new Memcache;
$memc->addServer('localhost','11211');
if(empty($_POST['film'])) {
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Memcache Lookup</title>
</head>
... |
17,481,866 | I must be missing something really obvious here I think, but what I am trying to do is use MySQL 5.6 and return values through memcache
So I have set up MYSQL to use the memcache plugin, set up the details in the innodb\_memcache.containers table
I now have two items in that table, the default ones entered by MySQL a... | 2013/07/05 | [
"https://Stackoverflow.com/questions/17481866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585958/"
] | If you still have the default tables, you can try using telnet.
Note: This was used on an AWS RDS instance with memcached, it *should* be the same for any MySQL implementation using memcached, but I'm not sure.
```
telnet localhost 11211
stats
#=> should return a long list of stats including pid, uptime, etc
get AA
... | ```
<?php
$memc = new Memcache;
$memc->addServer('localhost','11211');
if(empty($_POST['film'])) {
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Memcache Lookup</title>
</head>
... |
17,481,866 | I must be missing something really obvious here I think, but what I am trying to do is use MySQL 5.6 and return values through memcache
So I have set up MYSQL to use the memcache plugin, set up the details in the innodb\_memcache.containers table
I now have two items in that table, the default ones entered by MySQL a... | 2013/07/05 | [
"https://Stackoverflow.com/questions/17481866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585958/"
] | The table name (`table_id` in `@@table_id`) must be the value from your mappings (`innodb_memcache.containers`), not the actual table name, if that varies.
And if you table name in mappings is `mycode`, then the resulting query through *memcache* should look like this:
```
$table = 'mycode';
$key = '123456';
$memca... | From: <http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-intro.html>
>
> Namespaces: memcached is like a single giant directory, where to keep files from conflicting with each other you might give them elaborate names with prefixes and suffixes. The integrated InnoDB / memcached server lets you use these same n... |
17,481,866 | I must be missing something really obvious here I think, but what I am trying to do is use MySQL 5.6 and return values through memcache
So I have set up MYSQL to use the memcache plugin, set up the details in the innodb\_memcache.containers table
I now have two items in that table, the default ones entered by MySQL a... | 2013/07/05 | [
"https://Stackoverflow.com/questions/17481866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585958/"
] | From: <http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached-intro.html>
>
> Namespaces: memcached is like a single giant directory, where to keep files from conflicting with each other you might give them elaborate names with prefixes and suffixes. The integrated InnoDB / memcached server lets you use these same n... | If you still have the default tables, you can try using telnet.
Note: This was used on an AWS RDS instance with memcached, it *should* be the same for any MySQL implementation using memcached, but I'm not sure.
```
telnet localhost 11211
stats
#=> should return a long list of stats including pid, uptime, etc
get AA
... |
17,481,866 | I must be missing something really obvious here I think, but what I am trying to do is use MySQL 5.6 and return values through memcache
So I have set up MYSQL to use the memcache plugin, set up the details in the innodb\_memcache.containers table
I now have two items in that table, the default ones entered by MySQL a... | 2013/07/05 | [
"https://Stackoverflow.com/questions/17481866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585958/"
] | The table name (`table_id` in `@@table_id`) must be the value from your mappings (`innodb_memcache.containers`), not the actual table name, if that varies.
And if you table name in mappings is `mycode`, then the resulting query through *memcache* should look like this:
```
$table = 'mycode';
$key = '123456';
$memca... | If you still have the default tables, you can try using telnet.
Note: This was used on an AWS RDS instance with memcached, it *should* be the same for any MySQL implementation using memcached, but I'm not sure.
```
telnet localhost 11211
stats
#=> should return a long list of stats including pid, uptime, etc
get AA
... |
3,499,351 | I have four dice: three red, one blue. I roll all four.
1) How do I find the formula to establish the probability of the blue one getting the highest result (ties included: if all four rolled 6, then the blue one still got the highest result)?
2) How do I generalize the formula above for a group of four dice, each on... | 2020/01/06 | [
"https://math.stackexchange.com/questions/3499351",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/457310/"
] | For 1), you didn't specify the numbers of faces, but I take it from $2)$ that you intended them all to have the same number of faces in $1)$. Let $n$ denote this number of faces. Then the probability for the other three dice to show at most the value shown by the blue die is
$$
\frac1n\sum\_{k=1}^n\frac{k^3}{n^3}=\fra... | For (1): Treat the dice as being distinguishable (including the three red dice).
Then count favorable outcomes conditioning on the value of the blue die:
If the blue die is $1$, there is one favorable outcome: Each of the red dice is $1$.
If the blue die is $2$ there are eight favorable outcomes. Each of the red di... |
22,573,953 | I have a specific requirement to find a pattern and replace the value of matching group(2) in the original string by retaining the pattern(delimiter), I am using the pattern
```
:(\w+)[:\|]+(.*)
```
With this pattern it parse the values correctly but i am not able to replace the value of group(2). For example i have... | 2014/03/22 | [
"https://Stackoverflow.com/questions/22573953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3448704/"
] | Use this one:
```
input = input.replaceAll("(:20):(\\d+)(?!\\d)", "$1:1234");
```
Here `(\\d+)(?!\\d)` is checking whether the digits `after the :20:` are not followed by a digit or not.
However, if you want to replace only the `:20:9405601140` there here it is much simple:
```
input = input.replaceAll(":20:940560... | How about doing it the other way around.
Create a pattern like this `(:(\w+)[:\|]+)(.*)` then for each row output the first group and your replacement (instead of group 2).
Here is an working example <http://ideone.com/9TkGx6> |
22,573,953 | I have a specific requirement to find a pattern and replace the value of matching group(2) in the original string by retaining the pattern(delimiter), I am using the pattern
```
:(\w+)[:\|]+(.*)
```
With this pattern it parse the values correctly but i am not able to replace the value of group(2). For example i have... | 2014/03/22 | [
"https://Stackoverflow.com/questions/22573953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3448704/"
] | Use this one:
```
input = input.replaceAll("(:20):(\\d+)(?!\\d)", "$1:1234");
```
Here `(\\d+)(?!\\d)` is checking whether the digits `after the :20:` are not followed by a digit or not.
However, if you want to replace only the `:20:9405601140` there here it is much simple:
```
input = input.replaceAll(":20:940560... | You can do this by capturing what you want to keep, instead of what you want to replace, and then using a backreference (`$1`, for the first capturing group) in the replacement string to include it in the final result.
Something like:
```
string.replaceAll("(:\\w+[:\\|]+).*", "$11234")
```
To perform the replaceme... |
22,573,953 | I have a specific requirement to find a pattern and replace the value of matching group(2) in the original string by retaining the pattern(delimiter), I am using the pattern
```
:(\w+)[:\|]+(.*)
```
With this pattern it parse the values correctly but i am not able to replace the value of group(2). For example i have... | 2014/03/22 | [
"https://Stackoverflow.com/questions/22573953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3448704/"
] | Use this one:
```
input = input.replaceAll("(:20):(\\d+)(?!\\d)", "$1:1234");
```
Here `(\\d+)(?!\\d)` is checking whether the digits `after the :20:` are not followed by a digit or not.
However, if you want to replace only the `:20:9405601140` there here it is much simple:
```
input = input.replaceAll(":20:940560... | try this
```
s = s.replaceAll("\\A(?::[:\\|])\\w+", "1234");
``` |
14,171 | * What [blessing](http://www.jewishvirtuallibrary.org/jsource/Judaism/Brachot.html) would one make on leaves from [woody] trees that are routinely eaten? Is it ha'eitz, because they came from a tree? Is it ha-adama, because they're not "fruit" but are vegetative? Is it shehakol, for some other reason?
* Are there any e... | 2012/02/12 | [
"https://judaism.stackexchange.com/questions/14171",
"https://judaism.stackexchange.com",
"https://judaism.stackexchange.com/users/2/"
] | The [Shulchan Aruch OC 202:6](http://hebrewbooks.org/pdfpager.aspx?req=49624&st=&pgnum=208) discusses the bracha on a [caper bush](http://en.wikipedia.org/wiki/Caper)[1]. The caper has multiple edible parts including leaves and berries. The Shulchan Aruch says the berries get a HaEtz because they are the main fruit ("I... | According to the shulchan aruch harav capers are hoadomo too, being that they are planted for their leaves too. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.