qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
Inspired by Minh's comment I've been able to make this work for spyder 3.8 by doing the following. Find out the ~ directory using ``` import os; os.path.expanduser('~') ``` (see remark ofJustin Harris) Then add a file to the ~ directory called `.pycodestyle` containing: ``` [pycodestyle] max-line-length = 99 ``` ...
If you are user "myname" using conda, in environment "myenv" try to edit the file: /home/myname/miniconda3/envs/myenv/lib/python3.7/site-packages/pycodestyle.py and change MAX\_LINE\_LENGTH=79 to MAX\_LINE\_LENGTH=100, for example. Worked for my Spyder 3.3.6.
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
According to the link cited by @Werner: <http://pep8.readthedocs.org/en/latest/intro.html#configuration> what you need to do is to create a file called `~/.config/pep8` (On Linux/Mac) or `~/.pep8` (on Windows), and add these lines to it: ``` [pep8] max-line-length = 99 ``` I tested it in Spyder and it works as exp...
using the Spyder 4.0.0.dev0 went to my ~/.config/spyder.ini, ensured that my spyder application was not running change the dictionary value 'maxLineLength': 100 from 'maxLineLength': 79. Started my app and it worked now if you edit the file while your spyder app is running upon shutting down it will overwrite what eve...
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
According to the link cited by @Werner: <http://pep8.readthedocs.org/en/latest/intro.html#configuration> what you need to do is to create a file called `~/.config/pep8` (On Linux/Mac) or `~/.pep8` (on Windows), and add these lines to it: ``` [pep8] max-line-length = 99 ``` I tested it in Spyder and it works as exp...
References to "pep8" are obsolete. The package has been renamed to "pycodestyle".
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
The tox.ini with a pep8 section or a setup.cfg at the project level should do. <http://pep8.readthedocs.org/en/latest/intro.html#configuration>
using the Spyder 4.0.0.dev0 went to my ~/.config/spyder.ini, ensured that my spyder application was not running change the dictionary value 'maxLineLength': 100 from 'maxLineLength': 79. Started my app and it worked now if you edit the file while your spyder app is running upon shutting down it will overwrite what eve...
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
If you are user "myname" using conda, in environment "myenv" try to edit the file: /home/myname/miniconda3/envs/myenv/lib/python3.7/site-packages/pycodestyle.py and change MAX\_LINE\_LENGTH=79 to MAX\_LINE\_LENGTH=100, for example. Worked for my Spyder 3.3.6.
The tox.ini with a pep8 section or a setup.cfg at the project level should do. <http://pep8.readthedocs.org/en/latest/intro.html#configuration>
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
According to the link cited by @Werner: <http://pep8.readthedocs.org/en/latest/intro.html#configuration> what you need to do is to create a file called `~/.config/pep8` (On Linux/Mac) or `~/.pep8` (on Windows), and add these lines to it: ``` [pep8] max-line-length = 99 ``` I tested it in Spyder and it works as exp...
The tox.ini with a pep8 section or a setup.cfg at the project level should do. <http://pep8.readthedocs.org/en/latest/intro.html#configuration>
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
References to "pep8" are obsolete. The package has been renamed to "pycodestyle".
The tox.ini with a pep8 section or a setup.cfg at the project level should do. <http://pep8.readthedocs.org/en/latest/intro.html#configuration>
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
According to the link cited by @Werner: <http://pep8.readthedocs.org/en/latest/intro.html#configuration> what you need to do is to create a file called `~/.config/pep8` (On Linux/Mac) or `~/.pep8` (on Windows), and add these lines to it: ``` [pep8] max-line-length = 99 ``` I tested it in Spyder and it works as exp...
If you are user "myname" using conda, in environment "myenv" try to edit the file: /home/myname/miniconda3/envs/myenv/lib/python3.7/site-packages/pycodestyle.py and change MAX\_LINE\_LENGTH=79 to MAX\_LINE\_LENGTH=100, for example. Worked for my Spyder 3.3.6.
26,426,689
I am using Spyder 2.3.1 and python(x, y). In the preferences of Spyder you can activate "Style analysis". This is quite nice, but I want to increase the max. tolerable line length. The standard setting for PEP8 is 79 characters. This can be changed through a setup.cfg with the content: ``` [pep8] max-line-length = 9...
2014/10/17
[ "https://Stackoverflow.com/questions/26426689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4153871/" ]
Inspired by Minh's comment I've been able to make this work for spyder 3.8 by doing the following. Find out the ~ directory using ``` import os; os.path.expanduser('~') ``` (see remark ofJustin Harris) Then add a file to the ~ directory called `.pycodestyle` containing: ``` [pycodestyle] max-line-length = 99 ``` ...
The tox.ini with a pep8 section or a setup.cfg at the project level should do. <http://pep8.readthedocs.org/en/latest/intro.html#configuration>
57,733,357
I need to merge two different datasets. In one dataset, there is a variable called “Dyadpair” which contains a number that represents two different country codes. For example, the Dyadpair “2365” represents the United States (2) and Russia (365). In my second dataset, there is not a “Dyadpair” variable…but I need to c...
2019/08/30
[ "https://Stackoverflow.com/questions/57733357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12001273/" ]
Example data: ```r d <- data.frame("countrycode1" = 1:5, "countrycode2" = sample(1:5)) ``` Solution (iterate through each row, sort the country codes, and paste them together): ```r d$newcodes <- apply(d, 1, function(x) paste(sort(x), collapse = "")) ``` **Update to fit your specific data** ```r ...
One way to create either directed or undirected dyads would be via merges: ``` library(data.table) d <- data.table("countrycode1" = LETTERS[1:5]) # create a "count" variable d[, n:= 1:nrow(d)] # create a help variable to merge on d[, merge_var := "X"] head(d) # countrycode1 n merge_var # 1: A 1 X...
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
It was obviously a case of Hulk having the last laugh, so to speak and was intended to make people smile or laugh. I highly doubt that there is any "official" reasoning available for such a minor thing which is clearly intended for the viewers to make what they will of it, with the implication that it was in relation ...
I think the Hulk is a bit of an a-hole in the movie, not out of character for him or anyone who knows their power is unmatched. He undoubtedly remembers their battle in S.H.I.E.L.D.s' carrier and remembers he could not lift Mjolnir, Thor's hammer. He has a bit of contempt for demigods. Something Loki found out first-ha...
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
Although I have nothing to back this up, I am a writer and one of my characters parallels the Hulk fairly closely. In my mind, there's little doubt why he did it. He loves to hit things, he just got through having an aggressive fight, Thor is still upright, and he knows that Thor won't be hurt by it. It's like punching...
Official wording? The answer is because Hulk is chaotic and unpredictable and loves to punch things. He's always been that way.
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
It was obviously a case of Hulk having the last laugh, so to speak and was intended to make people smile or laugh. I highly doubt that there is any "official" reasoning available for such a minor thing which is clearly intended for the viewers to make what they will of it, with the implication that it was in relation ...
Official wording? The answer is because Hulk is chaotic and unpredictable and loves to punch things. He's always been that way.
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
It was obviously a case of Hulk having the last laugh, so to speak and was intended to make people smile or laugh. I highly doubt that there is any "official" reasoning available for such a minor thing which is clearly intended for the viewers to make what they will of it, with the implication that it was in relation ...
That's just a bit of character development actually. They want people to like Hulk so they're showing that he actually has a personality and a sense of humor (though a wicked one) and can show respect to a compatriot, in his own unique way of course. Gleefully arm-punching a buddy he's learned to respect and just fough...
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
Official wording? The answer is because Hulk is chaotic and unpredictable and loves to punch things. He's always been that way.
Hulk hates competition, and was still angry of the fact that Thor stood up to him.
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
I think the Hulk is a bit of an a-hole in the movie, not out of character for him or anyone who knows their power is unmatched. He undoubtedly remembers their battle in S.H.I.E.L.D.s' carrier and remembers he could not lift Mjolnir, Thor's hammer. He has a bit of contempt for demigods. Something Loki found out first-ha...
Hulk hates competition, and was still angry of the fact that Thor stood up to him.
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
That's just a bit of character development actually. They want people to like Hulk so they're showing that he actually has a personality and a sense of humor (though a wicked one) and can show respect to a compatriot, in his own unique way of course. Gleefully arm-punching a buddy he's learned to respect and just fough...
Hulk hates competition, and was still angry of the fact that Thor stood up to him.
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
Although I have nothing to back this up, I am a writer and one of my characters parallels the Hulk fairly closely. In my mind, there's little doubt why he did it. He loves to hit things, he just got through having an aggressive fight, Thor is still upright, and he knows that Thor won't be hurt by it. It's like punching...
It was obviously a case of Hulk having the last laugh, so to speak and was intended to make people smile or laugh. I highly doubt that there is any "official" reasoning available for such a minor thing which is clearly intended for the viewers to make what they will of it, with the implication that it was in relation ...
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
Although I have nothing to back this up, I am a writer and one of my characters parallels the Hulk fairly closely. In my mind, there's little doubt why he did it. He loves to hit things, he just got through having an aggressive fight, Thor is still upright, and he knows that Thor won't be hurt by it. It's like punching...
I think the Hulk is a bit of an a-hole in the movie, not out of character for him or anyone who knows their power is unmatched. He undoubtedly remembers their battle in S.H.I.E.L.D.s' carrier and remembers he could not lift Mjolnir, Thor's hammer. He has a bit of contempt for demigods. Something Loki found out first-ha...
2,273
In the climatic battle of [**The Avengers**](http://www.imdb.com/title/tt0848228/), we see the full might of our heroes teaming up to protect the world. However, [**one scene**](http://24.media.tumblr.com/03d89ab3fe7b118238963319b30994e8/tumblr_mmswbjHqd41r1mr1po1_500.gif) during this battle, while hilarious on it's ...
2012/05/09
[ "https://movies.stackexchange.com/questions/2273", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/130/" ]
Although I have nothing to back this up, I am a writer and one of my characters parallels the Hulk fairly closely. In my mind, there's little doubt why he did it. He loves to hit things, he just got through having an aggressive fight, Thor is still upright, and he knows that Thor won't be hurt by it. It's like punching...
Hulk hates competition, and was still angry of the fact that Thor stood up to him.
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
As per this **official** [link](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html) this is known issue. > > ***Known issue***: If you have an existing Android Studio project that's > using an alpha version of Android plugin 3.0.0 (such as 3.0.0-alpha9), > you may get the following error ...
I had the same issue while trying to upgrade to 3.0.0-beta1 on Linux Mint 18.1. Nothing of the above helped: neither Clean -> Rebuild -> Sync, nor Invalidate & Restart. But Sanat's suggestion of downgrading to 2.3.3 helped
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
As per this **official** [link](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html) this is known issue. > > ***Known issue***: If you have an existing Android Studio project that's > using an alpha version of Android plugin 3.0.0 (such as 3.0.0-alpha9), > you may get the following error ...
I've had the same issue after the updating to **beta1**. Try to update your build tools to the latest version in SDK Manager -> SDK Tools. Then add the google maven to your **root build.gradle** like this: ``` allprojects { repositories { jcenter() maven { url 'https://maven.google.com' } } } ...
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
`Build -> Clean project`, then ``` Build -> Rebuild project ```
I've had the same issue after the updating to **beta1**. Try to update your build tools to the latest version in SDK Manager -> SDK Tools. Then add the google maven to your **root build.gradle** like this: ``` allprojects { repositories { jcenter() maven { url 'https://maven.google.com' } } } ...
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
`Build -> Clean project`, then ``` Build -> Rebuild project ```
I had the same issue while trying to upgrade to 3.0.0-beta1 on Linux Mint 18.1. Nothing of the above helped: neither Clean -> Rebuild -> Sync, nor Invalidate & Restart. But Sanat's suggestion of downgrading to 2.3.3 helped
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
Try this option: 1. Leave the Gradle Sync error as is and clean the project 2. Rebuild the project 3. Now Sync the Gradle now ***Note:*** I also did > > invalidate and restart > > > before trying this out It helped me, hope it helps you as well.
There are some known bugs in 3.0.0, This issue is one it, actually android studio is integrating Unix file system (Berkeley Fast File System) for Linux OS and it is in beta....Please downgrade your studio to 2.3.3 stable version for now.
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
`Build -> Clean project`, then ``` Build -> Rebuild project ```
As per this **official** [link](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html) this is known issue. > > ***Known issue***: If you have an existing Android Studio project that's > using an alpha version of Android plugin 3.0.0 (such as 3.0.0-alpha9), > you may get the following error ...
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
`Build -> Clean project`, then ``` Build -> Rebuild project ```
Try this option: 1. Leave the Gradle Sync error as is and clean the project 2. Rebuild the project 3. Now Sync the Gradle now ***Note:*** I also did > > invalidate and restart > > > before trying this out It helped me, hope it helps you as well.
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
Try this option: 1. Leave the Gradle Sync error as is and clean the project 2. Rebuild the project 3. Now Sync the Gradle now ***Note:*** I also did > > invalidate and restart > > > before trying this out It helped me, hope it helps you as well.
I had the same issue while trying to upgrade to 3.0.0-beta1 on Linux Mint 18.1. Nothing of the above helped: neither Clean -> Rebuild -> Sync, nor Invalidate & Restart. But Sanat's suggestion of downgrading to 2.3.3 helped
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
`Build -> Clean project`, then ``` Build -> Rebuild project ```
There are some known bugs in 3.0.0, This issue is one it, actually android studio is integrating Unix file system (Berkeley Fast File System) for Linux OS and it is in beta....Please downgrade your studio to 2.3.3 stable version for now.
45,606,068
I just updated the gradle version to ``` classpath 'com.android.tools.build:gradle:3.0.0-beta1' ``` after updating android studio to 3.0-beta1, and my gradle-wrapper is: ``` distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip ``` the problem is I'm facing this weird issue when I wan...
2017/08/10
[ "https://Stackoverflow.com/questions/45606068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1272303/" ]
As per this **official** [link](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html) this is known issue. > > ***Known issue***: If you have an existing Android Studio project that's > using an alpha version of Android plugin 3.0.0 (such as 3.0.0-alpha9), > you may get the following error ...
There are some known bugs in 3.0.0, This issue is one it, actually android studio is integrating Unix file system (Berkeley Fast File System) for Linux OS and it is in beta....Please downgrade your studio to 2.3.3 stable version for now.
43,573,306
I am very much new to database & trying to pull values based on regions. My table already have region (draft\_region\_name) column. Below is my code ``` SQLiteDatabase db = this.getWritableDatabase(); String where = ""; for (int i = 0; i < names.size(); i++) { where = where + KEY_DRAFT_REGION_NAME...
2017/04/23
[ "https://Stackoverflow.com/questions/43573306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4390557/" ]
``` PLAYERS.set(index, ("char1", variable, variable)); ``` Is not valid Java syntax. You most likely mean ``` PLAYERS.set(index, new PLAYER("char1", variable, variable)); ``` Also, please adhere to standard Java naming conventions: `PLAYERS` should be `players`.
Your ArrayList **doesn't** contain multiple data types. It holds objects of Player and only Player type, and you appear to be trying to over-complicate things. You simply get your Player from the ArrayList and then modify it. ``` Player p = players.get(i); p.setName("foo"); p.setMoney(50); ```
43,573,306
I am very much new to database & trying to pull values based on regions. My table already have region (draft\_region\_name) column. Below is my code ``` SQLiteDatabase db = this.getWritableDatabase(); String where = ""; for (int i = 0; i < names.size(); i++) { where = where + KEY_DRAFT_REGION_NAME...
2017/04/23
[ "https://Stackoverflow.com/questions/43573306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4390557/" ]
``` PLAYERS.set(index, ("char1", variable, variable)); ``` Is not valid Java syntax. You most likely mean ``` PLAYERS.set(index, new PLAYER("char1", variable, variable)); ``` Also, please adhere to standard Java naming conventions: `PLAYERS` should be `players`.
The compiler is correct. It doesn't know what you mean by ("char1", variable, variable) . Try updating it with new Player("char1", variable, variable);
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
Personally, I think this trying to classify comments is entirely missing the main reason that people tend to feel unwelcome. I'm pretty sure that the main frustration people have is with their questions being downvoted, closed, or ignored. In my opinion, this focus on unwelcoming comments is trying to solve the `Y` in ...
Those example comments are spot-on "unwelcoming" when I read them: > > The code you posted cannot yield this result. Please post the real > code if you hope to get any help. > > > Why can't the code yield the result? OP must have made a mistake composing a minimal example, but what is it? The commenter clearly k...
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
Personally, I think this trying to classify comments is entirely missing the main reason that people tend to feel unwelcome. I'm pretty sure that the main frustration people have is with their questions being downvoted, closed, or ignored. In my opinion, this focus on unwelcoming comments is trying to solve the `Y` in ...
I take issue with your third point. If I'm having a discussion with a person on the internet and they resort to personal attacks, I would find that upsetting. Not to a degree that it would ruin my day, of course; after all it's not like I know them personally. But to someone who is in a minority in terms of skin colour...
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
Personally, I think this trying to classify comments is entirely missing the main reason that people tend to feel unwelcome. I'm pretty sure that the main frustration people have is with their questions being downvoted, closed, or ignored. In my opinion, this focus on unwelcoming comments is trying to solve the `Y` in ...
The *Comment Classifier* post is a joke, right? It was intended to be published on April 1st, but somehow got delayed? Let's see if I can sum up what happened: * A *data scientist* and *data engineer* teamed up to conduct a study. * They designed an input tool that provided three choices, two of which they consider n...
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
I originally posted this [over here](https://meta.stackoverflow.com/a/370952/1663383), as I'd missed *this* meta topic entirely. Whoa SO, slow down a moment. ============================ > > [![Comment Evaluator 5000](https://i.stack.imgur.com/JI4M7.png)](https://i.stack.imgur.com/JI4M7.png) > > > Where was this...
Those example comments are spot-on "unwelcoming" when I read them: > > The code you posted cannot yield this result. Please post the real > code if you hope to get any help. > > > Why can't the code yield the result? OP must have made a mistake composing a minimal example, but what is it? The commenter clearly k...
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
I originally posted this [over here](https://meta.stackoverflow.com/a/370952/1663383), as I'd missed *this* meta topic entirely. Whoa SO, slow down a moment. ============================ > > [![Comment Evaluator 5000](https://i.stack.imgur.com/JI4M7.png)](https://i.stack.imgur.com/JI4M7.png) > > > Where was this...
I take issue with your third point. If I'm having a discussion with a person on the internet and they resort to personal attacks, I would find that upsetting. Not to a degree that it would ruin my day, of course; after all it's not like I know them personally. But to someone who is in a minority in terms of skin colour...
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
I originally posted this [over here](https://meta.stackoverflow.com/a/370952/1663383), as I'd missed *this* meta topic entirely. Whoa SO, slow down a moment. ============================ > > [![Comment Evaluator 5000](https://i.stack.imgur.com/JI4M7.png)](https://i.stack.imgur.com/JI4M7.png) > > > Where was this...
The *Comment Classifier* post is a joke, right? It was intended to be published on April 1st, but somehow got delayed? Let's see if I can sum up what happened: * A *data scientist* and *data engineer* teamed up to conduct a study. * They designed an input tool that provided three choices, two of which they consider n...
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
The *Comment Classifier* post is a joke, right? It was intended to be published on April 1st, but somehow got delayed? Let's see if I can sum up what happened: * A *data scientist* and *data engineer* teamed up to conduct a study. * They designed an input tool that provided three choices, two of which they consider n...
Those example comments are spot-on "unwelcoming" when I read them: > > The code you posted cannot yield this result. Please post the real > code if you hope to get any help. > > > Why can't the code yield the result? OP must have made a mistake composing a minimal example, but what is it? The commenter clearly k...
370,838
Julia Silge and Jason Punyon just posted [Welcome Wagon: Classifying Comments on Stack Overflow](https://stackoverflow.blog/2018/07/10/welcome-wagon-classifying-comments-on-stack-overflow). There doesn't seem to be a dedicated post for giving feedback on it, so I thought I'd post my own. I take a series of issues with...
2018/07/10
[ "https://meta.stackoverflow.com/questions/370838", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/1709587/" ]
The *Comment Classifier* post is a joke, right? It was intended to be published on April 1st, but somehow got delayed? Let's see if I can sum up what happened: * A *data scientist* and *data engineer* teamed up to conduct a study. * They designed an input tool that provided three choices, two of which they consider n...
I take issue with your third point. If I'm having a discussion with a person on the internet and they resort to personal attacks, I would find that upsetting. Not to a degree that it would ruin my day, of course; after all it's not like I know them personally. But to someone who is in a minority in terms of skin colour...
932,231
I have a problem while trying to install third-party component Oracle Java 8. Every time I type: ``` $ sudo apt-get install oracle-java8-installer ``` I get this answer: ```none Reading package lists... Done Building dependency tree Reading state information... Done oracle-java8-installer is already the newe...
2017/07/05
[ "https://askubuntu.com/questions/932231", "https://askubuntu.com", "https://askubuntu.com/users/707811/" ]
This is caused by the fact that the PPA maintainer hasn't updated their scripts yet and older updates of Java 8 are no longer available from Oracle. To quickly resolve this, you can do the following and install 8u151. **(This will only work so long as 8u151 is available from Oracle)** 1) Install as normal: ``` echo ...
You got this `403:Forbidden` error: ``` Resolving download.oracle.com (download.oracle.com)... 2.22.144.107, 2.22.144.51 Connecting to download.oracle.com (download.oracle.com)|2.22.144.107|:80... connected. HTTP request sent, awaiting response... 403 Forbidden 2017-07-05 15:57:12 ERROR 403: Forbidden. ``` because...
128,063
The explorers landed on a planet where the chirality was opposite that of Earth’s. For some reason they couldn’t leave, so one of the scientists isolated people’s cells, basically put them into an aquarium and added samples of the alien plant life so that the cells could evolve to make use of the wrong chirality. He th...
2016/05/14
[ "https://scifi.stackexchange.com/questions/128063", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/66133/" ]
**Short story: planet with wrong chirality** ["Contagion"](https://www.isfdb.org/cgi-bin/title.cgi?55208), a 1950 novelette by [Katherine Maclean](https://en.wikipedia.org/wiki/Katherine_MacLean), apparently also the answer to [this old question](https://scifi.stackexchange.com/questions/93770/chirality-and-colonists)...
Are you sure it was a short story, or could it be Larry Niven's novel [*Destiny's Road*](https://en.wikipedia.org/wiki/Destiny's_Road)? From [this page](https://en.wikipedia.org/wiki/Chemical_chirality_in_popular_fiction): > > In Larry Niven's Destiny's Road, the title planet's indigenous life is based upon right-ha...
13,920,651
So I have the issue that I am trying to post a variable which is the name of a form input checkbox. However, this name is a variable. When I view page source it shows the name as what I want it to however when I have: ``` $files_name = $_POST['$file_name']; ``` Which works for the other elements that I have, it does...
2012/12/17
[ "https://Stackoverflow.com/questions/13920651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1907323/" ]
Making `item` final should solve your problem: ``` final String item = itemsList.get(i); ``` You can't access a non-final local variable from an inner or anonymous class like this.
You need to use the `final` keyword. Try `final String item=itemsList.get(i)`; Since the anonymous object captures the `item` variable, it doesn't make sense to modify it after. Hence you need (*have*) to make it immutable.
13,920,651
So I have the issue that I am trying to post a variable which is the name of a form input checkbox. However, this name is a variable. When I view page source it shows the name as what I want it to however when I have: ``` $files_name = $_POST['$file_name']; ``` Which works for the other elements that I have, it does...
2012/12/17
[ "https://Stackoverflow.com/questions/13920651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1907323/" ]
Mark `item` as `final`, this should resolve the issue. This [solution](https://stackoverflow.com/a/7423059/205426) : > > Local classes can most definitely reference instance variables. The > reason they cannot reference non final local variables is because the > local class instance can remain in memory after the ...
You need to use the `final` keyword. Try `final String item=itemsList.get(i)`; Since the anonymous object captures the `item` variable, it doesn't make sense to modify it after. Hence you need (*have*) to make it immutable.
13,920,651
So I have the issue that I am trying to post a variable which is the name of a form input checkbox. However, this name is a variable. When I view page source it shows the name as what I want it to however when I have: ``` $files_name = $_POST['$file_name']; ``` Which works for the other elements that I have, it does...
2012/12/17
[ "https://Stackoverflow.com/questions/13920651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1907323/" ]
Making `item` final should solve your problem: ``` final String item = itemsList.get(i); ``` You can't access a non-final local variable from an inner or anonymous class like this.
Mark `item` as `final`, this should resolve the issue. This [solution](https://stackoverflow.com/a/7423059/205426) : > > Local classes can most definitely reference instance variables. The > reason they cannot reference non final local variables is because the > local class instance can remain in memory after the ...
1,877,950
Parent process preforked a number of process and each preforked process created number of threads (thread pools). All the thread in the same address space can share the data and can use the different synchronization techniques for critical sections. I want to know how to synchronized between threads which are from diff...
2009/12/10
[ "https://Stackoverflow.com/questions/1877950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139179/" ]
from reflector : - ``` [Category("Appearance"), Bindable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public IList SelectedItems { get { return base.SelectedItemsImpl; } } ``` Selected Items of ListView is an IList, id like to see the calling method.
Check The Type: `System.Collections.Generic.IList<(Of <(ListViewDataItem>)>)`
1,877,950
Parent process preforked a number of process and each preforked process created number of threads (thread pools). All the thread in the same address space can share the data and can use the different synchronization techniques for critical sections. I want to know how to synchronized between threads which are from diff...
2009/12/10
[ "https://Stackoverflow.com/questions/1877950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139179/" ]
Right, got it sorted. I kept trying to cast it like ``` IList<PuzzleViewModel> collection = (IList<PuzzleViewModel>)param; ``` Which told me it couldn't convert from SelectedItemCollection to IList... This is in fact what you need to do. ``` System.Collections.IList items = (System.Collections.IList)param; var co...
Check The Type: `System.Collections.Generic.IList<(Of <(ListViewDataItem>)>)`
1,877,950
Parent process preforked a number of process and each preforked process created number of threads (thread pools). All the thread in the same address space can share the data and can use the different synchronization techniques for critical sections. I want to know how to synchronized between threads which are from diff...
2009/12/10
[ "https://Stackoverflow.com/questions/1877950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139179/" ]
Right, got it sorted. I kept trying to cast it like ``` IList<PuzzleViewModel> collection = (IList<PuzzleViewModel>)param; ``` Which told me it couldn't convert from SelectedItemCollection to IList... This is in fact what you need to do. ``` System.Collections.IList items = (System.Collections.IList)param; var co...
from reflector : - ``` [Category("Appearance"), Bindable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public IList SelectedItems { get { return base.SelectedItemsImpl; } } ``` Selected Items of ListView is an IList, id like to see the calling method.
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
They could be, phishing sites are set up to do exactly this. On non-malicious sites, this would be generally be considered poor practice, but there is no reason why they couldn't, beyond user privacy regulations.
In a previous job we logged failed credentials to a radius server used to authenticate internet connections. This was handy, we could reset customer's password to whatever their router was sending, or could see if the creds were from another ISP by the username. My point is, there are times when logging failures is us...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
They could be, phishing sites are set up to do exactly this. On non-malicious sites, this would be generally be considered poor practice, but there is no reason why they couldn't, beyond user privacy regulations.
I think the general answer here is that ***passwords*** are not normally logged by any legitimate service. Usernames certainly are. To record passwords is a problem, even for the "correct" site. Services should not know what your passwords are, which is why there are some complicated processes used to store passwords...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
This would likely be recorded as an error on the website as it would return permission denied. Many websites go through some kind of firewall or protection which might pick up failed attempted to try and block brute force log-in attempts or similar. I would be pretty shocked to find that a (none compromised) website i...
Ignoring deliberately malicious websites, it can happen by accident or neglect. I refer you to Twitter: <https://www.theverge.com/2018/5/3/17316684/twitter-password-bug-security-flaw-exposed-change-now> > > May 3, 2018 > > > According to Twitter, the bug occurred due to an issue in the hashing process that masks pa...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
I think the general answer here is that ***passwords*** are not normally logged by any legitimate service. Usernames certainly are. To record passwords is a problem, even for the "correct" site. Services should not know what your passwords are, which is why there are some complicated processes used to store passwords...
Ignoring deliberately malicious websites, it can happen by accident or neglect. I refer you to Twitter: <https://www.theverge.com/2018/5/3/17316684/twitter-password-bug-security-flaw-exposed-change-now> > > May 3, 2018 > > > According to Twitter, the bug occurred due to an issue in the hashing process that masks pa...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
They could be, phishing sites are set up to do exactly this. On non-malicious sites, this would be generally be considered poor practice, but there is no reason why they couldn't, beyond user privacy regulations.
This would likely be recorded as an error on the website as it would return permission denied. Many websites go through some kind of firewall or protection which might pick up failed attempted to try and block brute force log-in attempts or similar. I would be pretty shocked to find that a (none compromised) website i...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
This would likely be recorded as an error on the website as it would return permission denied. Many websites go through some kind of firewall or protection which might pick up failed attempted to try and block brute force log-in attempts or similar. I would be pretty shocked to find that a (none compromised) website i...
In a previous job we logged failed credentials to a radius server used to authenticate internet connections. This was handy, we could reset customer's password to whatever their router was sending, or could see if the creds were from another ISP by the username. My point is, there are times when logging failures is us...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
A legitimate website will rather not do that. Then again, there are possibilities: 1. The site being compromised 2. The site being run by incompetent people (never underestimate...), collecting the data and get compromised in some future point. 3. The site collecting some data of failed logins in order to analyse and...
This would likely be recorded as an error on the website as it would return permission denied. Many websites go through some kind of firewall or protection which might pick up failed attempted to try and block brute force log-in attempts or similar. I would be pretty shocked to find that a (none compromised) website i...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
A legitimate website will rather not do that. Then again, there are possibilities: 1. The site being compromised 2. The site being run by incompetent people (never underestimate...), collecting the data and get compromised in some future point. 3. The site collecting some data of failed logins in order to analyse and...
In a previous job we logged failed credentials to a radius server used to authenticate internet connections. This was handy, we could reset customer's password to whatever their router was sending, or could see if the creds were from another ISP by the username. My point is, there are times when logging failures is us...
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
This would likely be recorded as an error on the website as it would return permission denied. Many websites go through some kind of firewall or protection which might pick up failed attempted to try and block brute force log-in attempts or similar. I would be pretty shocked to find that a (none compromised) website i...
They should not, but good security practice would be to consider the password used as compromised and change it. After all, if you lose a set of keys for your home, wouldn't make you less worried to replace the locks?
226,663
Which is harder to exploit: Password reset link with tokens/timestamps/code/ticket etc Or, temporary password sent on user mail using which login can be done and password can be changed. Any suggestions on how they can be exploited please?
2020/03/02
[ "https://security.stackexchange.com/questions/226663", "https://security.stackexchange.com", "https://security.stackexchange.com/users/228198/" ]
I think the general answer here is that ***passwords*** are not normally logged by any legitimate service. Usernames certainly are. To record passwords is a problem, even for the "correct" site. Services should not know what your passwords are, which is why there are some complicated processes used to store passwords...
They should not, but good security practice would be to consider the password used as compromised and change it. After all, if you lose a set of keys for your home, wouldn't make you less worried to replace the locks?
15,999,888
In a project I'm writing, I have class template that I'm using as a base class, and it has a virtual method that derived classes override. The virtual function also has its own implementation. The problem I'm having, though, can be boiled down to the following code: ``` #include <iostream> template <typename T> struc...
2013/04/14
[ "https://Stackoverflow.com/questions/15999888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/232217/" ]
**This issue is not related to templates**. You simply shouldn't use the `virtual` keyword in an out-of-class definition of a member function: ``` template <typename T> void A<T>::do_something() { std::cout << "Saluton, mondo!\n"; } ``` See this compiling, for instance, in this [**live example**](http://livewo...
You don't need `virtual` when separately implementing the method: ``` template <typename T> void A<T>::do_something() { std::cout << "Saluton, mondo!\n"; } ``` [***Live Demo***](http://liveworkspace.org/code/4yc7Hy%243966)
20,841,980
Hello, I want to read a file, file.txt that contains word pairs like this... ``` mot;word oui;yes utiliser;use comment;how ``` After reading this file.txt , I want to split this text and put the French words in an ArrayList and the English words in an another ArrayList. Thanks in advance...
2013/12/30
[ "https://Stackoverflow.com/questions/20841980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3144878/" ]
This looks like CSV file. Consider using CSV reader library. Use [String#split](http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String%29) function from JDK and read file line by line with [Scanner](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#Scanner(java.io.File)):...
``` mot;word oui;yes utiliser;use comment;how ``` It appears that the structure of each line is ``` frenchWord;englishWord ``` So you can read each line of your file using a [`Scanner`](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html) (using the constructor [`Scanner(File source)`](http://docs.or...
20,841,980
Hello, I want to read a file, file.txt that contains word pairs like this... ``` mot;word oui;yes utiliser;use comment;how ``` After reading this file.txt , I want to split this text and put the French words in an ArrayList and the English words in an another ArrayList. Thanks in advance...
2013/12/30
[ "https://Stackoverflow.com/questions/20841980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3144878/" ]
First, you have to create two array lists.. ``` ArrayList<String> english = new ArrayList<>(); ArrayList<String> french = new ArrayList<>(); ``` Then, open the file, read line by line, split it bye ";" and add the words to ArrayLists... ``` try(BufferedReader in = new BufferedReader(new FileReader("file...
``` mot;word oui;yes utiliser;use comment;how ``` It appears that the structure of each line is ``` frenchWord;englishWord ``` So you can read each line of your file using a [`Scanner`](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html) (using the constructor [`Scanner(File source)`](http://docs.or...
20,841,980
Hello, I want to read a file, file.txt that contains word pairs like this... ``` mot;word oui;yes utiliser;use comment;how ``` After reading this file.txt , I want to split this text and put the French words in an ArrayList and the English words in an another ArrayList. Thanks in advance...
2013/12/30
[ "https://Stackoverflow.com/questions/20841980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3144878/" ]
``` public static void main(String[] args) { List<String> list = new ArrayList<String>(); List<String> frenchList = new ArrayList<String>(); List<String> englishList = new ArrayList<String>(); File file = new File("C:/dico.txt"); if(file.exists()){ try { list = Files.readAllLin...
``` mot;word oui;yes utiliser;use comment;how ``` It appears that the structure of each line is ``` frenchWord;englishWord ``` So you can read each line of your file using a [`Scanner`](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html) (using the constructor [`Scanner(File source)`](http://docs.or...
20,841,980
Hello, I want to read a file, file.txt that contains word pairs like this... ``` mot;word oui;yes utiliser;use comment;how ``` After reading this file.txt , I want to split this text and put the French words in an ArrayList and the English words in an another ArrayList. Thanks in advance...
2013/12/30
[ "https://Stackoverflow.com/questions/20841980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3144878/" ]
``` public static void main(String[] args) { List<String> list = new ArrayList<String>(); List<String> frenchList = new ArrayList<String>(); List<String> englishList = new ArrayList<String>(); File file = new File("C:/dico.txt"); if(file.exists()){ try { list = Files.readAllLin...
This looks like CSV file. Consider using CSV reader library. Use [String#split](http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String%29) function from JDK and read file line by line with [Scanner](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#Scanner(java.io.File)):...
20,841,980
Hello, I want to read a file, file.txt that contains word pairs like this... ``` mot;word oui;yes utiliser;use comment;how ``` After reading this file.txt , I want to split this text and put the French words in an ArrayList and the English words in an another ArrayList. Thanks in advance...
2013/12/30
[ "https://Stackoverflow.com/questions/20841980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3144878/" ]
``` public static void main(String[] args) { List<String> list = new ArrayList<String>(); List<String> frenchList = new ArrayList<String>(); List<String> englishList = new ArrayList<String>(); File file = new File("C:/dico.txt"); if(file.exists()){ try { list = Files.readAllLin...
First, you have to create two array lists.. ``` ArrayList<String> english = new ArrayList<>(); ArrayList<String> french = new ArrayList<>(); ``` Then, open the file, read line by line, split it bye ";" and add the words to ArrayLists... ``` try(BufferedReader in = new BufferedReader(new FileReader("file...
15,519,014
I want to know(study) about the network driver interfacing with the linux kernel or the TCP/IP stack. For this i would like to use my own system driver as a case study. Can you please tell me any good references from where i can study the above concept. I will be very thankful to you
2013/03/20
[ "https://Stackoverflow.com/questions/15519014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2087340/" ]
I recommend: (1)One book "Understanding the Linux Network Internals" by Benvenuti; This book can be ordered on amazon: [http://www.amazon.com/Understanding-Network-Internals-Christian-Benvenuti/dp/0596002556](https://rads.stackoverflow.com/amzn/click/com/0596002556) (2)One demo code inside the Linux Kernel source tre...
I think some parts of the interface are explained in Linux Device Drivers book. You can get a legal and free copy here: <http://lwn.net/Kernel/LDD3/> Have a look on the code example of a network device driver, it should show you how the interface between device driver and kernel network subsystem is working.
71,680,901
I have a grid and in some of the grid items divs the text is too long. I've already added text-overflow:ellipsis, white-space: nowrap, and overflow: hidden. This prevents the text from overflowing as expected. but what I wanted to try, was to detect if there was overflow and if so, decrease the font size. Below is the...
2022/03/30
[ "https://Stackoverflow.com/questions/71680901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16234737/" ]
Your variable text\_size actually is some kind of an array. You must refer to text\_size[i] if you want to access the style etc. Cheers.
```js function change(){ const text = document.getElementById('text'); text.style.fontSize='36px'; } ``` ```html <p id="text" style="font-size: 16px">lorem ipsum ...</p> <button onclick="change()">change</button> ```
70,778
I'm just learning photography and I found this picture <http://www.michaelkormos.com/blog/a-lovely-afternoon-family-photography-nyc-family-photographer> The background was warm with yellow soft tones ... but the subjects are clear. I wondered how can I do that? Yesterday I did a test, but failed ... lOLz ... It was...
2015/11/09
[ "https://photo.stackexchange.com/questions/70778", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/46231/" ]
A shot like this requires you to **shoot during the [golden hour](https://photo.stackexchange.com/questions/16028/what-is-golden-hour)**. The light at this time of day will be very warm/yellow with very pronounced shadows. Other factors that can help you get a shot similar to this include careful application of additio...
First, to get this warm and yellow background, you need to be shooting in that kind of light, which generally only happens at sunrise and sunset. You can see by the catchlight in the eyes that the photographer was using a fairly large reflector to get light back onto the subjects. Also, you will notice that the super g...
70,778
I'm just learning photography and I found this picture <http://www.michaelkormos.com/blog/a-lovely-afternoon-family-photography-nyc-family-photographer> The background was warm with yellow soft tones ... but the subjects are clear. I wondered how can I do that? Yesterday I did a test, but failed ... lOLz ... It was...
2015/11/09
[ "https://photo.stackexchange.com/questions/70778", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/46231/" ]
First, to get this warm and yellow background, you need to be shooting in that kind of light, which generally only happens at sunrise and sunset. You can see by the catchlight in the eyes that the photographer was using a fairly large reflector to get light back onto the subjects. Also, you will notice that the super g...
It's basically about how you use the gels and white balance in combination. Your subject is lit by the flash. Your ambient background is not. So you can make a color temperature difference between the two, in any balance you want, by adjusting the color of the light on your subject, and then white balancing to match. ...
70,778
I'm just learning photography and I found this picture <http://www.michaelkormos.com/blog/a-lovely-afternoon-family-photography-nyc-family-photographer> The background was warm with yellow soft tones ... but the subjects are clear. I wondered how can I do that? Yesterday I did a test, but failed ... lOLz ... It was...
2015/11/09
[ "https://photo.stackexchange.com/questions/70778", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/46231/" ]
A shot like this requires you to **shoot during the [golden hour](https://photo.stackexchange.com/questions/16028/what-is-golden-hour)**. The light at this time of day will be very warm/yellow with very pronounced shadows. Other factors that can help you get a shot similar to this include careful application of additio...
You can get different white balance on subject and background when you use flash and gels. That's one of the points of using flashes. <http://neilvn.com/tangents/gelling-your-flash-for-effect-blue-background/> <http://neilvn.com/tangents/photo-shoot-progression-of-an-idea/> (and many more on his blog) The white bal...
70,778
I'm just learning photography and I found this picture <http://www.michaelkormos.com/blog/a-lovely-afternoon-family-photography-nyc-family-photographer> The background was warm with yellow soft tones ... but the subjects are clear. I wondered how can I do that? Yesterday I did a test, but failed ... lOLz ... It was...
2015/11/09
[ "https://photo.stackexchange.com/questions/70778", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/46231/" ]
A shot like this requires you to **shoot during the [golden hour](https://photo.stackexchange.com/questions/16028/what-is-golden-hour)**. The light at this time of day will be very warm/yellow with very pronounced shadows. Other factors that can help you get a shot similar to this include careful application of additio...
It's basically about how you use the gels and white balance in combination. Your subject is lit by the flash. Your ambient background is not. So you can make a color temperature difference between the two, in any balance you want, by adjusting the color of the light on your subject, and then white balancing to match. ...
70,778
I'm just learning photography and I found this picture <http://www.michaelkormos.com/blog/a-lovely-afternoon-family-photography-nyc-family-photographer> The background was warm with yellow soft tones ... but the subjects are clear. I wondered how can I do that? Yesterday I did a test, but failed ... lOLz ... It was...
2015/11/09
[ "https://photo.stackexchange.com/questions/70778", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/46231/" ]
You can get different white balance on subject and background when you use flash and gels. That's one of the points of using flashes. <http://neilvn.com/tangents/gelling-your-flash-for-effect-blue-background/> <http://neilvn.com/tangents/photo-shoot-progression-of-an-idea/> (and many more on his blog) The white bal...
It's basically about how you use the gels and white balance in combination. Your subject is lit by the flash. Your ambient background is not. So you can make a color temperature difference between the two, in any balance you want, by adjusting the color of the light on your subject, and then white balancing to match. ...
18,305,673
I have weird decimal calculation that really surprise me, I have two big decimal number, one is a normal proce and the other one is an offer price. Then I want to calculate discount percentage and ceil it to the nearest integer. Here are the code: ``` BigDecimal listPrice = new BigDecimal(510000); BigDecimal offerPr...
2013/08/19
[ "https://Stackoverflow.com/questions/18305673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115520/" ]
One possible solution is to use a custom event `showalert` after the alert is shown and in the event handler remove the alert ``` $(document).on('showalert', '.alert', function(){ window.setTimeout($.proxy(function() { $(this).fadeTo(500, 0).slideUp(500, function(){ $(this).remove(); }...
I think it is because `$(this).remove();` removes the alert from the DOM. You can actually just modify the content without regenerating the alert every time after the AJAX call.
6,040
I am fairly new to this forum but I am repeatably running into the same problem. This is the user who has found a formula or data on the internet which they think can be applied to a problem. They go ahead and post or quote this blindly without giving any thought to its applicability and then insist they are correct be...
2016/12/19
[ "https://electronics.meta.stackexchange.com/questions/6040", "https://electronics.meta.stackexchange.com", "https://electronics.meta.stackexchange.com/users/115446/" ]
[Help center](https://electronics.stackexchange.com/help/privileges/flag-posts) says, for the flagging privilege (obtained at 15 rep): > > **When should I flag?** > > > If anything happens on our site that makes you feel uncomfortable or that, in your opinion, clearly does not belong here, please flag it and bring ...
Flags are meant for signaling exception conditions to the moderators. Closing a post is routine business. You only need 3000 rep to be able to vote to close questions. We have a reasonably large number of users at 3000 or higher, so bad questions will get closed soon enough. If you don't have 3000 rep yet, just move o...
6,040
I am fairly new to this forum but I am repeatably running into the same problem. This is the user who has found a formula or data on the internet which they think can be applied to a problem. They go ahead and post or quote this blindly without giving any thought to its applicability and then insist they are correct be...
2016/12/19
[ "https://electronics.meta.stackexchange.com/questions/6040", "https://electronics.meta.stackexchange.com", "https://electronics.meta.stackexchange.com/users/115446/" ]
[Help center](https://electronics.stackexchange.com/help/privileges/flag-posts) says, for the flagging privilege (obtained at 15 rep): > > **When should I flag?** > > > If anything happens on our site that makes you feel uncomfortable or that, in your opinion, clearly does not belong here, please flag it and bring ...
In addition to the other answers, moderators can take some flak when community moderation isn't allowed to take it's course before they zoom in and close something. It takes 5 users to close a question, but just one moderator. They tend to reserve that action for cases that might fall between the cracks, or for cases w...
6,040
I am fairly new to this forum but I am repeatably running into the same problem. This is the user who has found a formula or data on the internet which they think can be applied to a problem. They go ahead and post or quote this blindly without giving any thought to its applicability and then insist they are correct be...
2016/12/19
[ "https://electronics.meta.stackexchange.com/questions/6040", "https://electronics.meta.stackexchange.com", "https://electronics.meta.stackexchange.com/users/115446/" ]
In addition to the other answers, moderators can take some flak when community moderation isn't allowed to take it's course before they zoom in and close something. It takes 5 users to close a question, but just one moderator. They tend to reserve that action for cases that might fall between the cracks, or for cases w...
Flags are meant for signaling exception conditions to the moderators. Closing a post is routine business. You only need 3000 rep to be able to vote to close questions. We have a reasonably large number of users at 3000 or higher, so bad questions will get closed soon enough. If you don't have 3000 rep yet, just move o...
634,871
If I direct a laser pointer north and I put a photodetector eastwards (i.e. at $90^\circ$ ), and I wait for a very very long time (in a perfect vacuum if necessary), will the detector ever be triggered by a photon?
2021/05/08
[ "https://physics.stackexchange.com/questions/634871", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/298721/" ]
Photons traveling from spacetime point A (say the exit of your laser pointer at time $t\_1$) to B (somewhere on the line towards the north at time $t\_2$) can do this in every way. Via east to the west to the north, via the moon, via Proxima Centauri (with higher than light speed), or whatever. The chance that the phot...
Photons are elementary particles of the [standard model.](https://en.wikipedia.org/wiki/Standard_Model) They have mass zero and E=hnu, where nu is the frequency of light the come from, the laser in this case. As point particles generated by the lasing phenomenon they travel in straight lines because of conservation of...
634,871
If I direct a laser pointer north and I put a photodetector eastwards (i.e. at $90^\circ$ ), and I wait for a very very long time (in a perfect vacuum if necessary), will the detector ever be triggered by a photon?
2021/05/08
[ "https://physics.stackexchange.com/questions/634871", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/298721/" ]
Photons traveling from spacetime point A (say the exit of your laser pointer at time $t\_1$) to B (somewhere on the line towards the north at time $t\_2$) can do this in every way. Via east to the west to the north, via the moon, via Proxima Centauri (with higher than light speed), or whatever. The chance that the phot...
What the other answers do not address is shielding. Electromagnetism has this phenomenon called shielding and we are able to do it pretty well with our current technologies. EM waves do spread spherically in space always. The only way to go around this is with shielding, in your case, the laser is using very effective...
13,572,413
Here is a setup: I have a textbox with a numberic value. According to the requirements every time anybody changes that value an accompanying comment needs to be provided. So visually there must be another textbox for the comment that should be displayed right next to the first one. Ideally the comment textbox needs to ...
2012/11/26
[ "https://Stackoverflow.com/questions/13572413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139667/" ]
Use css `white-space` style to preserve the white space inside an element. <https://developer.mozilla.org/en-US/docs/CSS/white-space> ``` .my_element { white-space: pre; /* or other pre- styles*/ } ``` **DEMO:** <http://jsfiddle.net/5UWFB/2/>
Replacing empty spaces with "\u00a0" fixed my problem. Replacing them with " " worked in console, but not in my program.
66,833,028
I have a dataset looking like that: ``` set.seed(123) test_data <- data.frame( id = c("a", "b", "c", "d", "e"), x = sample(c(0,1), 5, replace = T), y = sample(c(0,1), 5, replace = T) ) > test_data id x y 1 a 0 1 2 b 0 1 3 c 0 1 4 d 1 0 5 e 0 0 ``` For the columns x and y, if the value is equal t...
2021/03/27
[ "https://Stackoverflow.com/questions/66833028", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11598948/" ]
You can do this way also: ``` library(tidyverse) ## define a function for your job fn <- function(x, name){ return(ifelse(x ==1, name, NA)) } test_data %>% select(-id) %>% map2_dfr(., names(.), ~fn(.x, .y)) %>% bind_cols('id'= test_data$id, .) ``` Another version could be: ``` fn <- function(x, name){ ...
Here is a try using `purrr` ``` library(dplyr) library(purrr) col_to_fix <- names(test_data)[2:length(test_data)] walk(.x = col_to_fix, .f = function(x) { # Note that I used <<- assigment here to change the test_data in global test_data[[x]] <<- case_when( test_data[[x]] == 1 ~ x, TRUE ~ NA_character_ )...
4,032,829
Assuming this is possible, I would like my iOS application, when backgrounded, to poll a server (i.e. essentially, retrieve the contents of a URL every 30 minutes and notify the user if it contains something "interesting"), essentially in a similar way to the way the built-in mail client assumedly works if you're not u...
2010/10/27
[ "https://Stackoverflow.com/questions/4032829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48933/" ]
What you want to do, is not covered under the multitasking features of iOS4. There are only a few types of applications allowed to run in the background for long periods of time (more than 10 minutes), and generic networking applications aren't one of them. However, all is not lost. What you can do, and what I believe...
> > Assuming this is possible... > > > Unfortunately that's a faulty assumption(!). You can't do it using the "multi tasking" on the iPhone, as it only allows certain kinds of background processing (GPS, VoIP, music). To do what you want you'll need to do the work on a server and use push notifications.
67,541,547
My `Beta` model's stage field provides 5 choices. I want my serializer to not always accept all these choices but only some of them according to the serialized object's actual stage value. For example, if `my_beta_object.stage == 1`, then the serializer should expect (and offer) only stages 2 and 3, if `my_beta_object....
2021/05/14
[ "https://Stackoverflow.com/questions/67541547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13038487/" ]
You could try to override the `__init__` method of your serializer and then dynamically generates the choices. However, it's not as simple as `choices=my_generated_choices`. It's a bit more complicated, and there's an in-depth solution on [that topic over there](https://github.com/encode/django-rest-framework/issues/33...
Part of the explanation and a start for a solution I found [here](https://github.com/encode/django-rest-framework/issues/2555#issuecomment-74242909). By design, I cannot get the context at fields' initialization apparently. I need to redefine the ChoiceField choices attribute at **serializer**'s initialization. ```py ...
11,309,768
I am drawing to a regular `HwndRengerTarget` but other windows, which have nothing to do with Direct2D, overlap it. The problem is that these windows get painted over when I draw to the `HwndRengerTarget`. I would like to tell Direct2D not to touch a specific region of the `HwndRengerTarget` (i.e. don't touch the pi...
2012/07/03
[ "https://Stackoverflow.com/questions/11309768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/765137/" ]
Why not arrange the windows (HWNDs) so that the Direct2D one is at the bottom of the z-index? It should be the first child of its parent. Then clipping will be automatic. You may need the WS\_CLIPSIBLINGS window style.
If you want to manually restrict your rendering to a certain region you can use layers (`ID2D1Layer` objects). More info here [Layers Overview](http://msdn.microsoft.com/en-us/library/windows/desktop/dd756654(v=vs.85).aspx) If the visible region is rectangular it may be simpler to use axis aligned clips via methods `...
11,309,768
I am drawing to a regular `HwndRengerTarget` but other windows, which have nothing to do with Direct2D, overlap it. The problem is that these windows get painted over when I draw to the `HwndRengerTarget`. I would like to tell Direct2D not to touch a specific region of the `HwndRengerTarget` (i.e. don't touch the pi...
2012/07/03
[ "https://Stackoverflow.com/questions/11309768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/765137/" ]
Why not arrange the windows (HWNDs) so that the Direct2D one is at the bottom of the z-index? It should be the first child of its parent. Then clipping will be automatic. You may need the WS\_CLIPSIBLINGS window style.
I had the same problem. Fixed by calling CreateWindowEx LAST for the D2D child HWND. So AFTER all the other child windows are created.
11,309,768
I am drawing to a regular `HwndRengerTarget` but other windows, which have nothing to do with Direct2D, overlap it. The problem is that these windows get painted over when I draw to the `HwndRengerTarget`. I would like to tell Direct2D not to touch a specific region of the `HwndRengerTarget` (i.e. don't touch the pi...
2012/07/03
[ "https://Stackoverflow.com/questions/11309768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/765137/" ]
If you want to manually restrict your rendering to a certain region you can use layers (`ID2D1Layer` objects). More info here [Layers Overview](http://msdn.microsoft.com/en-us/library/windows/desktop/dd756654(v=vs.85).aspx) If the visible region is rectangular it may be simpler to use axis aligned clips via methods `...
I had the same problem. Fixed by calling CreateWindowEx LAST for the D2D child HWND. So AFTER all the other child windows are created.
16,630,455
Guys I have a problem with my JTable, my JTable(tblLivro) which contents should be the result(ArrayList) of my query (working) , but when I try to put the rsult in my jtable it just doesn't work, it doesn't show any errors, yet not show it. Why? Here is my code ``` package view; import java.awt.BorderLayout; import ...
2013/05/19
[ "https://Stackoverflow.com/questions/16630455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2251153/" ]
Because you didn't even added `JScrollPane` on your `painelPrincipal`. You can do it like this: ``` painelPrincipal.add(scrollPane, BorderLayout.SOUTH); ``` Also: * Do not call `setVisible` for `JFrame` before all components are added. * Call `pack` instead of `setSize` for JFrame * Avoid using null layout and abs...
just got help from a friend, here is the final code: ``` public class LivroView extends JFrame implements ActionListener { private JTable tblLivros; DefaultTableModel modeloTabela; private List<Livro> encontrados; public LivroView() { super("Manutenção de Livros"); encontrados = new ...
16,630,455
Guys I have a problem with my JTable, my JTable(tblLivro) which contents should be the result(ArrayList) of my query (working) , but when I try to put the rsult in my jtable it just doesn't work, it doesn't show any errors, yet not show it. Why? Here is my code ``` package view; import java.awt.BorderLayout; import ...
2013/05/19
[ "https://Stackoverflow.com/questions/16630455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2251153/" ]
First of all, `stop using null layouts`. Swing was designed to be used with layout managers. You add the table to the scroll pane which is a good thing. ``` scrollPane.setViewportView(tblLivros); ``` Later on it looks like you update the model (which is a good thing), but then you add the table to another panel (wh...
just got help from a friend, here is the final code: ``` public class LivroView extends JFrame implements ActionListener { private JTable tblLivros; DefaultTableModel modeloTabela; private List<Livro> encontrados; public LivroView() { super("Manutenção de Livros"); encontrados = new ...
36,193,987
Hello this is my method for a String Array insertion sort. It is returning bogus results to the console. Mainly just one array element over and over. Any help what needs to be changed is greatly appreciated.Thank you. ``` public static void insertionSort(String[] a, int count) { int i, j; String Value; ...
2016/03/24
[ "https://Stackoverflow.com/questions/36193987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5698390/" ]
The problem is `a[j+1] = a[j];` Your original a[j+1] would be lost, you just simply replace it, without moving it / storing it, it is just simply replaced by a[j] and get lost... I would modify your code like the following: Find the position of current value to be inserted, swap it with the element at that position,...
check the code works fine ``` public static void insertionSort(int array[]) { int n = array.length; for (int j = 1; j < n; j++) { int key = array[j]; int i = j-1; while ( (i > -1) && ( array [i] > key ) ) { array [i+1] = array [i]; i-...
36,193,987
Hello this is my method for a String Array insertion sort. It is returning bogus results to the console. Mainly just one array element over and over. Any help what needs to be changed is greatly appreciated.Thank you. ``` public static void insertionSort(String[] a, int count) { int i, j; String Value; ...
2016/03/24
[ "https://Stackoverflow.com/questions/36193987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5698390/" ]
The code below works. ``` public static void insertionSort(String[] a, int count) { int i, j; String Value; for (i = 1; i < count; i++) { Value = a[i]; j = i; while (j > 0 && a[j-1].compareTo(Value)> 1) { a[j] = a[j-1]...
check the code works fine ``` public static void insertionSort(int array[]) { int n = array.length; for (int j = 1; j < n; j++) { int key = array[j]; int i = j-1; while ( (i > -1) && ( array [i] > key ) ) { array [i+1] = array [i]; i-...
26,524,985
This is a code which i found in scikit learn website ``` from sklearn.datasets import load_iris from sklearn import tree iris = load_iris() clf = tree.DecisionTreeClassifier() clf = clf.fit(iris.data, iris.target) ``` here what is (iris.data,iris.target), for my project purpose using this code i've modified like `...
2014/10/23
[ "https://Stackoverflow.com/questions/26524985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4173285/" ]
You should frame it as , ``` String query= "select City from table where ID=2"; ``` The general syntax select (COLUMN 1 , COLUMN 2) from table where condition; also you can use `*` to select the entire row. will return `Delhi` in the resultset. hope you are using jdbc
``` select Name from table where id=2; ``` or ``` select City from table where id=2; ```
26,524,985
This is a code which i found in scikit learn website ``` from sklearn.datasets import load_iris from sklearn import tree iris = load_iris() clf = tree.DecisionTreeClassifier() clf = clf.fit(iris.data, iris.target) ``` here what is (iris.data,iris.target), for my project purpose using this code i've modified like `...
2014/10/23
[ "https://Stackoverflow.com/questions/26524985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4173285/" ]
``` select Name from table where id=2; ``` or ``` select City from table where id=2; ```
``` Where id = IdInputVar ``` Should work
26,524,985
This is a code which i found in scikit learn website ``` from sklearn.datasets import load_iris from sklearn import tree iris = load_iris() clf = tree.DecisionTreeClassifier() clf = clf.fit(iris.data, iris.target) ``` here what is (iris.data,iris.target), for my project purpose using this code i've modified like `...
2014/10/23
[ "https://Stackoverflow.com/questions/26524985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4173285/" ]
You should frame it as , ``` String query= "select City from table where ID=2"; ``` The general syntax select (COLUMN 1 , COLUMN 2) from table where condition; also you can use `*` to select the entire row. will return `Delhi` in the resultset. hope you are using jdbc
``` Where id = IdInputVar ``` Should work
2,159,916
[diagram http://img526.imageshack.us/img526/2506/picture1lx.jpg](http://img526.imageshack.us/img526/2506/picture1lx.jpg) The question is pretty self-explanatory. Is there a technical name for that diagram? Is it considered UML? Second of all, what sort of program might have been used to generate it? I'd like to make o...
2010/01/29
[ "https://Stackoverflow.com/questions/2159916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47493/" ]
It is not UML. Most probably not a standard, just blocks with not-well-defined meanings. There might be tools, but this one was probably drawn with OpenOffice or similar.
It's not UML as Nicolas suggests. The closest term I know is [Layered Architecture](http://en.wikipedia.org/wiki/Abstraction_(computer_science)#Layered_architecture) diagram. As it seems like there is no agreed rules/convention on this type of diagram (as compared to UML,) any graphics tool would do e.g. Visio, [Crea...
2,159,916
[diagram http://img526.imageshack.us/img526/2506/picture1lx.jpg](http://img526.imageshack.us/img526/2506/picture1lx.jpg) The question is pretty self-explanatory. Is there a technical name for that diagram? Is it considered UML? Second of all, what sort of program might have been used to generate it? I'd like to make o...
2010/01/29
[ "https://Stackoverflow.com/questions/2159916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47493/" ]
It is not UML. Most probably not a standard, just blocks with not-well-defined meanings. There might be tools, but this one was probably drawn with OpenOffice or similar.
You could abuse a UML class diagram with packages, or a component diagram to draw something like this.
2,159,916
[diagram http://img526.imageshack.us/img526/2506/picture1lx.jpg](http://img526.imageshack.us/img526/2506/picture1lx.jpg) The question is pretty self-explanatory. Is there a technical name for that diagram? Is it considered UML? Second of all, what sort of program might have been used to generate it? I'd like to make o...
2010/01/29
[ "https://Stackoverflow.com/questions/2159916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47493/" ]
It's not UML as Nicolas suggests. The closest term I know is [Layered Architecture](http://en.wikipedia.org/wiki/Abstraction_(computer_science)#Layered_architecture) diagram. As it seems like there is no agreed rules/convention on this type of diagram (as compared to UML,) any graphics tool would do e.g. Visio, [Crea...
You could abuse a UML class diagram with packages, or a component diagram to draw something like this.
2,159,916
[diagram http://img526.imageshack.us/img526/2506/picture1lx.jpg](http://img526.imageshack.us/img526/2506/picture1lx.jpg) The question is pretty self-explanatory. Is there a technical name for that diagram? Is it considered UML? Second of all, what sort of program might have been used to generate it? I'd like to make o...
2010/01/29
[ "https://Stackoverflow.com/questions/2159916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47493/" ]
You might consider using a layer diagram, which you can use to describe the logical structure of your system. You can create layer diagrams bottom up from code or from the top-down in Visual Studio 2010 Ultimate. In addition, VS 2010 lets you validate code against a layer diagram that is mapped to it. For more informa...
It's not UML as Nicolas suggests. The closest term I know is [Layered Architecture](http://en.wikipedia.org/wiki/Abstraction_(computer_science)#Layered_architecture) diagram. As it seems like there is no agreed rules/convention on this type of diagram (as compared to UML,) any graphics tool would do e.g. Visio, [Crea...
2,159,916
[diagram http://img526.imageshack.us/img526/2506/picture1lx.jpg](http://img526.imageshack.us/img526/2506/picture1lx.jpg) The question is pretty self-explanatory. Is there a technical name for that diagram? Is it considered UML? Second of all, what sort of program might have been used to generate it? I'd like to make o...
2010/01/29
[ "https://Stackoverflow.com/questions/2159916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47493/" ]
You might consider using a layer diagram, which you can use to describe the logical structure of your system. You can create layer diagrams bottom up from code or from the top-down in Visual Studio 2010 Ultimate. In addition, VS 2010 lets you validate code against a layer diagram that is mapped to it. For more informa...
You could abuse a UML class diagram with packages, or a component diagram to draw something like this.
27,513,114
I have searched and seen other similar questions but nothing has helped me. Here's examples of the tables I have: dbo.Product ``` PRODUCTID | LEVEL | SOMEFIELD1 | SOMEFIELD2 500 01 Blue Large 450 102 Black Large .... 250 03 Orange Medium ``` dbo.Level ```...
2014/12/16
[ "https://Stackoverflow.com/questions/27513114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1774037/" ]
The short answer is no, there is not one single place where you can deal with the site's location. That's because there are many possible outcomes that you might want, including: * site served from IIS root folder and accessed at root of domain (or not) * site served from IIS subfolder and accessed at same path (or no...
The ~ is added to make the path relative to root directory. One suggestion is to move the folder up a few levels.or down a few levels to make sure your project is in the correct directory. Hope this works
39,838,192
Just want to get the `tpl` text show, even though component renders successfully but have no text inside. Seem blank on screen ``` Ext.Component({ ... tpl: 'Hi let me show on screen please', }); ``` Why am not getting shown any thing?
2016/10/03
[ "https://Stackoverflow.com/questions/39838192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4859919/" ]
Templates expect the `data` property to be defined: ``` var foo = new Ext.Component({ renderTo: document.body, tpl: 'foo baroo', data: {} }); ```
As per [Documentation](http://docs.sencha.com/extjs/6.0.0/modern/Ext.Component.html#cfg-tpl) **The data configuration must be set for any content to be shown in the component when using this configuration.** As per your code you are not binding data and there for you not getting result. sample code should be like ...
356,690
I prove that $ f $ has a fixed point. My question is whether the point is unique and the mapping $ f $ is continuous.
2013/04/10
[ "https://math.stackexchange.com/questions/356690", "https://math.stackexchange.com", "https://math.stackexchange.com/users/60355/" ]
Paul has already shown uniqueness. Your mapping $f$ is indeed continuous. Theorem 10.1 in Munkres *Topology: A First Course* says that $f$ is continuous if, given any $x$ and a real $\epsilon > 0,$ there exists a $\delta > 0$ such that $$ d(x,y) < \delta \; \; \Longrightarrow \; \; d(f(x), f(y)) < \epsilon. $$ In this ...
Suppose $x\_0$, $x\_1$ are fixed points of $f$, i.e. $f(x\_0)=x\_0$ and $f(x\_1)=x\_1$. If $x\_0\neq x\_1$, then we can use the the inequality $d(f(x),f(y))<d(x,y)$ with $x=x\_0$ and $y=x\_1$, we have $$d(x\_0,x\_1)=d(f(x\_0),f(x\_1))<d(x\_0,x\_1),$$ which is a contradiction. Therefore, we must have $x\_0=x\_1$, i.e. t...
69,017,947
I have a React Native application that I recently updated. However, on the majority of my modules, I have this error: `#<WeakSet> could not be cloned.` For example, on the module : `@react-native-mapbox-gl` When I launch my application, I get the error : `node_modules\@react-native-mapbox-gl\maps\javascript\modules\...
2021/09/01
[ "https://Stackoverflow.com/questions/69017947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3968611/" ]
1. stop metro 2. reset repo 3. reinstall node\_packages 4. run `pod install --repo-update`
Try deleting `node_modules` and reinstall with `npm install` or `yarn install` again, and then: **IOS:** 1. `pod update SDWebImageWebPCoder` 2. `pod install --repo-update` 3. `build project in Xcode` **Android:** 1. `Open in Android Studio` and `Refresh Gradle Dependencies`. 2. `build project in Android Studio`