qid int64 1 74.6M | question stringlengths 45 24.2k | date stringlengths 10 10 | metadata stringlengths 101 178 | response_j stringlengths 32 23.2k | response_k stringlengths 21 13.2k |
|---|---|---|---|---|---|
51,943,181 | Hey guys so i got this dummy data:
```
115,IROM,1
125,FOLCOM,1
135,SE,1
111,ATLUZ,1
121,ATLUZ,2
121,ATLUZ,2
142,ATLUZ,2
142,ATLUZ,2
144,BLIZZARC,1
166,STEAD,3
166,STEAD,3
166,STEAD,3
168,BANDOI,1
179,FOX,1
199,C4,2
199,C4,2
```
Desired output:
```
IROM,1
FOLCOM,1
SE,1
ATLUZ,3
BLIZZARC,1
STEAD,1
BANDOI,1
FOX,1
C4,1... | 2018/08/21 | ['https://Stackoverflow.com/questions/51943181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3646742/'] | Before executing the `cut` command, do a `uniq`. This will remove the redundant lines and then you follow your command, i.e. apply `cut` to extract `2` field and do `uniq -c` to count character
```
uniq game.csv | cut -d',' -f 2 | uniq -c
``` | Using [GNU `datamash`](https://www.gnu.org/software/datamash/manual/datamash.html):
```
datamash -t, --sort --group 2 countunique 1 < input
```
Using [`awk`](https://www.gnu.org/software/gawk/manual/gawk.html):
```
awk -F, '!a[$1,$2]++{b[$2]++}END{for(i in b)print i FS b[i]}' input
```
Using [`sort`](https://www.... |
51,943,181 | Hey guys so i got this dummy data:
```
115,IROM,1
125,FOLCOM,1
135,SE,1
111,ATLUZ,1
121,ATLUZ,2
121,ATLUZ,2
142,ATLUZ,2
142,ATLUZ,2
144,BLIZZARC,1
166,STEAD,3
166,STEAD,3
166,STEAD,3
168,BANDOI,1
179,FOX,1
199,C4,2
199,C4,2
```
Desired output:
```
IROM,1
FOLCOM,1
SE,1
ATLUZ,3
BLIZZARC,1
STEAD,1
BANDOI,1
FOX,1
C4,1... | 2018/08/21 | ['https://Stackoverflow.com/questions/51943181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3646742/'] | Before executing the `cut` command, do a `uniq`. This will remove the redundant lines and then you follow your command, i.e. apply `cut` to extract `2` field and do `uniq -c` to count character
```
uniq game.csv | cut -d',' -f 2 | uniq -c
``` | This also does the trick. The only thing is that your output is not sorted.
```
awk 'BEGIN{ FS = OFS = "," }{ a[$2 FS $1] }END{ for ( i in a ){ split(i, b, "," ); c[b[1]]++ } for ( i in c ) print i, c[i] }' yourfile
```
Output:
```
BANDOI,1
C4,1
STEAD,1
BLIZZARC,1
FOLCOM,1
ATLUZ,3
SE,1
IROM,1
FOX,1
``` |
51,943,181 | Hey guys so i got this dummy data:
```
115,IROM,1
125,FOLCOM,1
135,SE,1
111,ATLUZ,1
121,ATLUZ,2
121,ATLUZ,2
142,ATLUZ,2
142,ATLUZ,2
144,BLIZZARC,1
166,STEAD,3
166,STEAD,3
166,STEAD,3
168,BANDOI,1
179,FOX,1
199,C4,2
199,C4,2
```
Desired output:
```
IROM,1
FOLCOM,1
SE,1
ATLUZ,3
BLIZZARC,1
STEAD,1
BANDOI,1
FOX,1
C4,1... | 2018/08/21 | ['https://Stackoverflow.com/questions/51943181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3646742/'] | Could you please try following too in a single `awk`.
```
awk -F, '
!a[$1,$2,$3]++{
b[$1,$2,$3]++
}
!f[$2]++{
g[++count]=$2
}
END{
for(i in b){
split(i,array,",")
c[array[2]]++
}
for(q=1;q<=count;q++){
print c[g[q]],g[q]
}
}' SUBSEP="," Input_file
```
It will give the order of output same as... | Less elegant, but you may use awk as well. If it is not granted that the same ID+NAME combos will always come consecutively, you have to count each by reading the whole file before output:
```
awk -F, '{c[$1,$2]+=1}END{for (ck in c){split(ck,ca,SUBSEP); print ca[2];g[ca[2]]+=1}for(gk in g){print gk,g[gk]}}' game.csv
... |
51,943,181 | Hey guys so i got this dummy data:
```
115,IROM,1
125,FOLCOM,1
135,SE,1
111,ATLUZ,1
121,ATLUZ,2
121,ATLUZ,2
142,ATLUZ,2
142,ATLUZ,2
144,BLIZZARC,1
166,STEAD,3
166,STEAD,3
166,STEAD,3
168,BANDOI,1
179,FOX,1
199,C4,2
199,C4,2
```
Desired output:
```
IROM,1
FOLCOM,1
SE,1
ATLUZ,3
BLIZZARC,1
STEAD,1
BANDOI,1
FOX,1
C4,1... | 2018/08/21 | ['https://Stackoverflow.com/questions/51943181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3646742/'] | Could you please try following too in a single `awk`.
```
awk -F, '
!a[$1,$2,$3]++{
b[$1,$2,$3]++
}
!f[$2]++{
g[++count]=$2
}
END{
for(i in b){
split(i,array,",")
c[array[2]]++
}
for(q=1;q<=count;q++){
print c[g[q]],g[q]
}
}' SUBSEP="," Input_file
```
It will give the order of output same as... | Using [GNU `datamash`](https://www.gnu.org/software/datamash/manual/datamash.html):
```
datamash -t, --sort --group 2 countunique 1 < input
```
Using [`awk`](https://www.gnu.org/software/gawk/manual/gawk.html):
```
awk -F, '!a[$1,$2]++{b[$2]++}END{for(i in b)print i FS b[i]}' input
```
Using [`sort`](https://www.... |
51,943,181 | Hey guys so i got this dummy data:
```
115,IROM,1
125,FOLCOM,1
135,SE,1
111,ATLUZ,1
121,ATLUZ,2
121,ATLUZ,2
142,ATLUZ,2
142,ATLUZ,2
144,BLIZZARC,1
166,STEAD,3
166,STEAD,3
166,STEAD,3
168,BANDOI,1
179,FOX,1
199,C4,2
199,C4,2
```
Desired output:
```
IROM,1
FOLCOM,1
SE,1
ATLUZ,3
BLIZZARC,1
STEAD,1
BANDOI,1
FOX,1
C4,1... | 2018/08/21 | ['https://Stackoverflow.com/questions/51943181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3646742/'] | Could you please try following too in a single `awk`.
```
awk -F, '
!a[$1,$2,$3]++{
b[$1,$2,$3]++
}
!f[$2]++{
g[++count]=$2
}
END{
for(i in b){
split(i,array,",")
c[array[2]]++
}
for(q=1;q<=count;q++){
print c[g[q]],g[q]
}
}' SUBSEP="," Input_file
```
It will give the order of output same as... | This also does the trick. The only thing is that your output is not sorted.
```
awk 'BEGIN{ FS = OFS = "," }{ a[$2 FS $1] }END{ for ( i in a ){ split(i, b, "," ); c[b[1]]++ } for ( i in c ) print i, c[i] }' yourfile
```
Output:
```
BANDOI,1
C4,1
STEAD,1
BLIZZARC,1
FOLCOM,1
ATLUZ,3
SE,1
IROM,1
FOX,1
``` |
51,943,181 | Hey guys so i got this dummy data:
```
115,IROM,1
125,FOLCOM,1
135,SE,1
111,ATLUZ,1
121,ATLUZ,2
121,ATLUZ,2
142,ATLUZ,2
142,ATLUZ,2
144,BLIZZARC,1
166,STEAD,3
166,STEAD,3
166,STEAD,3
168,BANDOI,1
179,FOX,1
199,C4,2
199,C4,2
```
Desired output:
```
IROM,1
FOLCOM,1
SE,1
ATLUZ,3
BLIZZARC,1
STEAD,1
BANDOI,1
FOX,1
C4,1... | 2018/08/21 | ['https://Stackoverflow.com/questions/51943181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3646742/'] | Using [GNU `datamash`](https://www.gnu.org/software/datamash/manual/datamash.html):
```
datamash -t, --sort --group 2 countunique 1 < input
```
Using [`awk`](https://www.gnu.org/software/gawk/manual/gawk.html):
```
awk -F, '!a[$1,$2]++{b[$2]++}END{for(i in b)print i FS b[i]}' input
```
Using [`sort`](https://www.... | Less elegant, but you may use awk as well. If it is not granted that the same ID+NAME combos will always come consecutively, you have to count each by reading the whole file before output:
```
awk -F, '{c[$1,$2]+=1}END{for (ck in c){split(ck,ca,SUBSEP); print ca[2];g[ca[2]]+=1}for(gk in g){print gk,g[gk]}}' game.csv
... |
51,943,181 | Hey guys so i got this dummy data:
```
115,IROM,1
125,FOLCOM,1
135,SE,1
111,ATLUZ,1
121,ATLUZ,2
121,ATLUZ,2
142,ATLUZ,2
142,ATLUZ,2
144,BLIZZARC,1
166,STEAD,3
166,STEAD,3
166,STEAD,3
168,BANDOI,1
179,FOX,1
199,C4,2
199,C4,2
```
Desired output:
```
IROM,1
FOLCOM,1
SE,1
ATLUZ,3
BLIZZARC,1
STEAD,1
BANDOI,1
FOX,1
C4,1... | 2018/08/21 | ['https://Stackoverflow.com/questions/51943181', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3646742/'] | Using [GNU `datamash`](https://www.gnu.org/software/datamash/manual/datamash.html):
```
datamash -t, --sort --group 2 countunique 1 < input
```
Using [`awk`](https://www.gnu.org/software/gawk/manual/gawk.html):
```
awk -F, '!a[$1,$2]++{b[$2]++}END{for(i in b)print i FS b[i]}' input
```
Using [`sort`](https://www.... | This also does the trick. The only thing is that your output is not sorted.
```
awk 'BEGIN{ FS = OFS = "," }{ a[$2 FS $1] }END{ for ( i in a ){ split(i, b, "," ); c[b[1]]++ } for ( i in c ) print i, c[i] }' yourfile
```
Output:
```
BANDOI,1
C4,1
STEAD,1
BLIZZARC,1
FOLCOM,1
ATLUZ,3
SE,1
IROM,1
FOX,1
``` |
20,473,565 | We have a automated batch Script which takes care of merge and outputs all the log (conflicts) in a text file for developers to get proper visibility.
Now the problem is sometimes it stops in between and gives the below error
**svn: E155015: One or more conflicts were produced while merging Resolve all conflicts an... | 2013/12/09 | ['https://Stackoverflow.com/questions/20473565', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2971999/'] | This happens when some of the commits were already "cherry-picked", i.e. merged using the `-r x:y` flag. In such case subversion first merges everything up to `x` and than everything above `y`. If merging `x` fails, it gives this error.
I don't think you should be working around it. If you want to do the merge, just d... | I would try adding the parameters:
```
--accept=postpone
```
I use this for running `svn merge` and what it will do is add conflict markers to the files, but should always return. I'm surprised that the `--non-interactive` flag doesn't do this automatically though. The other thing to try is amend the redirection to... |
1,765,441 | I am updating a piece of legacy code in one of our web apps. The app allows the user to upload a spreadsheet, which we will process as a background job.
Each of these user uploads creates a new table to store the spreadsheet data, so the number of tables in my SQL Server 2000 database will grow quickly - thousands of ... | 2009/11/19 | ['https://Stackoverflow.com/questions/1765441', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13356/'] | Having many tables is not an issue for the engine. The catalog metadata is optimized for very large sizes. There are also some advantages on having each user own its table, like ability to have separate security ACLs per table, separate table statistics for each user content and not least improve query performance for ... | I think this is definitely a problem that will be a pain later. Why would you need to create a new table every time? Unless there is a really good reason to do so, I would not do it.
The best way would be to simply create an ID and associate all uploaded data with an ID, all in the same table. This will require some ... |
1,765,441 | I am updating a piece of legacy code in one of our web apps. The app allows the user to upload a spreadsheet, which we will process as a background job.
Each of these user uploads creates a new table to store the spreadsheet data, so the number of tables in my SQL Server 2000 database will grow quickly - thousands of ... | 2009/11/19 | ['https://Stackoverflow.com/questions/1765441', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13356/'] | I think this is definitely a problem that will be a pain later. Why would you need to create a new table every time? Unless there is a really good reason to do so, I would not do it.
The best way would be to simply create an ID and associate all uploaded data with an ID, all in the same table. This will require some ... | I will suggest you to store these data in a single table. At the server side you can create a console from where user/operator could manually start the task of freeing up the table entries. You can ask them for range of dates whose data is no longer needed and the same will be deleted from the db.
You can take a step ... |
1,765,441 | I am updating a piece of legacy code in one of our web apps. The app allows the user to upload a spreadsheet, which we will process as a background job.
Each of these user uploads creates a new table to store the spreadsheet data, so the number of tables in my SQL Server 2000 database will grow quickly - thousands of ... | 2009/11/19 | ['https://Stackoverflow.com/questions/1765441', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13356/'] | Having many tables is not an issue for the engine. The catalog metadata is optimized for very large sizes. There are also some advantages on having each user own its table, like ability to have separate security ACLs per table, separate table statistics for each user content and not least improve query performance for ... | Having all of these tables isn't ideal for any database. After the upload, does the web app use the newly created table? Maybe it gives some feedback to the user on what was uploaded?
Does your application utilize all of these tables for any reporting etc? You mentioned keeping them around for a few months - not sure... |
1,765,441 | I am updating a piece of legacy code in one of our web apps. The app allows the user to upload a spreadsheet, which we will process as a background job.
Each of these user uploads creates a new table to store the spreadsheet data, so the number of tables in my SQL Server 2000 database will grow quickly - thousands of ... | 2009/11/19 | ['https://Stackoverflow.com/questions/1765441', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13356/'] | Having many tables is not an issue for the engine. The catalog metadata is optimized for very large sizes. There are also some advantages on having each user own its table, like ability to have separate security ACLs per table, separate table statistics for each user content and not least improve query performance for ... | I will suggest you to store these data in a single table. At the server side you can create a console from where user/operator could manually start the task of freeing up the table entries. You can ask them for range of dates whose data is no longer needed and the same will be deleted from the db.
You can take a step ... |
1,765,441 | I am updating a piece of legacy code in one of our web apps. The app allows the user to upload a spreadsheet, which we will process as a background job.
Each of these user uploads creates a new table to store the spreadsheet data, so the number of tables in my SQL Server 2000 database will grow quickly - thousands of ... | 2009/11/19 | ['https://Stackoverflow.com/questions/1765441', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13356/'] | Having all of these tables isn't ideal for any database. After the upload, does the web app use the newly created table? Maybe it gives some feedback to the user on what was uploaded?
Does your application utilize all of these tables for any reporting etc? You mentioned keeping them around for a few months - not sure... | I will suggest you to store these data in a single table. At the server side you can create a console from where user/operator could manually start the task of freeing up the table entries. You can ask them for range of dates whose data is no longer needed and the same will be deleted from the db.
You can take a step ... |
14,541,090 | So far I have this working properly for the error message only. However, I would like this to work for success message as well. This should happen when the submit button is pressed in the contact form. Click contact at the top right of the page to scroll to it.
You can test it [here](http://new.syntheticmedia.net).
H... | 2013/01/26 | ['https://Stackoverflow.com/questions/14541090', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1254063/'] | You could do :
```
$(document).ready(function() {
var pos = null;
if($("#contact-form #errors.visible").length > 0)
pos = $('#errors').offset().top;
if($("#contact-form #success.visible").length > 0)
pos = $('#success').offset().top;
if(pos != null)
$("html,body").anima... | ```
$(document).ready(function () {
var $elementToScrollTo;
var $firstError = $(".error:first");
if ($firstError.length > 0) {
$firstError.attr("id", "errors");
$elementToScrollTo = $firstError;
}
else {
$elementToScrollTo = $("#success");
}
$("html,body").animate({
... |
14,541,090 | So far I have this working properly for the error message only. However, I would like this to work for success message as well. This should happen when the submit button is pressed in the contact form. Click contact at the top right of the page to scroll to it.
You can test it [here](http://new.syntheticmedia.net).
H... | 2013/01/26 | ['https://Stackoverflow.com/questions/14541090', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1254063/'] | this solution make the same job for Contact Form 7 (popular form plugin for WordPress). I found this page during the search by Google of my problem, so I added the solution below to help others who ended also at this page.
```
jQuery(function ($) {
$(document).ready(function ()
{
var wpcf7Elm = documen... | ```
$(document).ready(function () {
var $elementToScrollTo;
var $firstError = $(".error:first");
if ($firstError.length > 0) {
$firstError.attr("id", "errors");
$elementToScrollTo = $firstError;
}
else {
$elementToScrollTo = $("#success");
}
$("html,body").animate({
... |
14,541,090 | So far I have this working properly for the error message only. However, I would like this to work for success message as well. This should happen when the submit button is pressed in the contact form. Click contact at the top right of the page to scroll to it.
You can test it [here](http://new.syntheticmedia.net).
H... | 2013/01/26 | ['https://Stackoverflow.com/questions/14541090', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1254063/'] | You could do :
```
$(document).ready(function() {
var pos = null;
if($("#contact-form #errors.visible").length > 0)
pos = $('#errors').offset().top;
if($("#contact-form #success.visible").length > 0)
pos = $('#success').offset().top;
if(pos != null)
$("html,body").anima... | this solution make the same job for Contact Form 7 (popular form plugin for WordPress). I found this page during the search by Google of my problem, so I added the solution below to help others who ended also at this page.
```
jQuery(function ($) {
$(document).ready(function ()
{
var wpcf7Elm = documen... |
19,313 | What is the difference between the words "inquiry" and "query?" I tend to associate the latter with technology (e.g., search engine queries), but I'm not sure what the actual meaning is. | 2011/04/03 | ['https://english.stackexchange.com/questions/19313', 'https://english.stackexchange.com', 'https://english.stackexchange.com/users/2852/'] | >
> **inquiry** describes an act of asking for information or an official investigation
>
>
> **query** is simply a question, especially one addressed to an official or an organization. In writing or speaking it is used to question the accuracy of a following statement or to introduce a question.
>
>
>
[NOAD] | Query is asking a simple question that does not require more than basic knowledge.
Inquiry is asking a question that requires further research or an investigation. |
18,042,485 | Via GDI/GDI+ get the text pixels or glyph, how to convert to 3d mesh? Does any exists library or source code can be used?
PS: I know D3DXCreateText, but Im using opengl... | 2013/08/04 | ['https://Stackoverflow.com/questions/18042485', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1716020/'] | If you works on OpenGL, you can try FTGL, it allows you to generate different polygon meshes from fonts, including extrudes meshes as well as render them:
<http://ftgl.sourceforge.net/docs/html/ftgl-tutorial.html>
but I am not sure how portable is this library specially for OpenGL ES... | Using GDI is definitely not among the best ways to go if you need to obtain glyphs for the text, you could use FreeType library instead (<http://www.freetype.org>), which is open-source and portable. It can produce both bitmaps and vectorized representation for the glyphs. You will have to initialize single instance of... |
501 | An extreme form of constructivism is called *finitisim*. In this form, unlike the standard axiom system, infinite sets are not allowed. There are important mathematicians, such as Kronecker, who supported such a system. I can see that the natural numbers and rational numbers can easily defined in a finitist system, by ... | 2010/07/22 | ['https://math.stackexchange.com/questions/501', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/145/'] | Disclaimer: I am not a finitist --- but as a theoretical computer scientist, I have a certain sympathy for finitism. The following is the result of me openly speculating what an "official" finitist response would be, based on grounds of computability.
The short version is this: **(a)** It depends on what you mean by a... | There is a fragment of mathematics that is given by a set of axioms known as the [Peano axioms](http://en.wikipedia.org/wiki/Peano_axioms). Using these rules you can carry out a vast amount of mathematics relating to natural numbers. For example you can prove lots of theorems in number theory using these axioms. The Pe... |
501 | An extreme form of constructivism is called *finitisim*. In this form, unlike the standard axiom system, infinite sets are not allowed. There are important mathematicians, such as Kronecker, who supported such a system. I can see that the natural numbers and rational numbers can easily defined in a finitist system, by ... | 2010/07/22 | ['https://math.stackexchange.com/questions/501', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/145/'] | Set theory with all sets finite has been studied, is a familiar theory in disguise, and is enough for most/all concrete real analysis.
Specifically, Zermelo-Fraenkel set theory with the Axiom of Infinity replaced by its negation (informally, "there is no infinite set") is equivalent to first-order Peano Arithmetic. Ca... | There is a fragment of mathematics that is given by a set of axioms known as the [Peano axioms](http://en.wikipedia.org/wiki/Peano_axioms). Using these rules you can carry out a vast amount of mathematics relating to natural numbers. For example you can prove lots of theorems in number theory using these axioms. The Pe... |
501 | An extreme form of constructivism is called *finitisim*. In this form, unlike the standard axiom system, infinite sets are not allowed. There are important mathematicians, such as Kronecker, who supported such a system. I can see that the natural numbers and rational numbers can easily defined in a finitist system, by ... | 2010/07/22 | ['https://math.stackexchange.com/questions/501', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/145/'] | There is a fragment of mathematics that is given by a set of axioms known as the [Peano axioms](http://en.wikipedia.org/wiki/Peano_axioms). Using these rules you can carry out a vast amount of mathematics relating to natural numbers. For example you can prove lots of theorems in number theory using these axioms. The Pe... | Finitism still allows you to use infinitary definitions of real numbers, because a finitist is content with finite *proofs* even if the concepts mentioned by those proofs would seem to require infinite sets. For example, a finitist would still recognize that "ZFC proves that every bounded nonempty set of reals has a le... |
501 | An extreme form of constructivism is called *finitisim*. In this form, unlike the standard axiom system, infinite sets are not allowed. There are important mathematicians, such as Kronecker, who supported such a system. I can see that the natural numbers and rational numbers can easily defined in a finitist system, by ... | 2010/07/22 | ['https://math.stackexchange.com/questions/501', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/145/'] | Set theory with all sets finite has been studied, is a familiar theory in disguise, and is enough for most/all concrete real analysis.
Specifically, Zermelo-Fraenkel set theory with the Axiom of Infinity replaced by its negation (informally, "there is no infinite set") is equivalent to first-order Peano Arithmetic. Ca... | Disclaimer: I am not a finitist --- but as a theoretical computer scientist, I have a certain sympathy for finitism. The following is the result of me openly speculating what an "official" finitist response would be, based on grounds of computability.
The short version is this: **(a)** It depends on what you mean by a... |
501 | An extreme form of constructivism is called *finitisim*. In this form, unlike the standard axiom system, infinite sets are not allowed. There are important mathematicians, such as Kronecker, who supported such a system. I can see that the natural numbers and rational numbers can easily defined in a finitist system, by ... | 2010/07/22 | ['https://math.stackexchange.com/questions/501', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/145/'] | Disclaimer: I am not a finitist --- but as a theoretical computer scientist, I have a certain sympathy for finitism. The following is the result of me openly speculating what an "official" finitist response would be, based on grounds of computability.
The short version is this: **(a)** It depends on what you mean by a... | Finitism still allows you to use infinitary definitions of real numbers, because a finitist is content with finite *proofs* even if the concepts mentioned by those proofs would seem to require infinite sets. For example, a finitist would still recognize that "ZFC proves that every bounded nonempty set of reals has a le... |
501 | An extreme form of constructivism is called *finitisim*. In this form, unlike the standard axiom system, infinite sets are not allowed. There are important mathematicians, such as Kronecker, who supported such a system. I can see that the natural numbers and rational numbers can easily defined in a finitist system, by ... | 2010/07/22 | ['https://math.stackexchange.com/questions/501', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/145/'] | Set theory with all sets finite has been studied, is a familiar theory in disguise, and is enough for most/all concrete real analysis.
Specifically, Zermelo-Fraenkel set theory with the Axiom of Infinity replaced by its negation (informally, "there is no infinite set") is equivalent to first-order Peano Arithmetic. Ca... | Finitism still allows you to use infinitary definitions of real numbers, because a finitist is content with finite *proofs* even if the concepts mentioned by those proofs would seem to require infinite sets. For example, a finitist would still recognize that "ZFC proves that every bounded nonempty set of reals has a le... |
87,839 | I have this image.I want to crop just triangle not its white background for logo im creating.How can i do it in illustrator or photoshop?[](https://i.stack.imgur.com/gLx3w.jpg) | 2017/04/01 | ['https://graphicdesign.stackexchange.com/questions/87839', 'https://graphicdesign.stackexchange.com', 'https://graphicdesign.stackexchange.com/users/70543/'] | If you want my opinion why your design doesn't work so well, I think it's because more of the contents lie outside the natural circle shape made by the original design - especially that bold "GAYPRIL" text.
You can see it here if I overlay a circle on both designs.
[](https://i.stack.imgur.com/gLx3w.jpg) | 2017/04/01 | ['https://graphicdesign.stackexchange.com/questions/87839', 'https://graphicdesign.stackexchange.com', 'https://graphicdesign.stackexchange.com/users/70543/'] | If you want my opinion why your design doesn't work so well, I think it's because more of the contents lie outside the natural circle shape made by the original design - especially that bold "GAYPRIL" text.
You can see it here if I overlay a circle on both designs.
[](https://i.stack.imgur.com/gLx3w.jpg) | 2017/04/01 | ['https://graphicdesign.stackexchange.com/questions/87839', 'https://graphicdesign.stackexchange.com', 'https://graphicdesign.stackexchange.com/users/70543/'] | *I’ve already been working on this answer in my spare time and I wouldn’t want to see the effort go to waste, although it’s not strictly on-topic, anymore. Nevertheless I’m posting it here in the hope that it might by useful, both for others and for the OP in the more general case. I’m adressing the first version of th... | You have addressed the biggest issue in your design with the changes to your fonts, and it looks so much better. Regarding your further question about the images, the hearts aren't completely working with the feel of your design. The sun, the new fonts, and the contained circular shape give the logo a flat look. While ... |
27,553,515 | I am currently working on a project which will use Entity Framework 6.1.1 and an Oracle 11g database backend. I will be accessing tables across multiple schemas some of which have foreign key relationships across schemas as well (look-up tables, enterprise data, etc...).
Traditionally we have used synonyms as a means... | 2014/12/18 | ['https://Stackoverflow.com/questions/27553515', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2701219/'] | To have each column be a different color, all you have to do is set the `colorByPoint` property to `true`.
Reference:
* <http://api.highcharts.com/highcharts#plotOptions.column.colorByPoint>
Alternatively you can make each column a separate series, which gives you additional levels of control.
*OTOH, in the majorit... | I finally found a way to show more than 1 color for each column:
```
var charts1 = [];
var $containers1 = $('#container1');
var datasets1 = [{
name: 'Dalias',
data: [29]
},
{
name: 'Lilas',
data: ... |
32,201 | I am making a simple voltage regulator. The whole idea is to just use ADC to read voltage on output side and based on the result, adjust PWM power. I am using PWM on physical pin 5. That's the same pin as the one connected to Arduino pin 10 on this image below:
... | 2016/12/12 | ['https://arduino.stackexchange.com/questions/32201', 'https://arduino.stackexchange.com', 'https://arduino.stackexchange.com/users/2955/'] | >
> This means that if I try to flash the program, ATTiny will start to put PWM power into my Arduino. I don't want that to happen.
>
>
>
Why do you think that is a problem? The "PWM power" cannot be any higher than the supply voltage, and that is 5V. The Arduino has no problem with you providing a 5V PWM signal t... | That isn't a problem but if you **really** want to prevent ATtiny generating the PWM signal right after flashing the firmware, then you might add a jumper to some free µC input and put the while loop at the beginning of the program which reads that input and waits until you remove the jumper. For example, you could ena... |
32,201 | I am making a simple voltage regulator. The whole idea is to just use ADC to read voltage on output side and based on the result, adjust PWM power. I am using PWM on physical pin 5. That's the same pin as the one connected to Arduino pin 10 on this image below:
... | 2016/12/12 | ['https://arduino.stackexchange.com/questions/32201', 'https://arduino.stackexchange.com', 'https://arduino.stackexchange.com/users/2955/'] | >
> This means that if I try to flash the program, ATTiny will start to put PWM power into my Arduino. I don't want that to happen.
>
>
>
Why do you think that is a problem? The "PWM power" cannot be any higher than the supply voltage, and that is 5V. The Arduino has no problem with you providing a 5V PWM signal t... | The Arduino-as-ISP sketch will turn all the OUTPUT pins, connected to the ATTiny, [back to **INPUT**](https://github.com/arduino/Arduino/blob/2bfe164b9a5835e8cb6e194b928538a9093be333/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino#L433-L439). That way nothing bad can happen, when the ATTiny drives those p... |
5,213,670 | I have three files; index.php, searchbar.php and search.php
now when i have search.php show its results on its own page its fine but when i try to include the search page in index.php i get nothing.
so i include the searchbox.php in index.php so i have a search bar, i then search for something and include the search.... | 2011/03/06 | ['https://Stackoverflow.com/questions/5213670', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/647328/'] | I think that I would probably prefer an approach like
```
In[1]:= Physics[find_, have_:{}] := Solve[
{d == vf*t - (a*t^2)/2 (* , etc *)} /. have, find]
In[2]:= Physics[d]
Out[2]= {{d -> 1/2 (-a t^2 + 2 t vf)}}
In[2]:= Physics[d, {t -> 9.7, vf -> -104.98, a -> -9.8}]
Out[2]= {{d -> -557.265}}
```
Where the `have`... | You are at least approaching this problem reasonably. I see a fine general purpose function and I see you're getting results, which is what matters primarily. There is no 'correct' solution, since there might be a large range of acceptable solutions. In some scenario's some solutions may be preferred over others, for i... |
5,213,670 | I have three files; index.php, searchbar.php and search.php
now when i have search.php show its results on its own page its fine but when i try to include the search page in index.php i get nothing.
so i include the searchbox.php in index.php so i have a search bar, i then search for something and include the search.... | 2011/03/06 | ['https://Stackoverflow.com/questions/5213670', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/647328/'] | Let me show some advanges of Simon's approach:
 | You are at least approaching this problem reasonably. I see a fine general purpose function and I see you're getting results, which is what matters primarily. There is no 'correct' solution, since there might be a large range of acceptable solutions. In some scenario's some solutions may be preferred over others, for i... |
5,213,670 | I have three files; index.php, searchbar.php and search.php
now when i have search.php show its results on its own page its fine but when i try to include the search page in index.php i get nothing.
so i include the searchbox.php in index.php so i have a search bar, i then search for something and include the search.... | 2011/03/06 | ['https://Stackoverflow.com/questions/5213670', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/647328/'] | I think that I would probably prefer an approach like
```
In[1]:= Physics[find_, have_:{}] := Solve[
{d == vf*t - (a*t^2)/2 (* , etc *)} /. have, find]
In[2]:= Physics[d]
Out[2]= {{d -> 1/2 (-a t^2 + 2 t vf)}}
In[2]:= Physics[d, {t -> 9.7, vf -> -104.98, a -> -9.8}]
Out[2]= {{d -> -557.265}}
```
Where the `have`... | Let me show some advanges of Simon's approach:
 |
37,163,656 | You have a big list and the goal is to retrieve this new list below
Today:
```
number color brand size tiresize
-----------------------------------------
1 blue d 5 6
2 blue d 5 6
3 red b 3 3
4 red b 3 3
etc....
```
Goal:
... | 2016/05/11 | ['https://Stackoverflow.com/questions/37163656', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/484390/'] | I think you can use [`groupby`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.groupby.html) with [`transform`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.core.groupby.GroupBy.transform.html):
```
import pandas as pd
import numpy as np
df = pd.DataFrame([[1,1,3],
... | ```
[df[i].fillna(df[i].mean(),inplace=True) for i in df.columns ]
```
This fills then NAN from column C with 5.8 which is the mean of columns 'C'
```
Output
print df
A B C
0 1 1 3.0
1 1 1 9.0
2 1 1 5.8
3 2 2 8.0
4 2 1 4.0
5 2 2 5.8
6 2 2 5.0
``... |
39,326,512 | I have the following two calculation using Math.round(...):
```
double x = 0.57145732;
x = x * 100;
x = Math.round(x * 10);
x = x / 10;
```
If I now print the value of x it will show me: 57.1.
```
double x = 0.57145732;
x = (Math.round((x * 100) * 10)) / 10;
// x = (Math.round(x * 1000)) / 10; //Also gives me 57.0.... | 2016/09/05 | ['https://Stackoverflow.com/questions/39326512', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/587261/'] | The `Math.round()` method returns an **integer** (of type `long` - as pointed out by [Ole V.V](https://stackoverflow.com/users/5772882/ole-v-v)). It's usually thought to return a `float` or `double` which gives rise to confusions as these.
In the second calculation,
```
Math.round((x * 100) * 10)
```
returns `571`.... | This because Math.round() returns an int. If you do this step-by-step (as in the first example), you assign the result of Math.round() to a float value. The following calculation uses then a float division.
In the second example, you let the JVM decide which types to use (and it uses an integer division as the interme... |
39,326,512 | I have the following two calculation using Math.round(...):
```
double x = 0.57145732;
x = x * 100;
x = Math.round(x * 10);
x = x / 10;
```
If I now print the value of x it will show me: 57.1.
```
double x = 0.57145732;
x = (Math.round((x * 100) * 10)) / 10;
// x = (Math.round(x * 1000)) / 10; //Also gives me 57.0.... | 2016/09/05 | ['https://Stackoverflow.com/questions/39326512', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/587261/'] | The reason of the difference is that in the second formula you're making a division of two integer. in order to have the same result you have to add a cast to double:
```
double x = 0.57145732;
x = (double)(Math.round((x * 100) * 10)) / 10;
``` | This because Math.round() returns an int. If you do this step-by-step (as in the first example), you assign the result of Math.round() to a float value. The following calculation uses then a float division.
In the second example, you let the JVM decide which types to use (and it uses an integer division as the interme... |
39,326,512 | I have the following two calculation using Math.round(...):
```
double x = 0.57145732;
x = x * 100;
x = Math.round(x * 10);
x = x / 10;
```
If I now print the value of x it will show me: 57.1.
```
double x = 0.57145732;
x = (Math.round((x * 100) * 10)) / 10;
// x = (Math.round(x * 1000)) / 10; //Also gives me 57.0.... | 2016/09/05 | ['https://Stackoverflow.com/questions/39326512', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/587261/'] | The difference is between
```
x = Math.round(571.45732) / 10;
```
and
```
x = Math.round(571.45732);
x = x / 10;
```
Since `round(double)` returns a long, in the first case you divide a long by an int, giving the long 57. Converting back to double leads to 57.0. The second case is equivalent to
```
x = ((double)... | This because Math.round() returns an int. If you do this step-by-step (as in the first example), you assign the result of Math.round() to a float value. The following calculation uses then a float division.
In the second example, you let the JVM decide which types to use (and it uses an integer division as the interme... |
39,326,512 | I have the following two calculation using Math.round(...):
```
double x = 0.57145732;
x = x * 100;
x = Math.round(x * 10);
x = x / 10;
```
If I now print the value of x it will show me: 57.1.
```
double x = 0.57145732;
x = (Math.round((x * 100) * 10)) / 10;
// x = (Math.round(x * 1000)) / 10; //Also gives me 57.0.... | 2016/09/05 | ['https://Stackoverflow.com/questions/39326512', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/587261/'] | The `Math.round()` method returns an **integer** (of type `long` - as pointed out by [Ole V.V](https://stackoverflow.com/users/5772882/ole-v-v)). It's usually thought to return a `float` or `double` which gives rise to confusions as these.
In the second calculation,
```
Math.round((x * 100) * 10)
```
returns `571`.... | The reason of the difference is that in the second formula you're making a division of two integer. in order to have the same result you have to add a cast to double:
```
double x = 0.57145732;
x = (double)(Math.round((x * 100) * 10)) / 10;
``` |
39,326,512 | I have the following two calculation using Math.round(...):
```
double x = 0.57145732;
x = x * 100;
x = Math.round(x * 10);
x = x / 10;
```
If I now print the value of x it will show me: 57.1.
```
double x = 0.57145732;
x = (Math.round((x * 100) * 10)) / 10;
// x = (Math.round(x * 1000)) / 10; //Also gives me 57.0.... | 2016/09/05 | ['https://Stackoverflow.com/questions/39326512', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/587261/'] | The `Math.round()` method returns an **integer** (of type `long` - as pointed out by [Ole V.V](https://stackoverflow.com/users/5772882/ole-v-v)). It's usually thought to return a `float` or `double` which gives rise to confusions as these.
In the second calculation,
```
Math.round((x * 100) * 10)
```
returns `571`.... | The difference is between
```
x = Math.round(571.45732) / 10;
```
and
```
x = Math.round(571.45732);
x = x / 10;
```
Since `round(double)` returns a long, in the first case you divide a long by an int, giving the long 57. Converting back to double leads to 57.0. The second case is equivalent to
```
x = ((double)... |
39,326,512 | I have the following two calculation using Math.round(...):
```
double x = 0.57145732;
x = x * 100;
x = Math.round(x * 10);
x = x / 10;
```
If I now print the value of x it will show me: 57.1.
```
double x = 0.57145732;
x = (Math.round((x * 100) * 10)) / 10;
// x = (Math.round(x * 1000)) / 10; //Also gives me 57.0.... | 2016/09/05 | ['https://Stackoverflow.com/questions/39326512', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/587261/'] | The reason of the difference is that in the second formula you're making a division of two integer. in order to have the same result you have to add a cast to double:
```
double x = 0.57145732;
x = (double)(Math.round((x * 100) * 10)) / 10;
``` | The difference is between
```
x = Math.round(571.45732) / 10;
```
and
```
x = Math.round(571.45732);
x = x / 10;
```
Since `round(double)` returns a long, in the first case you divide a long by an int, giving the long 57. Converting back to double leads to 57.0. The second case is equivalent to
```
x = ((double)... |
66,111,346 | I have an observable that has objects coming into it. I want to get a property from each object that matches a filter and create a single comma separate string over all the emissions that has the single property I want. How can I accomplish this?
What I've tried:
```
data.pipe(
map(item => item.map(d => d.source ... | 2021/02/09 | ['https://Stackoverflow.com/questions/66111346', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1991118/'] | Consider two points, `a` and `b`.
```py
a = [1,2]
b = [3,4]
```
When we zip them we get:
```py
print(list(zip(a, b))) # [[1,3], [2,4]]
```
We can see that the first element of each are paired together, and similarly for the second element of each. This is just how zip works; I suspect this makes sense for you. If... | `*` inside a function call converts a list (or other iterable) into a `*args` kind of argument.
`zip` with several lists iterates through them pairing up elements:
```
In [1]: list(zip([1,2,3],[4,5,6]))
Out[1]: [(1, 4), (2, 5), (3, 6)]
```
If we define a list:
```
In [2]: alist = [[1,2,3],[4,5,6]]
In [3]: list(zip... |
37,214 | Is there any formal notation for dealing with lists, rather than sets?
e.g. if I have a set $X=\{x\_1,\dots,x\_n\}$ and I want to add a new item to the set, say $x\_{n+1}$, I can say "Let $X = X \cup \{x\_{n+1}\}$" and it is clearly understood that I want to add $x\_{n+1}$ to my set.
However, if $X$ is not a set but ... | 2011/05/05 | ['https://math.stackexchange.com/questions/37214', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/13/'] | I don't think there is any standard notation.
One alternative would be to not use $(a,b)$ for ordered pairs but $a \times b$, which is the notation suggested by category theory. The $\times$ allows you to sweep lots of assocativity isomorphisms under the rug: it looks perfectly natural to write $(a \times b) \times c... | In addition to the answers mentioned above, I would like to stress that any list can be expressed as a set.
Formally, we can define a list to be a function, where the domain is a subset of the natural numbers. We can then express the function as a set of ordered pairs $(x,y)$, where $x$ is the input and $y$ is the ou... |
37,214 | Is there any formal notation for dealing with lists, rather than sets?
e.g. if I have a set $X=\{x\_1,\dots,x\_n\}$ and I want to add a new item to the set, say $x\_{n+1}$, I can say "Let $X = X \cup \{x\_{n+1}\}$" and it is clearly understood that I want to add $x\_{n+1}$ to my set.
However, if $X$ is not a set but ... | 2011/05/05 | ['https://math.stackexchange.com/questions/37214', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/13/'] | What you call a list is formally known as sequence. There was a question [which symbol is for sequence concatenation](https://math.stackexchange.com/questions/298648/is-there-a-common-symbol-for-concatenating-two-finite-sequences). Unfortunately there is no accepted answer. Symbols `⋅`, `⌒` (commentator actually used u... | In addition to the answers mentioned above, I would like to stress that any list can be expressed as a set.
Formally, we can define a list to be a function, where the domain is a subset of the natural numbers. We can then express the function as a set of ordered pairs $(x,y)$, where $x$ is the input and $y$ is the ou... |
24,750,593 | I try to use `panoramaGL` framework and try to add it to my static library. So I've imported it to the project, add `CoreGraphics` framework but have an issue `Unknown type name 'CGFloat'` in PLStructs.h. When I Cmd+click on the `CGFloat` in Xcode - I go to the `CGBase.h` in `CoreGraphics` framework. Try to clean the p... | 2014/07/15 | ['https://Stackoverflow.com/questions/24750593', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2042311/'] | The solution is simple:
```
#import <UIKit/UIKit.h>
``` | The same problem came for me in Cocos2D.
The solution is
1. Go to build settings. In **Architectures** field you might have "Standard architectures (armv7, armv7s, arm64).
2. The main cause for the problem is arm64. So the best way is to use "**armv7**" in the field.
3. We keep the standard architecture as is n "**va... |
24,750,593 | I try to use `panoramaGL` framework and try to add it to my static library. So I've imported it to the project, add `CoreGraphics` framework but have an issue `Unknown type name 'CGFloat'` in PLStructs.h. When I Cmd+click on the `CGFloat` in Xcode - I go to the `CGBase.h` in `CoreGraphics` framework. Try to clean the p... | 2014/07/15 | ['https://Stackoverflow.com/questions/24750593', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2042311/'] | The solution is simple:
```
#import <UIKit/UIKit.h>
``` | You actually don't need to import the full `UIKit`. This is enough:
```
#import <CoreGraphics/CoreGraphics.h>
``` |
24,750,593 | I try to use `panoramaGL` framework and try to add it to my static library. So I've imported it to the project, add `CoreGraphics` framework but have an issue `Unknown type name 'CGFloat'` in PLStructs.h. When I Cmd+click on the `CGFloat` in Xcode - I go to the `CGBase.h` in `CoreGraphics` framework. Try to clean the p... | 2014/07/15 | ['https://Stackoverflow.com/questions/24750593', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2042311/'] | The solution is simple:
```
#import <UIKit/UIKit.h>
``` | Also don't need a full CoreGraphics.h. This is enough:
```
#import <CoreGraphics/CGBase.h>
``` |
24,750,593 | I try to use `panoramaGL` framework and try to add it to my static library. So I've imported it to the project, add `CoreGraphics` framework but have an issue `Unknown type name 'CGFloat'` in PLStructs.h. When I Cmd+click on the `CGFloat` in Xcode - I go to the `CGBase.h` in `CoreGraphics` framework. Try to clean the p... | 2014/07/15 | ['https://Stackoverflow.com/questions/24750593', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2042311/'] | You actually don't need to import the full `UIKit`. This is enough:
```
#import <CoreGraphics/CoreGraphics.h>
``` | The same problem came for me in Cocos2D.
The solution is
1. Go to build settings. In **Architectures** field you might have "Standard architectures (armv7, armv7s, arm64).
2. The main cause for the problem is arm64. So the best way is to use "**armv7**" in the field.
3. We keep the standard architecture as is n "**va... |
24,750,593 | I try to use `panoramaGL` framework and try to add it to my static library. So I've imported it to the project, add `CoreGraphics` framework but have an issue `Unknown type name 'CGFloat'` in PLStructs.h. When I Cmd+click on the `CGFloat` in Xcode - I go to the `CGBase.h` in `CoreGraphics` framework. Try to clean the p... | 2014/07/15 | ['https://Stackoverflow.com/questions/24750593', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2042311/'] | Also don't need a full CoreGraphics.h. This is enough:
```
#import <CoreGraphics/CGBase.h>
``` | The same problem came for me in Cocos2D.
The solution is
1. Go to build settings. In **Architectures** field you might have "Standard architectures (armv7, armv7s, arm64).
2. The main cause for the problem is arm64. So the best way is to use "**armv7**" in the field.
3. We keep the standard architecture as is n "**va... |
24,750,593 | I try to use `panoramaGL` framework and try to add it to my static library. So I've imported it to the project, add `CoreGraphics` framework but have an issue `Unknown type name 'CGFloat'` in PLStructs.h. When I Cmd+click on the `CGFloat` in Xcode - I go to the `CGBase.h` in `CoreGraphics` framework. Try to clean the p... | 2014/07/15 | ['https://Stackoverflow.com/questions/24750593', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2042311/'] | Also don't need a full CoreGraphics.h. This is enough:
```
#import <CoreGraphics/CGBase.h>
``` | You actually don't need to import the full `UIKit`. This is enough:
```
#import <CoreGraphics/CoreGraphics.h>
``` |
73,724 | I have a lot of computers in my network and i need to get info about the software and hardware installed on all of them Is there any software to make such network inventory and audit? | 2009/11/21 | ['https://superuser.com/questions/73724', 'https://superuser.com', 'https://superuser.com/users/-1/'] | If you want to gather inventory/audit information **programmatically**, then use [WMI](http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx).
WMI has a good .NET interface that is readibly available from within Visual Studio 2008 as a collection of library classes. PowerShell also exposes this interface for sc... | You can try Spiceworks, it is free software with promo, also I’ve heard that the network inventory software by Clearapps is wide spread among sysadmins. It’s not free, but has more wide functionality. Or you can just google search and find everything here:
<http://www.google.com/search?hl=en&source=hp&q=pc+inventory+... |
73,724 | I have a lot of computers in my network and i need to get info about the software and hardware installed on all of them Is there any software to make such network inventory and audit? | 2009/11/21 | ['https://superuser.com/questions/73724', 'https://superuser.com', 'https://superuser.com/users/-1/'] | If you want to gather inventory/audit information **programmatically**, then use [WMI](http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx).
WMI has a good .NET interface that is readibly available from within Visual Studio 2008 as a collection of library classes. PowerShell also exposes this interface for sc... | you can try [OCS Inventory](http://www.ocsinventory-ng.org/) which is an open source software which allows to do that. |
67,794,186 | I'm looking to create a custom, reusable Angular Material component for a slide toggle. I want to be able to pass different click functions into it and get the MatSlideToggleChange object back. Instead I get 'undefined'.
Here is my custom component ts and html files:
```
<mat-slide-toggle
[id]="toggleId"
color="prima... | 2021/06/01 | ['https://Stackoverflow.com/questions/67794186', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2026659/'] | I see two potential issues with your usage of the `custom-slide-toggle`:
1. `toggleClick` should be binded with `(toggleClick)` as it's only an `Output`:
```html
(toggleClick)="onEnableUser(toggleEvent)"
```
2. `toggleEvent` is not the event variable, it should be `$event`:
```html
(toggleClick)="o... | Event binding is with parentheses so i think that
```
(toggleClick)="onEnableUser(toggleEvent)"
```
should work. |
1,590,623 | Reading This Article: [Digital Trends CMD Commands](https://www.digitaltrends.com/computing/how-to-use-command-prompt/).
I Found A command Called Finger.
Trying it out on My System, Windows 10
Why won't it let me Finger anyone..
Says `Connect: Connection Refused?`
[.
* [History of the Finger protocol](http://www.rajivshah.com/Case_Studies/Finger/Finger.htm)
* [RFC 742](ht... | That articles information on finger is a bit if a nonsense. Finger is a fairly simple command that is disabled pretty much everywhere because it is more a security threat then a benefit. It was commonly deployed in the early Internet (prior to mass users and security concerns) and does not use encryption or security.
... |
22,224,840 | I want to use mechanize to log into a page and retrieve some information. But however I try to authenticate It just fails with Error code **HTTP 401**, as you can see below:
```
r = br.open('http://intra')
File "bui...e\_mechanize.py", line 203, in open
File "bui...g\mechanize\_mechanize.py", line 255,
in _mech_openme... | 2014/03/06 | ['https://Stackoverflow.com/questions/22224840', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/576671/'] | After tons of reaserch I managed to find out the reason behind this.
Find of all the site uses a so called [NTLM authentication](http://hc.apache.org/httpclient-legacy/authentication.html#Authentication_Schemes), which is not supported by mechanize.
This can help to find out the authentication mechanism of a site:
``... | @theAlse : did you need to separately handle session cookies? I used your approach to authenticate against the SSO server but when I access the main site (ServiceNow) on the second "browser.open" call I still get a 401:Unauthorized error.
I tacked on a debug message on the mechanize \_response.py file to show the URL ... |
23,517,225 | I have an MVC 5 / Bootstrap application. On one of the pages, I have a number of fields all bound to the model associated with the page. However, I also have a simple unordered list which always starts out empty and the user can then add items to it. They do this by entering some text into a type ahead field. Once the ... | 2014/05/07 | ['https://Stackoverflow.com/questions/23517225', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/163534/'] | Here is one way to skin this cat:
A) Add a collection to your model (which really should be a ViewModel, and not a domain model) to hold those items
B) In your button's click handler, create a hidden input field that conforms to the ASP.Net Wire Format: <http://www.hanselman.com/blog/ASPNETWireFormatForModelBindingTo... | There couple of ways to work it out.
If you don't want to add to model, what I would prefer to do you can:
1. Directly access item that were posted via `Controller.Request` property;
2. You can post this items separately via Ajax request, and handle them in different controller action. |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | Your response is proper but your parsing is not proper. So first of all add GSON in your gradle file.
`compile 'com.google.code.gson:gson:2.4'`
Now use below your code for parsing your response
```
try {
JSONArray array = new JSONArray("put your response here");
Gson gson = new Gson();
for (... | The Error clearly states that the Gson accepts `JsonObject` not `JsonArray`. In your case you can put the response `JsonArray` into a `JsonObject` with a key for that `JsonArray` and give that key as `annotation` in `SurvivorZAMQuestionList`. By this way you can easily sort this problem.
Hope this is Helpful :) |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | Your response is proper but your parsing is not proper. So first of all add GSON in your gradle file.
`compile 'com.google.code.gson:gson:2.4'`
Now use below your code for parsing your response
```
try {
JSONArray array = new JSONArray("put your response here");
Gson gson = new Gson();
for (... | You can try to use GSON library -> `compile 'com.google.code.gson:gson:2.8.0'`
```
List<SurvivorZAMQuestionnaire> survivorZAMQuestionnaires;
...
Gson gson = new Gson();
Type listType = new TypeToken<List<SurvivorZAMQuestionnaire>>(){}.getType();
survivorZAMQuestionnaires = gson.fromJson(jsonString, listType);
```
`... |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | Your response is proper but your parsing is not proper. So first of all add GSON in your gradle file.
`compile 'com.google.code.gson:gson:2.4'`
Now use below your code for parsing your response
```
try {
JSONArray array = new JSONArray("put your response here");
Gson gson = new Gson();
for (... | Parse Your Json this way,
```
List<SurvivorZAMQuestionnaire> survivorZAMQuestionnaires = new Gson().fromJson(json, new TypeToken<List<SurvivorZAMQuestionnaire>>() {
}.getType());
``` |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | Your response is proper but your parsing is not proper. So first of all add GSON in your gradle file.
`compile 'com.google.code.gson:gson:2.4'`
Now use below your code for parsing your response
```
try {
JSONArray array = new JSONArray("put your response here");
Gson gson = new Gson();
for (... | Do a gradle dependency of gson.
```
compile 'com.google.code.gson:gson:2.4'
```
Update code like this;
```
private void parseJSON(String jsonMessage) throws JSONException {
if (jsonMessage.startsWith("[")) {
Type type = new TypeToken<List<SurvivorZAMQuestionnaire>>()
... |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | Your response is proper but your parsing is not proper. So first of all add GSON in your gradle file.
`compile 'com.google.code.gson:gson:2.4'`
Now use below your code for parsing your response
```
try {
JSONArray array = new JSONArray("put your response here");
Gson gson = new Gson();
for (... | You need List of objects not only object, because your JSON contain list of objects. [How to Parse JSON Array in Android with Gson](https://stackoverflow.com/a/8371455/3529309) |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | The Error clearly states that the Gson accepts `JsonObject` not `JsonArray`. In your case you can put the response `JsonArray` into a `JsonObject` with a key for that `JsonArray` and give that key as `annotation` in `SurvivorZAMQuestionList`. By this way you can easily sort this problem.
Hope this is Helpful :) | You can try to use GSON library -> `compile 'com.google.code.gson:gson:2.8.0'`
```
List<SurvivorZAMQuestionnaire> survivorZAMQuestionnaires;
...
Gson gson = new Gson();
Type listType = new TypeToken<List<SurvivorZAMQuestionnaire>>(){}.getType();
survivorZAMQuestionnaires = gson.fromJson(jsonString, listType);
```
`... |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | The Error clearly states that the Gson accepts `JsonObject` not `JsonArray`. In your case you can put the response `JsonArray` into a `JsonObject` with a key for that `JsonArray` and give that key as `annotation` in `SurvivorZAMQuestionList`. By this way you can easily sort this problem.
Hope this is Helpful :) | Parse Your Json this way,
```
List<SurvivorZAMQuestionnaire> survivorZAMQuestionnaires = new Gson().fromJson(json, new TypeToken<List<SurvivorZAMQuestionnaire>>() {
}.getType());
``` |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | The Error clearly states that the Gson accepts `JsonObject` not `JsonArray`. In your case you can put the response `JsonArray` into a `JsonObject` with a key for that `JsonArray` and give that key as `annotation` in `SurvivorZAMQuestionList`. By this way you can easily sort this problem.
Hope this is Helpful :) | Do a gradle dependency of gson.
```
compile 'com.google.code.gson:gson:2.4'
```
Update code like this;
```
private void parseJSON(String jsonMessage) throws JSONException {
if (jsonMessage.startsWith("[")) {
Type type = new TypeToken<List<SurvivorZAMQuestionnaire>>()
... |
40,522,008 | Note: This is an opinionated question. I m asking this as I was unable to find proper articles covering my concern.
PHP (alone or with a framework like laravel) can be used for both backend and frontend (with templating engines like Blade,Smarty,etc) development.
My concern is:
1. Is it good to use templating engine... | 2016/11/10 | ['https://Stackoverflow.com/questions/40522008', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5193722/'] | The Error clearly states that the Gson accepts `JsonObject` not `JsonArray`. In your case you can put the response `JsonArray` into a `JsonObject` with a key for that `JsonArray` and give that key as `annotation` in `SurvivorZAMQuestionList`. By this way you can easily sort this problem.
Hope this is Helpful :) | You need List of objects not only object, because your JSON contain list of objects. [How to Parse JSON Array in Android with Gson](https://stackoverflow.com/a/8371455/3529309) |
13,803,059 | I need to run `knit2html` on the command line using `Rscript`. I tried the following code and it works
```
Rscript -e "(knitr::knit2html(text = '## good', fragment.only = TRUE))"
```
However, when I introduce R code chunks (or anything involving backticks), the process hangs. So the following does NOT work
```
Rscr... | 2012/12/10 | ['https://Stackoverflow.com/questions/13803059', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/235349/'] | Android 2.3
```
// display the data
String baseUrl = "";
String mimeType = "text/html";
String encoding = "UTF-8";
html = sb.toString();
String historyUrl = "";
webViewDataViewer.loadDataWithBaseURL(baseUrl, html, mimeType, encoding, historyUrl);
``` | The % symbol does not load in Android 2.2 webview
It has to be encoded. |
63,768 | Fluids exert hydrostatic pressure because their molecules hit each other or the immersed body, but why is that at a greater depth pressure is higher when molecules are the same ?
Assume density of fluid is uniform throughout the liquid. | 2013/05/08 | ['https://physics.stackexchange.com/questions/63768', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/-1/'] | Your statement:
>
> Assume density of fluid is same throughout.
>
>
>
conflicts with your actual question
>
> But why is that at a greater depth pressure is higher when molecules are the same?
>
>
>
If we imposed the very strict and non-physical constraint that the density of the fluid was uniform and iso... | In short: because the weight does it so.
Imagine a situation where several people are walking on each other in a small room: those that are at the top don't feel any discomfort whereas those at the bottom are crunched by the weight of the one above them. It's quite the same for the molecules. |
63,768 | Fluids exert hydrostatic pressure because their molecules hit each other or the immersed body, but why is that at a greater depth pressure is higher when molecules are the same ?
Assume density of fluid is uniform throughout the liquid. | 2013/05/08 | ['https://physics.stackexchange.com/questions/63768', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/-1/'] | Your statement:
>
> Assume density of fluid is same throughout.
>
>
>
conflicts with your actual question
>
> But why is that at a greater depth pressure is higher when molecules are the same?
>
>
>
If we imposed the very strict and non-physical constraint that the density of the fluid was uniform and iso... | First, think of this in terms of psi:
This is a bit simplified, but: When you are standing at sea level, under S.T.P (Standard Temperature and Pressure), you have a column of air some 120,000 feet high pushing on you. That weighs 14.7 pounds. (for a column that has a cross-section of one square inch.)
That is the pre... |
119,756 | I am on a wireless network trying to play CS go with my friends. They all are in the same room with me. How can I create a server so I can play with my friends? In CS 1.6 we launch a hlds file which is in the cs 1.6 directory. We create a server through launching this hlds file. But in Counter Strike: Global Offensive ... | 2013/06/09 | ['https://gaming.stackexchange.com/questions/119756', 'https://gaming.stackexchange.com', 'https://gaming.stackexchange.com/users/49842/'] | Valve keeps the documentation for installing CS:GO servers on the [Valve Developer Wiki](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers). The docs don't present a direct step-by-step procedure, though, so I'll try to assist.
1. Download [SteamCMD](https://developer.valveso... | have you tried adding the -ip command line parameter with the LAN ip of the server?
If you activated the gamemodes\_server, are you sure it does not have any syntax error in there?
I've been setting up csgo servers since May 2013 and those were the most common issues. |
9,434 | I'm completely new to this, so I don't know if I'm doing something dumb or my regulator is broken. Here's what I'm doing:
Here's what I'm doing:
1. I connected [this regulator](http://www.beveragefactory.com/draftbeer/regulator/double/premium_double_gauge_542.html) to a 5 lb. CO2 cylinder.
2. Closed the blue output v... | 2013/02/21 | ['https://homebrew.stackexchange.com/questions/9434', 'https://homebrew.stackexchange.com', 'https://homebrew.stackexchange.com/users/3159/'] | It sounds like what you're doing is correct. (And I guess you've tried turning it all the way to the right - clockwise?)
The relief valve can be quite sensitive on some regulators, causing it to fire a little prematurely, so it might have been that, but for the fact that you say the dial jumps to 60 psi.
I would dou... | CO2 Regulator knobs are counter intuitive for 1st time users.
When you "close it" like a faucet clockwise in fact you are adjusting a screw/pushing a pin that allow more CO2 flow.
Short: Try twisting all the way counter clockwise.
If it still fails, have your reg checked. |
4,658,963 | Is this a right code from the point of view of memory management?
```
NSEntityDescription *description = [NSEntityDescription
entityForName:@"Event" inManagedObjectContext:managedObjectContext];
NSFetchRequest *eventRequest = [[[NSFetchRequest alloc] init] autorelease];
[eventRe... | 2011/01/11 | ['https://Stackoverflow.com/questions/4658963', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/258863/'] | Looking at that code, the only object you own is the `eventRequest`. It is being autoreleased so you don't need to release it again.
From what I can see, based on naming convention, all the other objects aren't owned, so you don't need to release them.
The line `[description release];` will likely cause a crash for y... | You dont't need any releases for that code. You should read [Apple's documentation](http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/MemoryMgmt/MemoryMgmt.html) to find out why. |
11,906,750 | I want to scroll to the bottom of my tableview that contains custom cells.
Here is the code I am using to scroll:
```
NSIndexPath *lastMessage = [NSIndexPath indexPathForRow:[self.conversation.messages count]-1 inSection:0];
[self.messageTable scrollToRowAtIndexPath:lastMessage atScrollPosition:UITableViewScrollPosi... | 2012/08/10 | ['https://Stackoverflow.com/questions/11906750', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/482255/'] | Turned out to be a timing issue. The tableview hadn't fully rendered yet when I called that method from viewdidload (contentsize of 0). Calling this method in viewDidAppear works brilliantly though. | It seems like the UITableView is confused about how big your cells are. Set the `rowHeight` property on the UITableView to the height of your custom cell. |
7,917,076 | I tried the `CONVERT(TIME,sample_datetime)`, but my software does not recognize TIME as a type.
How do I take sample `datetime` and extract the time from it in one variable and the day of the week from it in another variable? | 2011/10/27 | ['https://Stackoverflow.com/questions/7917076', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/971115/'] | Using [DATEPART()](http://msdn.microsoft.com/en-us/library/ms174420.aspx) function:
```
// returns 4
SELECT DATEPART(day, '2010-09-04 11:22:33')
// returns 7
SELECT DATEPART(dw, '2010-09-04 11:22:33')
// returns 11:22:33
SELECT CAST(DATEPART(HOUR, '2010-09-04 11:22:33') AS VARCHAR(2)) + ':'
+ CAST(DATEPART(MINU... | you didnt specify sql server version but
`select datepart(dw,yourdate)` should do it. |
7,917,076 | I tried the `CONVERT(TIME,sample_datetime)`, but my software does not recognize TIME as a type.
How do I take sample `datetime` and extract the time from it in one variable and the day of the week from it in another variable? | 2011/10/27 | ['https://Stackoverflow.com/questions/7917076', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/971115/'] | Using [DATEPART()](http://msdn.microsoft.com/en-us/library/ms174420.aspx) function:
```
// returns 4
SELECT DATEPART(day, '2010-09-04 11:22:33')
// returns 7
SELECT DATEPART(dw, '2010-09-04 11:22:33')
// returns 11:22:33
SELECT CAST(DATEPART(HOUR, '2010-09-04 11:22:33') AS VARCHAR(2)) + ':'
+ CAST(DATEPART(MINU... | DATEPART or DATENAME with DW will work for the day of the week depending on which format you need
```
SELECT DATEPART(DW, GETDATE())
SELECT DATENAME(DW, GETDATE())
```
You can convert the datetime to a varchar with specific formatting to get just the time
```
SELECT CONVERT(VARCHAR, GETDATE(), 14)
```
2008 has a ... |
74,357,690 | According to the Serverless [documentation](https://www.serverless.com/framework/docs/guides/parameters#), I should be able to define params within the dashboard/console. But when I navigate there, the inputs are disabled:
[](https://i.stack.imgur.com/... | 2022/11/08 | ['https://Stackoverflow.com/questions/74357690', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11664580/'] | Passing `param` flags will not upload the parameters to Dashboard/Console, it will only expose them in your configuration so you can access them with `${param:<param-name>}`. To my best knowledge, it is not possible to set Dashboard parameters with CLI, you need to set them manually via UI. | It was a permissions problem. The owner of the account updated the permissions and I was able to update the inputs. |
48,646,089 | I want to split this df into bins based on the variable Quality. However, it is extremely right skewed
```
TSI2 YRI Chromosome Quality
a1 0.03829518 0.050231431 22 0.860
a2 0.03110103 0.010192455 22 0.938
a3 0.03141379 0.060045625 22 0.848
```
This is a hist of Quali... | 2018/02/06 | ['https://Stackoverflow.com/questions/48646089', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5784757/'] | Applying the `FileStream` approach - as already mentioned - use the `FileStream` [constructor](https://learn.microsoft.com/en-us/dotnet/api/system.io.filestream.-ctor?view=netframework-4.8#System_IO_FileStream__ctor_System_String_System_IO_FileMode_System_IO_FileAccess_System_IO_FileShare_System_Int32_) that accepts a ... | *Posting as a community wiki, since it doesn't technically answer the question, but suggested code won't work as a comment.*
You can return a stream directly from `FileResult`, so there's no need to manually read from it. In fact, your code doesn't actually "stream", since you're basically reading the whole stream int... |
2,005,378 | Let $p$ be a prime number and $A$ be a commutative ring with unity. We say that $A$ has characteristic $p$ if $p\cdot 1\_A=0$. I would like to know if you could have a ring $A$ with all residue fields (= $\operatorname{Frac}(A/\mathfrak{p}$) with $\mathfrak{p}$ a prime ideal) of characteristic $p$ but $A$ itself not be... | 2016/11/08 | ['https://math.stackexchange.com/questions/2005378', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/217745/'] | You can take $\mathbb{Z}/4\mathbb{Z}.$ This has characteristic $4$, the only prime is $(2)$ and the residue field $\mathbb{F}\_2$ is of characteristic $2$.
EDIT:
You may also say something positive (but not really surprising either):
>
> If $A$ is an integral domain such that all the residue fields are of equal char... | Have you think in $\mathbb{Z}\_{(p)}=\{\frac{a}{b}\mid p\nmid b\}$?. This ring has charateristic $0$. But it is a local ring, with unique maximal ideal $p\mathbb{Z}\_{(p)}$. So its residue field $\mathbb{Z}\_{(p)}/p\mathbb{Z}\_{(p)}$ is isomorphic to $\mathbb{Z}\_p$ the integeres modulo p. |
236,953 | Can anyone tell me how to tell if the predictors I am using are collinear and can not be used in a `geeglm` model? What is the value and is calculating the correlation the correct way of determining it? | 2016/09/26 | ['https://stats.stackexchange.com/questions/236953', 'https://stats.stackexchange.com', 'https://stats.stackexchange.com/users/115530/'] | You can start by looking at the Pearson pariwise correlations to get the strength and direction of the linear association between any two (continuous) predictors. This can give you some insights about the data. In R you can use:
`cor(dat[,names(dat)], use ="pairwise", method = "pearson")`
However, there is no exact th... | If what you are after is a list of covariates that are not collinear, you can use `lm()` to do the job for you.
Here is an example (with simulated data):
```
# Simulate data
x1 <- runif(100)
x2 <- runif(100)
x3 <- x1 + x2
y <- x1+x2+rnorm(100)
dat <- data.frame(y,x1,x2,x3)
# Run lm() on your data
reg <- lm(y~.,dat)
... |
33,487,368 | Simple question that I have no idea of the answer to.
Is there a way to use just one xaml page (at least one "main" page) to emulate multiple pages. i.e the same as:
```
this.Frame.Navigate(typeof(Page2), null);
```
*but* using only one page?
Thanks so much, any help is appreciated. | 2015/11/02 | ['https://Stackoverflow.com/questions/33487368', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2463166/'] | >
> Currently when creating a FormData object, a checked checkbox is added with a value of "on", and an unchecked checkbox is not passed at all.
>
>
>
`on` is only used if the checkbox is missing a `value` attribute
>
> Do I have to hack in some hidden inputs to properly set checkboxes
>
>
>
No. That *is* pr... | Try this:
```
var checkbox = $("#myForm").find("input[type=checkbox]");
$.each(checkbox, function(key, val) {
formData.append($(val).attr('name'), this.is(':checked'))
});
```
It always adds the field to `FormData` with either a value of `true` when checked, or `false` when unchecked. |
33,487,368 | Simple question that I have no idea of the answer to.
Is there a way to use just one xaml page (at least one "main" page) to emulate multiple pages. i.e the same as:
```
this.Frame.Navigate(typeof(Page2), null);
```
*but* using only one page?
Thanks so much, any help is appreciated. | 2015/11/02 | ['https://Stackoverflow.com/questions/33487368', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2463166/'] | >
> Currently when creating a FormData object, a checked checkbox is added with a value of "on", and an unchecked checkbox is not passed at all.
>
>
>
`on` is only used if the checkbox is missing a `value` attribute
>
> Do I have to hack in some hidden inputs to properly set checkboxes
>
>
>
No. That *is* pr... | I took a slightly different approach from the existing answers. I created my form data variable the standard jQuery way inside my form submit event handler:
```
var form = $(this).get(0);
var formData = new FormData(form);
```
Based on [Quentin's answer](https://stackoverflow.com/a/33487482), saying that it is only ... |
33,487,368 | Simple question that I have no idea of the answer to.
Is there a way to use just one xaml page (at least one "main" page) to emulate multiple pages. i.e the same as:
```
this.Frame.Navigate(typeof(Page2), null);
```
*but* using only one page?
Thanks so much, any help is appreciated. | 2015/11/02 | ['https://Stackoverflow.com/questions/33487368', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2463166/'] | Try this:
```
var checkbox = $("#myForm").find("input[type=checkbox]");
$.each(checkbox, function(key, val) {
formData.append($(val).attr('name'), this.is(':checked'))
});
```
It always adds the field to `FormData` with either a value of `true` when checked, or `false` when unchecked. | I took a slightly different approach from the existing answers. I created my form data variable the standard jQuery way inside my form submit event handler:
```
var form = $(this).get(0);
var formData = new FormData(form);
```
Based on [Quentin's answer](https://stackoverflow.com/a/33487482), saying that it is only ... |
326,104 | [](https://i.stack.imgur.com/Rdip2.jpg)Recently I got stuck witht the following problem.
Imagine we have uniform a magnetic field which induction points upwards. The fields strength is steadily decreasing. If we put an iron coil perpendicular to the ... | 2017/04/12 | ['https://physics.stackexchange.com/questions/326104', 'https://physics.stackexchange.com', 'https://physics.stackexchange.com/users/89976/'] | Since the Maxwell's equations are linear partial differential equations, you can compute the magnetic field due to multiple sources by superposition.
A really important application relies on the superposition principle for magnetic fields is the Biot–Savart law i.e. the fact that the magnetic field is a vector sum of... | You are correct, they follow superposition. The magnetic field is a vector field, and so they follow a vector sum when they are in a superposition.
Maxwell's equations are linear ($\nabla \times$ and $\nabla \dot{}$ are linear operators) and it follows that solutions ($E$ and $B$) obey the superposition principle. |
3,200,569 | **Short Version:**
How can it be geometrically shown that non-singular 2D linear transformations take circles to ellipses?
*(Also, its probably important to state I'd prefer an explanation that doesn't use SVD, as I don't really understand it yet...although I see it everywhere)*
**Long Version:**
Let's use the defin... | 2019/04/24 | ['https://math.stackexchange.com/questions/3200569', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/493688/'] | The equation of a circle is $x^2 + y^2 = r^2$, or in terms of vectors $(x,y) \pmatrix{x\cr y} = r^2$ An invertible linear transformation $T$ takes $\pmatrix{x\cr y}$ to $\pmatrix{X\cr Y} = T\pmatrix{x\cr y}$. Thus $\pmatrix{x\cr y\cr} = T^{-1} \pmatrix{X\cr Y}$, and $(x,y) = (X, Y) (T^{-1})^\top$. The equation becomes
... | Every real square matrix has a [polar decomposition](https://en.wikipedia.org/wiki/Polar_decomposition) into the product of an orthogonal matrix $U$ and a positive-semidefinite (symmetric) matrix $P$. If the original matrix is nonsingular, then $P$ is positive-definite. In 2-D, orthogonal matrices represent either rota... |
3,200,569 | **Short Version:**
How can it be geometrically shown that non-singular 2D linear transformations take circles to ellipses?
*(Also, its probably important to state I'd prefer an explanation that doesn't use SVD, as I don't really understand it yet...although I see it everywhere)*
**Long Version:**
Let's use the defin... | 2019/04/24 | ['https://math.stackexchange.com/questions/3200569', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/493688/'] | The equation of a circle is $x^2 + y^2 = r^2$, or in terms of vectors $(x,y) \pmatrix{x\cr y} = r^2$ An invertible linear transformation $T$ takes $\pmatrix{x\cr y}$ to $\pmatrix{X\cr Y} = T\pmatrix{x\cr y}$. Thus $\pmatrix{x\cr y\cr} = T^{-1} \pmatrix{X\cr Y}$, and $(x,y) = (X, Y) (T^{-1})^\top$. The equation becomes
... | The answers on this thread are quite insightful but I am attempting here a rather very geometric answer, as the OP demanded so. For this I am going to use another interesting geometric interpretation of linear transformation (which is easier to imagine)
An alternate geometric interpretation of (dimension-preserving) l... |
3,200,569 | **Short Version:**
How can it be geometrically shown that non-singular 2D linear transformations take circles to ellipses?
*(Also, its probably important to state I'd prefer an explanation that doesn't use SVD, as I don't really understand it yet...although I see it everywhere)*
**Long Version:**
Let's use the defin... | 2019/04/24 | ['https://math.stackexchange.com/questions/3200569', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/493688/'] | Every real square matrix has a [polar decomposition](https://en.wikipedia.org/wiki/Polar_decomposition) into the product of an orthogonal matrix $U$ and a positive-semidefinite (symmetric) matrix $P$. If the original matrix is nonsingular, then $P$ is positive-definite. In 2-D, orthogonal matrices represent either rota... | The answers on this thread are quite insightful but I am attempting here a rather very geometric answer, as the OP demanded so. For this I am going to use another interesting geometric interpretation of linear transformation (which is easier to imagine)
An alternate geometric interpretation of (dimension-preserving) l... |
1,726,843 | When reading a PHP book I wanted to try my own (continue) example.
I made the following code but it doesn't work although everything seems to be ok
```
$num2 = 1;
while ($num2 < 19)
{
if ($num2 == 15) {
continue;
} else {
echo "Continue at 15 (".$num2.").<... | 2009/11/13 | ['https://Stackoverflow.com/questions/1726843', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/210142/'] | if you don't increment `$num2` before the `continue` you will get into an infinite loop;
```
$num2 = 0;
while ($num2 < 18)
{
$num2++;
if ($num2 == 15) {
continue;
} else {
echo "Continue at 15 (".$num2.").<br />";
}
}
``` | You don't even need continue there, your code equivalent to;
```
$num2 = 1;
while ($num2 < 19){
if ($num2 != 15) {
echo "Continue at 15 (".$num2.").<br />";
$num2++;
}
}
```
If that's not what you're trying to achieve, you're using continue wrong. |
1,726,843 | When reading a PHP book I wanted to try my own (continue) example.
I made the following code but it doesn't work although everything seems to be ok
```
$num2 = 1;
while ($num2 < 19)
{
if ($num2 == 15) {
continue;
} else {
echo "Continue at 15 (".$num2.").<... | 2009/11/13 | ['https://Stackoverflow.com/questions/1726843', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/210142/'] | if you don't increment `$num2` before the `continue` you will get into an infinite loop;
```
$num2 = 0;
while ($num2 < 18)
{
$num2++;
if ($num2 == 15) {
continue;
} else {
echo "Continue at 15 (".$num2.").<br />";
}
}
``` | in php, use **foreach** for arrays and **for** for looping
```
for($num = 1; $num < 19; $num++) {
if ($num != 15) {
echo "Continue at 15 (" . $num . ") . <br />";
break;
}
}
``` |
1,726,843 | When reading a PHP book I wanted to try my own (continue) example.
I made the following code but it doesn't work although everything seems to be ok
```
$num2 = 1;
while ($num2 < 19)
{
if ($num2 == 15) {
continue;
} else {
echo "Continue at 15 (".$num2.").<... | 2009/11/13 | ['https://Stackoverflow.com/questions/1726843', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/210142/'] | You don't even need continue there, your code equivalent to;
```
$num2 = 1;
while ($num2 < 19){
if ($num2 != 15) {
echo "Continue at 15 (".$num2.").<br />";
$num2++;
}
}
```
If that's not what you're trying to achieve, you're using continue wrong. | in php, use **foreach** for arrays and **for** for looping
```
for($num = 1; $num < 19; $num++) {
if ($num != 15) {
echo "Continue at 15 (" . $num . ") . <br />";
break;
}
}
``` |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can use the `minDate` property, like this:
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
minDate: 0, // 0 days offset = today
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
$("input#DateTo").da... | **Set minDate to current date in jQuery Datepicker :**
```
$("input.DateFrom").datepicker({
minDate: new Date()
});
``` |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can specify minDate as today by adding `minDate: 0` to the options.
```
$("input.DateFrom").datepicker({
minDate: 0,
...
});
```
**Demo**: <http://jsfiddle.net/2CZtV/>
**Docs**: <http://jqueryui.com/datepicker/#min-max> | Use this one :
```
onSelect: function(dateText) {
$("input#DateTo").datepicker('option', 'minDate', dateText);
}
```
This may be useful :
<http://jsfiddle.net/injulkarnilesh/xNeTe/> |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can specify minDate as today by adding `minDate: 0` to the options.
```
$("input.DateFrom").datepicker({
minDate: 0,
...
});
```
**Demo**: <http://jsfiddle.net/2CZtV/>
**Docs**: <http://jqueryui.com/datepicker/#min-max> | You can use the `minDate` property, like this:
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
minDate: 0, // 0 days offset = today
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
$("input#DateTo").da... |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can use the `minDate` property, like this:
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
minDate: 0, // 0 days offset = today
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
$("input#DateTo").da... | Use this one :
```
onSelect: function(dateText) {
$("input#DateTo").datepicker('option', 'minDate', dateText);
}
```
This may be useful :
<http://jsfiddle.net/injulkarnilesh/xNeTe/> |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can specify minDate as today by adding `minDate: 0` to the options.
```
$("input.DateFrom").datepicker({
minDate: 0,
...
});
```
**Demo**: <http://jsfiddle.net/2CZtV/>
**Docs**: <http://jqueryui.com/datepicker/#min-max> | **Set minDate to current date in jQuery Datepicker :**
```
$("input.DateFrom").datepicker({
minDate: new Date()
});
``` |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | Use this one :
```
onSelect: function(dateText) {
$("input#DateTo").datepicker('option', 'minDate', dateText);
}
```
This may be useful :
<http://jsfiddle.net/injulkarnilesh/xNeTe/> | minDate property for current date works on for both -> minDate:"yy-mm-dd" or minDate:0 |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can specify minDate as today by adding `minDate: 0` to the options.
```
$("input.DateFrom").datepicker({
minDate: 0,
...
});
```
**Demo**: <http://jsfiddle.net/2CZtV/>
**Docs**: <http://jqueryui.com/datepicker/#min-max> | minDate property for current date works on for both -> minDate:"yy-mm-dd" or minDate:0 |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | Use this one :
```
onSelect: function(dateText) {
$("input#DateTo").datepicker('option', 'minDate', dateText);
}
```
This may be useful :
<http://jsfiddle.net/injulkarnilesh/xNeTe/> | **Set minDate to current date in jQuery Datepicker :**
```
$("input.DateFrom").datepicker({
minDate: new Date()
});
``` |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can use the `minDate` property, like this:
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
minDate: 0, // 0 days offset = today
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
$("input#DateTo").da... | I set starting date using this method, because aforesaid or other codes didn't work for me
```js
$(document).ready(function() {
$('#dateFrm').datepicker('setStartDate', new Date(yyyy, dd, MM));
});
``` |
14,810,602 | This is my code and it is not working correctly. I want to set `minDate` to the current date. How can I do it?
```
$("input.DateFrom").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
maxDate: 'today',
onSelect: function(dateText) {
$sD = new Date(dateText);
... | 2013/02/11 | ['https://Stackoverflow.com/questions/14810602', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1305280/'] | You can specify minDate as today by adding `minDate: 0` to the options.
```
$("input.DateFrom").datepicker({
minDate: 0,
...
});
```
**Demo**: <http://jsfiddle.net/2CZtV/>
**Docs**: <http://jqueryui.com/datepicker/#min-max> | can also use:
```
$("input.DateFrom").datepicker({
minDate: 'today'
});
``` |
55,409,656 | I have a dataset in CSV file and all data is a numeric attribute, I want to apply k-Nearest Neighbors in my dataset
I have some error in my code I don't know who I can fix it.
code:
[enter image description here][1]
[enter image description here][2] | 2019/03/29 | ['https://Stackoverflow.com/questions/55409656', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11273598/'] | To add to `cglacet`'s answer - if one wants to detect whether a loop is running and adjust automatically (ie run `main()` on the existing loop, otherwise `asyncio.run()`), here is a snippet that may prove useful:
```py
# async def main():
# ...
try:
loop = asyncio.get_running_loop()
except RuntimeError: # 'R... | I found the [`unsync`](https://github.com/alex-sherman/unsync) package useful for writing code that behaves the same way in a Python script and the Jupyter REPL.
```py
import asyncio
from unsync import unsync
@unsync
async def demo_async_fn():
await asyncio.sleep(0.1)
return "done!"
print(demo_async_fn().res... |
55,409,656 | I have a dataset in CSV file and all data is a numeric attribute, I want to apply k-Nearest Neighbors in my dataset
I have some error in my code I don't know who I can fix it.
code:
[enter image description here][1]
[enter image description here][2] | 2019/03/29 | ['https://Stackoverflow.com/questions/55409656', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11273598/'] | Just use this:
<https://github.com/erdewit/nest_asyncio>
```
import nest_asyncio
nest_asyncio.apply()
``` | I found the [`unsync`](https://github.com/alex-sherman/unsync) package useful for writing code that behaves the same way in a Python script and the Jupyter REPL.
```py
import asyncio
from unsync import unsync
@unsync
async def demo_async_fn():
await asyncio.sleep(0.1)
return "done!"
print(demo_async_fn().res... |
55,409,656 | I have a dataset in CSV file and all data is a numeric attribute, I want to apply k-Nearest Neighbors in my dataset
I have some error in my code I don't know who I can fix it.
code:
[enter image description here][1]
[enter image description here][2] | 2019/03/29 | ['https://Stackoverflow.com/questions/55409656', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11273598/'] | To add to `cglacet`'s answer - if one wants to detect whether a loop is running and adjust automatically (ie run `main()` on the existing loop, otherwise `asyncio.run()`), here is a snippet that may prove useful:
```py
# async def main():
# ...
try:
loop = asyncio.get_running_loop()
except RuntimeError: # 'R... | Just use this:
<https://github.com/erdewit/nest_asyncio>
```
import nest_asyncio
nest_asyncio.apply()
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.