qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
4,069,054 | I cannot seem to find an answer for this anywhere. Superuser *root* has a crontab with a couple of jobs that send the resultant output to *root's* mailbox addressed **from** my non-superuser account *foo*.
It is my understanding that the owner of the cron job is supposed to be the sender of the resultant cron job outp... | 2010/11/01 | [
"https://Stackoverflow.com/questions/4069054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493585/"
] | Why do you need to make a duplication of the form? Try to find some refactoring that can help you, e.g. create some base form and extract common logic there.
Every time you make a duplication kitten dies! | You can just add a new blank form and then select all items on the original aform and paste them onto the new form. This will not copy the code behind though. But that can also be solved with copy paste.
This will not cause any renaming conflicts. |
4,069,054 | I cannot seem to find an answer for this anywhere. Superuser *root* has a crontab with a couple of jobs that send the resultant output to *root's* mailbox addressed **from** my non-superuser account *foo*.
It is my understanding that the owner of the cron job is supposed to be the sender of the resultant cron job outp... | 2010/11/01 | [
"https://Stackoverflow.com/questions/4069054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493585/"
] | Copy the form in visual studio solution explorer. Rename it. And **change the class name manually both in .cs and .Designer.cs files**. Do not use VS refactoring feature as it blows away references to the original class. | You can just add a new blank form and then select all items on the original aform and paste them onto the new form. This will not copy the code behind though. But that can also be solved with copy paste.
This will not cause any renaming conflicts. |
4,069,054 | I cannot seem to find an answer for this anywhere. Superuser *root* has a crontab with a couple of jobs that send the resultant output to *root's* mailbox addressed **from** my non-superuser account *foo*.
It is my understanding that the owner of the cron job is supposed to be the sender of the resultant cron job outp... | 2010/11/01 | [
"https://Stackoverflow.com/questions/4069054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493585/"
] | To duplicate a form (in the same project):
1. Right click on the source form --> Copy
2. Right click on the destination folder/project --> Paste
3. Right click on the new form --> Rename
4. Change manually the class name in .cs
5. Change manually the constructor name in .cs
6. Change manually the class name in .Design... | You can just add a new blank form and then select all items on the original aform and paste them onto the new form. This will not copy the code behind though. But that can also be solved with copy paste.
This will not cause any renaming conflicts. |
4,069,054 | I cannot seem to find an answer for this anywhere. Superuser *root* has a crontab with a couple of jobs that send the resultant output to *root's* mailbox addressed **from** my non-superuser account *foo*.
It is my understanding that the owner of the cron job is supposed to be the sender of the resultant cron job outp... | 2010/11/01 | [
"https://Stackoverflow.com/questions/4069054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493585/"
] | Copy the form in visual studio solution explorer. Rename it. And **change the class name manually both in .cs and .Designer.cs files**. Do not use VS refactoring feature as it blows away references to the original class. | Why do you need to make a duplication of the form? Try to find some refactoring that can help you, e.g. create some base form and extract common logic there.
Every time you make a duplication kitten dies! |
4,069,054 | I cannot seem to find an answer for this anywhere. Superuser *root* has a crontab with a couple of jobs that send the resultant output to *root's* mailbox addressed **from** my non-superuser account *foo*.
It is my understanding that the owner of the cron job is supposed to be the sender of the resultant cron job outp... | 2010/11/01 | [
"https://Stackoverflow.com/questions/4069054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493585/"
] | To duplicate a form (in the same project):
1. Right click on the source form --> Copy
2. Right click on the destination folder/project --> Paste
3. Right click on the new form --> Rename
4. Change manually the class name in .cs
5. Change manually the constructor name in .cs
6. Change manually the class name in .Design... | Why do you need to make a duplication of the form? Try to find some refactoring that can help you, e.g. create some base form and extract common logic there.
Every time you make a duplication kitten dies! |
4,069,054 | I cannot seem to find an answer for this anywhere. Superuser *root* has a crontab with a couple of jobs that send the resultant output to *root's* mailbox addressed **from** my non-superuser account *foo*.
It is my understanding that the owner of the cron job is supposed to be the sender of the resultant cron job outp... | 2010/11/01 | [
"https://Stackoverflow.com/questions/4069054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493585/"
] | Copy the form in visual studio solution explorer. Rename it. And **change the class name manually both in .cs and .Designer.cs files**. Do not use VS refactoring feature as it blows away references to the original class. | To duplicate a form (in the same project):
1. Right click on the source form --> Copy
2. Right click on the destination folder/project --> Paste
3. Right click on the new form --> Rename
4. Change manually the class name in .cs
5. Change manually the constructor name in .cs
6. Change manually the class name in .Design... |
9,354,945 | I'm trying to to resize my image (from URL) to full screen in my iPhone. However, the size 320x480 which is supposed to be full size is not full screen.
```
-(IBAction)changeFullSize{
urlImage.contentMode = UIViewContentModeScaleAspectFit;
urlImage.frame = CGRectMake(0,0,320,480);
}
```
I'm using a `UIButto... | 2012/02/20 | [
"https://Stackoverflow.com/questions/9354945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1210581/"
] | You could try and get it from `self.view.frame.size` but for the entire screen you can use `[[UIScreen mainScreen] bounds]`. Hope this helps. | If you have status bar then don't forget to reduce its size from the height.
And also aspect-fit would keep the image in its correct ratio, then consider filling it.
Aspect-fill would keep the image in correct ration + will try to make full screen, no void spaces, chances are some part of image wont be shown.
Scale ... |
9,354,945 | I'm trying to to resize my image (from URL) to full screen in my iPhone. However, the size 320x480 which is supposed to be full size is not full screen.
```
-(IBAction)changeFullSize{
urlImage.contentMode = UIViewContentModeScaleAspectFit;
urlImage.frame = CGRectMake(0,0,320,480);
}
```
I'm using a `UIButto... | 2012/02/20 | [
"https://Stackoverflow.com/questions/9354945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1210581/"
] | you cant just resize your image by changing its frame, since you are using aspect fit, the image will keep its original aspect, depending on your needs a simple way would be to change to UIViewContentModeScaleToFill
if scaling to fill does not produce your intended results, you may want to check out trevor's blog post... | If you have status bar then don't forget to reduce its size from the height.
And also aspect-fit would keep the image in its correct ratio, then consider filling it.
Aspect-fill would keep the image in correct ration + will try to make full screen, no void spaces, chances are some part of image wont be shown.
Scale ... |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | The range of supernaturalism is much broader and more general than the religious doctrines contained in the Book of Concord. Taking the definitions from [wikipedia](https://en.wikipedia.org/wiki/Supernatural#Magic) (emphasis J.W.):
* The **supernatural** is phenomena or entities that are not subject to the laws of nat... | There is no such thing as supernatural. Everything that exists is natural.
Magic comes in two flavours:
* Entertainment magic creates an *illusion* of something impossible.
* "Real" magic is nothing but advanced technology that only looks impossible to an uneducated observer. |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | The range of supernaturalism is much broader and more general than the religious doctrines contained in the Book of Concord. Taking the definitions from [wikipedia](https://en.wikipedia.org/wiki/Supernatural#Magic) (emphasis J.W.):
* The **supernatural** is phenomena or entities that are not subject to the laws of nat... | There are technical philosophical glosses of the concept of *magic* in modern fantasy writing. The problematique starts at the narrative level: "Is the guiding problem of the story a problem posed by magic? And how much magic is involved in the solution?" Then *magic* is formally read back into "the conditions of magic... |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | The range of supernaturalism is much broader and more general than the religious doctrines contained in the Book of Concord. Taking the definitions from [wikipedia](https://en.wikipedia.org/wiki/Supernatural#Magic) (emphasis J.W.):
* The **supernatural** is phenomena or entities that are not subject to the laws of nat... | As a preamble, I consider it to be poor practice to use the term "supernatural" for the non-physical. "Natural" has a very clear meaning in epistemology -- it describes the items/events/forces which are subject to the tools of methodological naturalism -- IE empiricism and reasoning. Super-naturalism, from an epistemol... |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | The range of supernaturalism is much broader and more general than the religious doctrines contained in the Book of Concord. Taking the definitions from [wikipedia](https://en.wikipedia.org/wiki/Supernatural#Magic) (emphasis J.W.):
* The **supernatural** is phenomena or entities that are not subject to the laws of nat... | It seems to me that magic is referring to the intervention of someone in the (accepted) laws of a system in order to attain something that otherwise cound not be attained, metaphorically speaking "bending" the laws. On the other hand supernatural refers to something that is happening that is considered outside of the (... |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | There are technical philosophical glosses of the concept of *magic* in modern fantasy writing. The problematique starts at the narrative level: "Is the guiding problem of the story a problem posed by magic? And how much magic is involved in the solution?" Then *magic* is formally read back into "the conditions of magic... | There is no such thing as supernatural. Everything that exists is natural.
Magic comes in two flavours:
* Entertainment magic creates an *illusion* of something impossible.
* "Real" magic is nothing but advanced technology that only looks impossible to an uneducated observer. |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | As a preamble, I consider it to be poor practice to use the term "supernatural" for the non-physical. "Natural" has a very clear meaning in epistemology -- it describes the items/events/forces which are subject to the tools of methodological naturalism -- IE empiricism and reasoning. Super-naturalism, from an epistemol... | There is no such thing as supernatural. Everything that exists is natural.
Magic comes in two flavours:
* Entertainment magic creates an *illusion* of something impossible.
* "Real" magic is nothing but advanced technology that only looks impossible to an uneducated observer. |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | It seems to me that magic is referring to the intervention of someone in the (accepted) laws of a system in order to attain something that otherwise cound not be attained, metaphorically speaking "bending" the laws. On the other hand supernatural refers to something that is happening that is considered outside of the (... | There is no such thing as supernatural. Everything that exists is natural.
Magic comes in two flavours:
* Entertainment magic creates an *illusion* of something impossible.
* "Real" magic is nothing but advanced technology that only looks impossible to an uneducated observer. |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | There are technical philosophical glosses of the concept of *magic* in modern fantasy writing. The problematique starts at the narrative level: "Is the guiding problem of the story a problem posed by magic? And how much magic is involved in the solution?" Then *magic* is formally read back into "the conditions of magic... | As a preamble, I consider it to be poor practice to use the term "supernatural" for the non-physical. "Natural" has a very clear meaning in epistemology -- it describes the items/events/forces which are subject to the tools of methodological naturalism -- IE empiricism and reasoning. Super-naturalism, from an epistemol... |
91,001 | I'm an ardent physicalist with a belief in the importance of the partial reduction of theories to physicalism. I have on occasion had discussions with philosophers here who challenge the existence of the natural/supernatural dichotomy, or in some way endorse supernaturalism. My question is directed at those who know so... | 2022/05/03 | [
"https://philosophy.stackexchange.com/questions/91001",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/40730/"
] | It seems to me that magic is referring to the intervention of someone in the (accepted) laws of a system in order to attain something that otherwise cound not be attained, metaphorically speaking "bending" the laws. On the other hand supernatural refers to something that is happening that is considered outside of the (... | As a preamble, I consider it to be poor practice to use the term "supernatural" for the non-physical. "Natural" has a very clear meaning in epistemology -- it describes the items/events/forces which are subject to the tools of methodological naturalism -- IE empiricism and reasoning. Super-naturalism, from an epistemol... |
45,968,642 | I am wondering how to get the width of a `th` and set all of the `td` under this header to be the same width. Next `th` would be a different width and all of the `td` under this `th` would be that appropriate width, different from the first. Essentially trying to line up my `thead` and `tbody` columns relative to eacho... | 2017/08/30 | [
"https://Stackoverflow.com/questions/45968642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7163580/"
] | Try this, is ugly and is not efficient but should do what you want to do:
```
var table = document.getElementById('#my_table');
table.find('th').each(function(index) {
var header_width = this.width();
table.find('tr').each(function() {
$(this).find('td:nth-child('+index+')').width(header_width);
});... | 1st. sum the `th` length first (by letter length), then update the width by `%` of `th` length, see example below:
2nd. wrap your content with `<div class="scrollable">` and css:
```
.scrollable{
height: 200px;
overflow: scroll;
}
```
This allowed you to control the height of the `td` without set tbody to inline... |
45,968,642 | I am wondering how to get the width of a `th` and set all of the `td` under this header to be the same width. Next `th` would be a different width and all of the `td` under this `th` would be that appropriate width, different from the first. Essentially trying to line up my `thead` and `tbody` columns relative to eacho... | 2017/08/30 | [
"https://Stackoverflow.com/questions/45968642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7163580/"
] | 1st. sum the `th` length first (by letter length), then update the width by `%` of `th` length, see example below:
2nd. wrap your content with `<div class="scrollable">` and css:
```
.scrollable{
height: 200px;
overflow: scroll;
}
```
This allowed you to control the height of the `td` without set tbody to inline... | Just change each th width to a fixed width with css:
```css
#my-table th,
#my-table tbody td {
border-width: 0 1px 0 1px;
border-style: solid;
border-color: black;
}
#my-table th:first-child {
width: 20%;
}
#my-table th:nth-child(2) {
width: 30%;
}
#my-table th:nth-child(3) {
wi... |
45,968,642 | I am wondering how to get the width of a `th` and set all of the `td` under this header to be the same width. Next `th` would be a different width and all of the `td` under this `th` would be that appropriate width, different from the first. Essentially trying to line up my `thead` and `tbody` columns relative to eacho... | 2017/08/30 | [
"https://Stackoverflow.com/questions/45968642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7163580/"
] | Try this, is ugly and is not efficient but should do what you want to do:
```
var table = document.getElementById('#my_table');
table.find('th').each(function(index) {
var header_width = this.width();
table.find('tr').each(function() {
$(this).find('td:nth-child('+index+')').width(header_width);
});... | Just change each th width to a fixed width with css:
```css
#my-table th,
#my-table tbody td {
border-width: 0 1px 0 1px;
border-style: solid;
border-color: black;
}
#my-table th:first-child {
width: 20%;
}
#my-table th:nth-child(2) {
width: 30%;
}
#my-table th:nth-child(3) {
wi... |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | You can [turn off Aero](http://www.howtogeek.com/howto/windows-vista/disable-aero-on-windows-vista/) by selecting one of the basic themes. This will reduce the load on your graphics card as Aero uses DirectX, which should improve performance while in Windows. It won't affect gaming performance as that uses full screen ... | One idea would be to create a slipstream install cd for windows 7. This involves removing all the stuff you dont want installed and adding additional files (like drivers)
Simply google slipstream windows 7 installation and there are so many sites who can help you with this |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | You can [turn off Aero](http://www.howtogeek.com/howto/windows-vista/disable-aero-on-windows-vista/) by selecting one of the basic themes. This will reduce the load on your graphics card as Aero uses DirectX, which should improve performance while in Windows. It won't affect gaming performance as that uses full screen ... | 1. Use [Disk Cleanup](http://en.wikipedia.org/wiki/Disk_Cleanup) frequently to clean out temporary things.
2. See where data is being spent with [WinDirStat](http://windirstat.info/) and look if you can clean something.
3. Remove programs and windows components you don't need from the Control Panel.
4. [Resource Monito... |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | 4GB XP? 16GB Win7? That seems an awful lot. My vanilla win7 install on VirtualBox was around 5GB, and you can certainly get XP down to 700MB or so.
Use a visualisation tool such as [WinDirStat](http://windirstat.info/) to find out what's taking up all that disc.
Stuff to target, if you don't need it and you really kn... | You can [turn off Aero](http://www.howtogeek.com/howto/windows-vista/disable-aero-on-windows-vista/) by selecting one of the basic themes. This will reduce the load on your graphics card as Aero uses DirectX, which should improve performance while in Windows. It won't affect gaming performance as that uses full screen ... |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | You can [turn off Aero](http://www.howtogeek.com/howto/windows-vista/disable-aero-on-windows-vista/) by selecting one of the basic themes. This will reduce the load on your graphics card as Aero uses DirectX, which should improve performance while in Windows. It won't affect gaming performance as that uses full screen ... | Windows Vista/7 doesn't provide explicit way to disable hibernation. (I don't know why)
You can make this with following steps :
* Open command prompt with administrator privilege.
* Type this : powercfg -h off
If c:\hiberfil.sys file disappear, it has worked. |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | 4GB XP? 16GB Win7? That seems an awful lot. My vanilla win7 install on VirtualBox was around 5GB, and you can certainly get XP down to 700MB or so.
Use a visualisation tool such as [WinDirStat](http://windirstat.info/) to find out what's taking up all that disc.
Stuff to target, if you don't need it and you really kn... | One idea would be to create a slipstream install cd for windows 7. This involves removing all the stuff you dont want installed and adding additional files (like drivers)
Simply google slipstream windows 7 installation and there are so many sites who can help you with this |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | Windows Vista/7 doesn't provide explicit way to disable hibernation. (I don't know why)
You can make this with following steps :
* Open command prompt with administrator privilege.
* Type this : powercfg -h off
If c:\hiberfil.sys file disappear, it has worked. | One idea would be to create a slipstream install cd for windows 7. This involves removing all the stuff you dont want installed and adding additional files (like drivers)
Simply google slipstream windows 7 installation and there are so many sites who can help you with this |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | 4GB XP? 16GB Win7? That seems an awful lot. My vanilla win7 install on VirtualBox was around 5GB, and you can certainly get XP down to 700MB or so.
Use a visualisation tool such as [WinDirStat](http://windirstat.info/) to find out what's taking up all that disc.
Stuff to target, if you don't need it and you really kn... | 1. Use [Disk Cleanup](http://en.wikipedia.org/wiki/Disk_Cleanup) frequently to clean out temporary things.
2. See where data is being spent with [WinDirStat](http://windirstat.info/) and look if you can clean something.
3. Remove programs and windows components you don't need from the Control Panel.
4. [Resource Monito... |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | Windows Vista/7 doesn't provide explicit way to disable hibernation. (I don't know why)
You can make this with following steps :
* Open command prompt with administrator privilege.
* Type this : powercfg -h off
If c:\hiberfil.sys file disappear, it has worked. | 1. Use [Disk Cleanup](http://en.wikipedia.org/wiki/Disk_Cleanup) frequently to clean out temporary things.
2. See where data is being spent with [WinDirStat](http://windirstat.info/) and look if you can clean something.
3. Remove programs and windows components you don't need from the Control Panel.
4. [Resource Monito... |
143,675 | My Windows 7 setup uses around 16GB while Windows XP only needs around 4GB hard disk space. Seems weird. I use Windows only for gaming so I don't need a lot of stuff they have to offer.
What is the best way to reduce the size of Windows 7? What can I delete / uninstall and how?
I'd also like to reduce the CPU and me... | 2010/05/21 | [
"https://superuser.com/questions/143675",
"https://superuser.com",
"https://superuser.com/users/25345/"
] | 4GB XP? 16GB Win7? That seems an awful lot. My vanilla win7 install on VirtualBox was around 5GB, and you can certainly get XP down to 700MB or so.
Use a visualisation tool such as [WinDirStat](http://windirstat.info/) to find out what's taking up all that disc.
Stuff to target, if you don't need it and you really kn... | Windows Vista/7 doesn't provide explicit way to disable hibernation. (I don't know why)
You can make this with following steps :
* Open command prompt with administrator privilege.
* Type this : powercfg -h off
If c:\hiberfil.sys file disappear, it has worked. |
55,652,352 | I have a problem. The concept of Object Oriented Programming in C got homework. I need to use variadic functions. But I get a mistake. I'd appreciate it if you could help me. I'm new to encoding.
RastgeleKarakter.h :
```
#ifndef RASTGELEKARAKTER_H
#define RASTGELEKARAKTER_H
struct RASTGELEKARAKTER{
// code
};
Rastg... | 2019/04/12 | [
"https://Stackoverflow.com/questions/55652352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9409166/"
] | So my solution was to simply check if the user was already authenticated in my `[HttpGet]` login controller as opposed to my `[HttpPost]` login controller.
```
[HttpGet]
public ActionResult Login()
{
if (User.Identity.IsAuthenticated)
return RedirectToAction("Index", "Dashboard");
return View();
}
[H... | Implement Authentication.
And make Dashboard default controller. Magic will happen, out of the box.
In Startup.cs
```
public void ConfigureServices(IServiceCollection services)
{
...
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie("user_by_cookie", options =>
... |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | My current autocomplete plugin of choice is Select2.
You can find it here
<http://ivaynberg.github.io/select2/> | I found this plugin to meet the requirement. Enjoy.
[UserPicker input element like GMAIL](http://tagedit.webwork-albrecht.de/) |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | My current autocomplete plugin of choice is Select2.
You can find it here
<http://ivaynberg.github.io/select2/> | I have created a fiddle using typeahead.js and jquery. Please have a look.
<https://jsfiddle.net/Rohith_KP/k73msa47/>
```
! function(source) {
function extractor(query) {
var result = /([^,]+)$/.exec(query);
if (result && result[1])
return result[1].trim();
return '';
}
function tagTmpl(item)... |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | My current autocomplete plugin of choice is Select2.
You can find it here
<http://ivaynberg.github.io/select2/> | Try this one.
A jQuery plugin designed for Email related apps that allow the visitor to add/remove multiple comma-separated email addresses in a single text field. With a basic Email address validation functionality using regular expressions.
<https://github.com/pierresh/multiple-emails.js> |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | My current autocomplete plugin of choice is Select2.
You can find it here
<http://ivaynberg.github.io/select2/> | Things have gotten easier with plugins Nowadays.
Checkout the <https://github.com/jshjohnson/Choices>
The plugin works with `text input`, `select` and `multiple select`
With this JS plugin, you can even validate items before you add to a list.
```
For example:
1. You can write your own validation rules
2. You ca... |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I have created a fiddle using typeahead.js and jquery. Please have a look.
<https://jsfiddle.net/Rohith_KP/k73msa47/>
```
! function(source) {
function extractor(query) {
var result = /([^,]+)$/.exec(query);
if (result && result[1])
return result[1].trim();
return '';
}
function tagTmpl(item)... | I found this plugin to meet the requirement. Enjoy.
[UserPicker input element like GMAIL](http://tagedit.webwork-albrecht.de/) |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I found this plugin to meet the requirement. Enjoy.
[UserPicker input element like GMAIL](http://tagedit.webwork-albrecht.de/) | Try this one.
A jQuery plugin designed for Email related apps that allow the visitor to add/remove multiple comma-separated email addresses in a single text field. With a basic Email address validation functionality using regular expressions.
<https://github.com/pierresh/multiple-emails.js> |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I found this plugin to meet the requirement. Enjoy.
[UserPicker input element like GMAIL](http://tagedit.webwork-albrecht.de/) | Things have gotten easier with plugins Nowadays.
Checkout the <https://github.com/jshjohnson/Choices>
The plugin works with `text input`, `select` and `multiple select`
With this JS plugin, you can even validate items before you add to a list.
```
For example:
1. You can write your own validation rules
2. You ca... |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I have created a fiddle using typeahead.js and jquery. Please have a look.
<https://jsfiddle.net/Rohith_KP/k73msa47/>
```
! function(source) {
function extractor(query) {
var result = /([^,]+)$/.exec(query);
if (result && result[1])
return result[1].trim();
return '';
}
function tagTmpl(item)... | Try this one.
A jQuery plugin designed for Email related apps that allow the visitor to add/remove multiple comma-separated email addresses in a single text field. With a basic Email address validation functionality using regular expressions.
<https://github.com/pierresh/multiple-emails.js> |
15,289,765 | I'm searching an userpicker that looks like Gmail, that when you add a "To" address, it becomes a label, or like StackOverflow when you add tags
I've found this plugin:
<http://htmlpreview.github.com/?https://github.com/ErikNoren/entitypicker/blob/master/entitypickerdemo.html>
but I would like to find more plugins t... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15289765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I have created a fiddle using typeahead.js and jquery. Please have a look.
<https://jsfiddle.net/Rohith_KP/k73msa47/>
```
! function(source) {
function extractor(query) {
var result = /([^,]+)$/.exec(query);
if (result && result[1])
return result[1].trim();
return '';
}
function tagTmpl(item)... | Things have gotten easier with plugins Nowadays.
Checkout the <https://github.com/jshjohnson/Choices>
The plugin works with `text input`, `select` and `multiple select`
With this JS plugin, you can even validate items before you add to a list.
```
For example:
1. You can write your own validation rules
2. You ca... |
53,116,703 | I've got a class using two generic parameters in its constructor. I would like to implement a method to compare two instances of this class, as done in the code below.
It works quite well except when one of the parameter is an arrays. I've read different topics about how to compare arrays with `java.util.Arrays.equals... | 2018/11/02 | [
"https://Stackoverflow.com/questions/53116703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061004/"
] | You can do this:
* use the guidance given [here](https://stackoverflow.com/questions/2725533/how-to-see-if-an-object-is-an-array-without-using-reflection) to determine whether both objects (this and the "other") contain arrays. Of course, detecting the actual member type means even more work.
* utilize [Array.equals()... | It's worth noting that no collection in Java that I'm aware of - pairs, lists, sets... - makes a concession for this case. As an example:
```
List<Integer[]> one = Arrays.asList(
new Integer[]{1}, new Integer[]{2}
);
List<Integer[]> two = Arrays.asList(
new Integer[]{1}, new Integer[]{2}
);
System.out.println(... |
53,116,703 | I've got a class using two generic parameters in its constructor. I would like to implement a method to compare two instances of this class, as done in the code below.
It works quite well except when one of the parameter is an arrays. I've read different topics about how to compare arrays with `java.util.Arrays.equals... | 2018/11/02 | [
"https://Stackoverflow.com/questions/53116703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061004/"
] | ```
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Pair<?, ?> myPair = (Pair<?, ?>)o;
if (first.getClass().isArray() ^ first.getClass().isArray() || second.getClass().isArray() ^ second.getClass().isArr... | You can do this:
* use the guidance given [here](https://stackoverflow.com/questions/2725533/how-to-see-if-an-object-is-an-array-without-using-reflection) to determine whether both objects (this and the "other") contain arrays. Of course, detecting the actual member type means even more work.
* utilize [Array.equals()... |
53,116,703 | I've got a class using two generic parameters in its constructor. I would like to implement a method to compare two instances of this class, as done in the code below.
It works quite well except when one of the parameter is an arrays. I've read different topics about how to compare arrays with `java.util.Arrays.equals... | 2018/11/02 | [
"https://Stackoverflow.com/questions/53116703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061004/"
] | ```
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Pair<?, ?> myPair = (Pair<?, ?>)o;
if (first.getClass().isArray() ^ first.getClass().isArray() || second.getClass().isArray() ^ second.getClass().isArr... | It's worth noting that no collection in Java that I'm aware of - pairs, lists, sets... - makes a concession for this case. As an example:
```
List<Integer[]> one = Arrays.asList(
new Integer[]{1}, new Integer[]{2}
);
List<Integer[]> two = Arrays.asList(
new Integer[]{1}, new Integer[]{2}
);
System.out.println(... |
53,116,703 | I've got a class using two generic parameters in its constructor. I would like to implement a method to compare two instances of this class, as done in the code below.
It works quite well except when one of the parameter is an arrays. I've read different topics about how to compare arrays with `java.util.Arrays.equals... | 2018/11/02 | [
"https://Stackoverflow.com/questions/53116703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061004/"
] | ```
public class Fourth {
public static void main(String[] args) {
Integer a[] = {1,2,3,4,5};
Integer b[] = {1,2,3,4,6,7};
CompareArrays<Integer, Integer> comp = new CompareArrays<Integer, Integer>(a,b);
comp.compareArrays();
}
}
class CompareArrays<One extends Number, Two ... | It's worth noting that no collection in Java that I'm aware of - pairs, lists, sets... - makes a concession for this case. As an example:
```
List<Integer[]> one = Arrays.asList(
new Integer[]{1}, new Integer[]{2}
);
List<Integer[]> two = Arrays.asList(
new Integer[]{1}, new Integer[]{2}
);
System.out.println(... |
53,116,703 | I've got a class using two generic parameters in its constructor. I would like to implement a method to compare two instances of this class, as done in the code below.
It works quite well except when one of the parameter is an arrays. I've read different topics about how to compare arrays with `java.util.Arrays.equals... | 2018/11/02 | [
"https://Stackoverflow.com/questions/53116703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061004/"
] | ```
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Pair<?, ?> myPair = (Pair<?, ?>)o;
if (first.getClass().isArray() ^ first.getClass().isArray() || second.getClass().isArray() ^ second.getClass().isArr... | ```
public class Fourth {
public static void main(String[] args) {
Integer a[] = {1,2,3,4,5};
Integer b[] = {1,2,3,4,6,7};
CompareArrays<Integer, Integer> comp = new CompareArrays<Integer, Integer>(a,b);
comp.compareArrays();
}
}
class CompareArrays<One extends Number, Two ... |
5,629,495 | im a newbie in android. I would like to ask if anybody knows why i'm getting this "connection refused" IOException when i try to establish a TCP/IP connection between two android device. I tried to ping both device and they are responding. Anybody please...
Thanks in advance...
```
E/TCP_IP connect thread( 7466): jav... | 2011/04/12 | [
"https://Stackoverflow.com/questions/5629495",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/692101/"
] | If it's the missing INTERNET permission, add this line to your `Android.manifest` file just above the `<application>` tag.
`<uses-permission android:name="android.permission.INTERNET/>` | You don't have the INTERNET permission? That, or your Wifi isn't turned on or the other IP isn't accessible (like you're trying to connect to a LAN IP via WAN). |
5,629,495 | im a newbie in android. I would like to ask if anybody knows why i'm getting this "connection refused" IOException when i try to establish a TCP/IP connection between two android device. I tried to ping both device and they are responding. Anybody please...
Thanks in advance...
```
E/TCP_IP connect thread( 7466): jav... | 2011/04/12 | [
"https://Stackoverflow.com/questions/5629495",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/692101/"
] | You don't have the INTERNET permission? That, or your Wifi isn't turned on or the other IP isn't accessible (like you're trying to connect to a LAN IP via WAN). | For me restarting my WIFI worked.... |
5,629,495 | im a newbie in android. I would like to ask if anybody knows why i'm getting this "connection refused" IOException when i try to establish a TCP/IP connection between two android device. I tried to ping both device and they are responding. Anybody please...
Thanks in advance...
```
E/TCP_IP connect thread( 7466): jav... | 2011/04/12 | [
"https://Stackoverflow.com/questions/5629495",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/692101/"
] | If it's the missing INTERNET permission, add this line to your `Android.manifest` file just above the `<application>` tag.
`<uses-permission android:name="android.permission.INTERNET/>` | For me restarting my WIFI worked.... |
45,631,132 | The flag `CF` is set when we compare two digits and one number is less than another:
```
mov eax,1
cmp eax,2
jb truWay
```
In binary form:
```
1=00000001
2=00000010=11111101+1(add. code)=11111110и
00000001+11111110=11111111(no carry)
```
Why does instruction `cmp eax,2` set the `CF` flag? There was no carry, o... | 2017/08/11 | [
"https://Stackoverflow.com/questions/45631132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2667757/"
] | You can refer to [these slides](http://web.cse.ohio-state.edu/~teodorescu.1/download/teaching/cse675.au08/Cse675.02.F.ALUDesign_part1.pdf) to understand how subtraction is performed in an ALU.
While it is true that A - B = A + (-B) and that in two's complement this is A + ¬B + 1, this consideration accounts for the re... | There is **borrow out** indeed. `CF` is set by the `cmp` instruction if there is *borrow out*.
Your instruction `cmp` performs the following subtraction:
```
1 = 0001
- 2 = 0010
--------------
1111
```
For the the first rightmost column there is nothing special: `1 - 0 = 1`.
For the second rightmost column... |
45,631,132 | The flag `CF` is set when we compare two digits and one number is less than another:
```
mov eax,1
cmp eax,2
jb truWay
```
In binary form:
```
1=00000001
2=00000010=11111101+1(add. code)=11111110и
00000001+11111110=11111111(no carry)
```
Why does instruction `cmp eax,2` set the `CF` flag? There was no carry, o... | 2017/08/11 | [
"https://Stackoverflow.com/questions/45631132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2667757/"
] | You can refer to [these slides](http://web.cse.ohio-state.edu/~teodorescu.1/download/teaching/cse675.au08/Cse675.02.F.ALUDesign_part1.pdf) to understand how subtraction is performed in an ALU.
While it is true that A - B = A + (-B) and that in two's complement this is A + ¬B + 1, this consideration accounts for the re... | **First:**
The result of `a-b` is the same as the result of `a+(-b)`.
However the **flags** set by the operation `a-b` are **NOT** (at least not always) the same flags as the flags set by the operation `a+(-b)`!
This can be seen by comparing different CPU types (e.g. a modern x86 CPU and the historic 6502):
The val... |
55,935,015 | i was trying to convert from a char array to integers and the atoi function is working properly except when i put a zero in the first index...it didn't print it
```
#include<iostream>
using namespace std;
int main()
{
char arr[]= "0150234";
int num;
num=atoi(arr);
cout << num;
return 0;
}
```
I... | 2019/05/01 | [
"https://Stackoverflow.com/questions/55935015",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9560780/"
] | I think inside the atoi function you have typecasted the string to integer because of which the 0 gets removed. You can never get a 0 printed before a number since it doesn't make sense.
000001 will always be represented as 1.
I hope this clears your doubt. | Binary number representations (such as `int`) do not store leading 0s because there is an infinite number of them. Rather they store a fixed number of bits which may have some leading 0 bits.
You can still print the leading 0s if necessary:
```
std::cout << std::setw(4) << std::setfill('0') << 1 << '\n';
```
Output... |
55,935,015 | i was trying to convert from a char array to integers and the atoi function is working properly except when i put a zero in the first index...it didn't print it
```
#include<iostream>
using namespace std;
int main()
{
char arr[]= "0150234";
int num;
num=atoi(arr);
cout << num;
return 0;
}
```
I... | 2019/05/01 | [
"https://Stackoverflow.com/questions/55935015",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9560780/"
] | I think inside the atoi function you have typecasted the string to integer because of which the 0 gets removed. You can never get a 0 printed before a number since it doesn't make sense.
000001 will always be represented as 1.
I hope this clears your doubt. | You're confusing two ideas:
**Numbers:** These are abstract things. They're quantities. Your computer stores the number in a manner that you should not care about (though it's probably binary).
**Representations:** These are ways we display numbers to humans, like *"150234"*, or *"0x24ADA"*, or *"one hundred and fift... |
55,935,015 | i was trying to convert from a char array to integers and the atoi function is working properly except when i put a zero in the first index...it didn't print it
```
#include<iostream>
using namespace std;
int main()
{
char arr[]= "0150234";
int num;
num=atoi(arr);
cout << num;
return 0;
}
```
I... | 2019/05/01 | [
"https://Stackoverflow.com/questions/55935015",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9560780/"
] | Binary number representations (such as `int`) do not store leading 0s because there is an infinite number of them. Rather they store a fixed number of bits which may have some leading 0 bits.
You can still print the leading 0s if necessary:
```
std::cout << std::setw(4) << std::setfill('0') << 1 << '\n';
```
Output... | You're confusing two ideas:
**Numbers:** These are abstract things. They're quantities. Your computer stores the number in a manner that you should not care about (though it's probably binary).
**Representations:** These are ways we display numbers to humans, like *"150234"*, or *"0x24ADA"*, or *"one hundred and fift... |
5,020,203 | I am attempting to add a new record to a table similar to the example listed below. When I run the query I get the following error: QODBC3: Unable to bind variable. What do I need to do to correct the error?
```
QSqlQuery query;
query.prepare("INSERT INTO Table (id, val, time) VALUES (:id, :val, :time)");
query.bindVa... | 2011/02/16 | [
"https://Stackoverflow.com/questions/5020203",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/241060/"
] | I would guess it doesn't know how to bind the QTime object. Should you be using the toString method? | 1. turned on ODBC tracing
2. Double check your parameters! |
2,301,474 | Is there $A \subset \mathbb{R}^n$, such that $A$ is compact, contains the origin and has measure zero?
I know that the finite set A, of the form $A=\{ x\_{1},...,x\_{n} \}$, is a set of measure zero, but I don't know about its compactness nor if one can include the element zero amoung its elements. | 2017/05/29 | [
"https://math.stackexchange.com/questions/2301474",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/443436/"
] | Don't worry. Finite sets are always compact. | Whatever definition you use of compactness and of *measure zero*, the easiest example of $A \subset \mathbb{R}^n$ with all the properties you like is $A = \{0\}$.
No matter if you use sequential compactness or compactness via open coverings, a singleton is trivially compact and of null Lebesgue measure. |
2,301,474 | Is there $A \subset \mathbb{R}^n$, such that $A$ is compact, contains the origin and has measure zero?
I know that the finite set A, of the form $A=\{ x\_{1},...,x\_{n} \}$, is a set of measure zero, but I don't know about its compactness nor if one can include the element zero amoung its elements. | 2017/05/29 | [
"https://math.stackexchange.com/questions/2301474",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/443436/"
] | A non-trivial one would be the standard Cantor set in $\mathbb{R}^n$. It's closed, bounded (contained in the unit rectangle $[0,1]^n$, thus compact. It also contains the origin and is of measure zero. | Don't worry. Finite sets are always compact. |
2,301,474 | Is there $A \subset \mathbb{R}^n$, such that $A$ is compact, contains the origin and has measure zero?
I know that the finite set A, of the form $A=\{ x\_{1},...,x\_{n} \}$, is a set of measure zero, but I don't know about its compactness nor if one can include the element zero amoung its elements. | 2017/05/29 | [
"https://math.stackexchange.com/questions/2301474",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/443436/"
] | A non-trivial one would be the standard Cantor set in $\mathbb{R}^n$. It's closed, bounded (contained in the unit rectangle $[0,1]^n$, thus compact. It also contains the origin and is of measure zero. | Whatever definition you use of compactness and of *measure zero*, the easiest example of $A \subset \mathbb{R}^n$ with all the properties you like is $A = \{0\}$.
No matter if you use sequential compactness or compactness via open coverings, a singleton is trivially compact and of null Lebesgue measure. |
2,301,474 | Is there $A \subset \mathbb{R}^n$, such that $A$ is compact, contains the origin and has measure zero?
I know that the finite set A, of the form $A=\{ x\_{1},...,x\_{n} \}$, is a set of measure zero, but I don't know about its compactness nor if one can include the element zero amoung its elements. | 2017/05/29 | [
"https://math.stackexchange.com/questions/2301474",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/443436/"
] | Any compact subset of a subspace of lower dimension will have measure $0$ in the full space.
The unit sphere (not the unit ball) is a compact set with measure $0$. You can translate it so that it contains the origin. | Whatever definition you use of compactness and of *measure zero*, the easiest example of $A \subset \mathbb{R}^n$ with all the properties you like is $A = \{0\}$.
No matter if you use sequential compactness or compactness via open coverings, a singleton is trivially compact and of null Lebesgue measure. |
2,301,474 | Is there $A \subset \mathbb{R}^n$, such that $A$ is compact, contains the origin and has measure zero?
I know that the finite set A, of the form $A=\{ x\_{1},...,x\_{n} \}$, is a set of measure zero, but I don't know about its compactness nor if one can include the element zero amoung its elements. | 2017/05/29 | [
"https://math.stackexchange.com/questions/2301474",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/443436/"
] | A non-trivial one would be the standard Cantor set in $\mathbb{R}^n$. It's closed, bounded (contained in the unit rectangle $[0,1]^n$, thus compact. It also contains the origin and is of measure zero. | Any compact subset of a subspace of lower dimension will have measure $0$ in the full space.
The unit sphere (not the unit ball) is a compact set with measure $0$. You can translate it so that it contains the origin. |
52,468 | Recently I watched a documentary film from "Star Media" (a Russian film) called "The First World War". Up to this moment, I thought that the February Revolution happened because there was a huge economic problem and people were living in very poor conditions. Now I understand that the world war contributed to this prob... | 2019/05/05 | [
"https://history.stackexchange.com/questions/52468",
"https://history.stackexchange.com",
"https://history.stackexchange.com/users/37707/"
] | This contains several questions. First, why was Lenin (more exactly, his party) popular in 1918-1922. The short answer is "because they distributed landowners land among peasants" (Only to seize it back after 15 years of dictatorship). They also stopped the unpopular war (by surrender) and declared the right of nations... | End of war promise and skillful organization
--------------------------------------------
First we must address the issues of Russian Empire at the begging of 20th entry. Social and economic changes have long ago outgrown political institutions of that country. You had masses of recently freed serfs, but with little l... |
60,511,619 | here is my code
```
ArrayList <String> arr = new ArrayList<String>();
arr.add("123 456");
String []arr2 = arr.get(0).split(" ");
char[]x=arr2[0].toCharArray();
char[]y=arr2[1].toCharArray();
System.out.println(x[0]);
System.out.println(y[0]);
int z = x[0]+y[0]... | 2020/03/03 | [
"https://Stackoverflow.com/questions/60511619",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12379338/"
] | Why are you adding char primitives?
If you're trying to concatenate, it works only within String objects, or between String and primitives.
<https://docs.oracle.com/javase/tutorial/java/data/strings.html>
In case you're wondering why you get those results, char is sort of a compatible primitive with int, so they c... | As others in the comments have pointed out, in your second example you are adding
`int xx = 1`
and `int yy = 6` thus `xx + yy` returns `7`.
However, in your first example, you are adding `cx = '1'`
and `cy = '6'` so `int value = cx + cy` evaluates to `48 + 54` |
60,511,619 | here is my code
```
ArrayList <String> arr = new ArrayList<String>();
arr.add("123 456");
String []arr2 = arr.get(0).split(" ");
char[]x=arr2[0].toCharArray();
char[]y=arr2[1].toCharArray();
System.out.println(x[0]);
System.out.println(y[0]);
int z = x[0]+y[0]... | 2020/03/03 | [
"https://Stackoverflow.com/questions/60511619",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12379338/"
] | Why are you adding char primitives?
If you're trying to concatenate, it works only within String objects, or between String and primitives.
<https://docs.oracle.com/javase/tutorial/java/data/strings.html>
In case you're wondering why you get those results, char is sort of a compatible primitive with int, so they c... | I guess you mess up a bit between array, string and integers...
The main problem is `int z = x[0]+y[0];` you getting X and Y as Char, so they concate the String, so `"1" + "1" = "11"`, and than converting the string to int... so "1" + "6" = "16" converting to int, they tried to get number representation to it, that lo... |
60,511,619 | here is my code
```
ArrayList <String> arr = new ArrayList<String>();
arr.add("123 456");
String []arr2 = arr.get(0).split(" ");
char[]x=arr2[0].toCharArray();
char[]y=arr2[1].toCharArray();
System.out.println(x[0]);
System.out.println(y[0]);
int z = x[0]+y[0]... | 2020/03/03 | [
"https://Stackoverflow.com/questions/60511619",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12379338/"
] | I guess you mess up a bit between array, string and integers...
The main problem is `int z = x[0]+y[0];` you getting X and Y as Char, so they concate the String, so `"1" + "1" = "11"`, and than converting the string to int... so "1" + "6" = "16" converting to int, they tried to get number representation to it, that lo... | As others in the comments have pointed out, in your second example you are adding
`int xx = 1`
and `int yy = 6` thus `xx + yy` returns `7`.
However, in your first example, you are adding `cx = '1'`
and `cy = '6'` so `int value = cx + cy` evaluates to `48 + 54` |
34,931,506 | I have the following strings:
One Rule : Get all consecutive Square bracket strings : for example,
>
> string 1 : [hello][qwqwe:]sdsdfsdf [note2]
> string 2 :
> [somethingelse]sdfsdf [note 1]
> string 3 : aasdad[note 3]
>
>
>
I would like to get the substrings :
>
> output 1 : [hello][qwqwe:]
> ou... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34931506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3488682/"
] | Approach 1: Matching multiple consecutive `[...]`s at string start *as a single string*
=======================================================================================
You need to use the following regex:
```
^(\[[^]]*])+
```
See [regex demo](http://regexstorm.net/tester?p=%5e(%5c%5b%5b%5e%5d%5d*%5d)%2b&i=%... | you can use this regular expression.
```
^(\[(.*?)\])*
```
C# code for matching:
```
var regex = new Regex(@"^(\[(.*?)\])*");
var inputTexts = new string [] {"[abcd]xyz[pqrst]","abcd[xyz][pqr]","[asdf][abcd][qwer]sds[qwert]" };
foreach (var match in inputTexts.Select(inputText => regex.Mat... |
34,931,506 | I have the following strings:
One Rule : Get all consecutive Square bracket strings : for example,
>
> string 1 : [hello][qwqwe:]sdsdfsdf [note2]
> string 2 :
> [somethingelse]sdfsdf [note 1]
> string 3 : aasdad[note 3]
>
>
>
I would like to get the substrings :
>
> output 1 : [hello][qwqwe:]
> ou... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34931506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3488682/"
] | Approach 1: Matching multiple consecutive `[...]`s at string start *as a single string*
=======================================================================================
You need to use the following regex:
```
^(\[[^]]*])+
```
See [regex demo](http://regexstorm.net/tester?p=%5e(%5c%5b%5b%5e%5d%5d*%5d)%2b&i=%... | Try this, it works for me with your test strings.
```
^(\[[^\]]*(\]|\]\[))*
```
Explanation generated by <https://regex101.com/> :
```
1st Capturing group (\[[^\]]*(\]|\]\[))*
Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy]
Note: A repeated capturing group w... |
34,931,506 | I have the following strings:
One Rule : Get all consecutive Square bracket strings : for example,
>
> string 1 : [hello][qwqwe:]sdsdfsdf [note2]
> string 2 :
> [somethingelse]sdfsdf [note 1]
> string 3 : aasdad[note 3]
>
>
>
I would like to get the substrings :
>
> output 1 : [hello][qwqwe:]
> ou... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34931506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3488682/"
] | Approach 1: Matching multiple consecutive `[...]`s at string start *as a single string*
=======================================================================================
You need to use the following regex:
```
^(\[[^]]*])+
```
See [regex demo](http://regexstorm.net/tester?p=%5e(%5c%5b%5b%5e%5d%5d*%5d)%2b&i=%... | You can adjust four things from you original regex to make it work: 1) use non-greedy match `.*?`, 2) add `^` to match from beginning of string, 3) escape the square brackets, and 4) change final `*` to `+` to require at least one group of square brackets:
```
^(\[.*?\])+
``` |
34,931,506 | I have the following strings:
One Rule : Get all consecutive Square bracket strings : for example,
>
> string 1 : [hello][qwqwe:]sdsdfsdf [note2]
> string 2 :
> [somethingelse]sdfsdf [note 1]
> string 3 : aasdad[note 3]
>
>
>
I would like to get the substrings :
>
> output 1 : [hello][qwqwe:]
> ou... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34931506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3488682/"
] | you can use this regular expression.
```
^(\[(.*?)\])*
```
C# code for matching:
```
var regex = new Regex(@"^(\[(.*?)\])*");
var inputTexts = new string [] {"[abcd]xyz[pqrst]","abcd[xyz][pqr]","[asdf][abcd][qwer]sds[qwert]" };
foreach (var match in inputTexts.Select(inputText => regex.Mat... | Try this, it works for me with your test strings.
```
^(\[[^\]]*(\]|\]\[))*
```
Explanation generated by <https://regex101.com/> :
```
1st Capturing group (\[[^\]]*(\]|\]\[))*
Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy]
Note: A repeated capturing group w... |
34,931,506 | I have the following strings:
One Rule : Get all consecutive Square bracket strings : for example,
>
> string 1 : [hello][qwqwe:]sdsdfsdf [note2]
> string 2 :
> [somethingelse]sdfsdf [note 1]
> string 3 : aasdad[note 3]
>
>
>
I would like to get the substrings :
>
> output 1 : [hello][qwqwe:]
> ou... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34931506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3488682/"
] | you can use this regular expression.
```
^(\[(.*?)\])*
```
C# code for matching:
```
var regex = new Regex(@"^(\[(.*?)\])*");
var inputTexts = new string [] {"[abcd]xyz[pqrst]","abcd[xyz][pqr]","[asdf][abcd][qwer]sds[qwert]" };
foreach (var match in inputTexts.Select(inputText => regex.Mat... | You can adjust four things from you original regex to make it work: 1) use non-greedy match `.*?`, 2) add `^` to match from beginning of string, 3) escape the square brackets, and 4) change final `*` to `+` to require at least one group of square brackets:
```
^(\[.*?\])+
``` |
34,931,506 | I have the following strings:
One Rule : Get all consecutive Square bracket strings : for example,
>
> string 1 : [hello][qwqwe:]sdsdfsdf [note2]
> string 2 :
> [somethingelse]sdfsdf [note 1]
> string 3 : aasdad[note 3]
>
>
>
I would like to get the substrings :
>
> output 1 : [hello][qwqwe:]
> ou... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34931506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3488682/"
] | You can adjust four things from you original regex to make it work: 1) use non-greedy match `.*?`, 2) add `^` to match from beginning of string, 3) escape the square brackets, and 4) change final `*` to `+` to require at least one group of square brackets:
```
^(\[.*?\])+
``` | Try this, it works for me with your test strings.
```
^(\[[^\]]*(\]|\]\[))*
```
Explanation generated by <https://regex101.com/> :
```
1st Capturing group (\[[^\]]*(\]|\]\[))*
Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy]
Note: A repeated capturing group w... |
13,004,202 | I am using [PyContract](http://pypi.python.org/pypi/contract/1.4) (not [PyContracts](http://pypi.python.org/pypi/PyContracts/1.4.0)) to implement design-by-contracts for my genetic algorithms framework.
The main module is `GA.py`, which calls a function from `crossover.py` (let's call it `foocross`). I have written pr... | 2012/10/22 | [
"https://Stackoverflow.com/questions/13004202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/198633/"
] | It's a very simple mechanism that was introduced sometime around iBooks 1.5+, and finally made available to use all with the addition of the `+[UIScreen brightness]` API in iOS 5. Because it accepts a simple float from 0.0-1.0, storing it is a no-brainer, and restoring it can be done in any of the UIApplication delegat... | ```
static CGFloat s_brightness = 0.5f;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
s_brightness = [[UIScreen mainScreen] brightness];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
[[UIScreen mainScreen] ... |
13,004,202 | I am using [PyContract](http://pypi.python.org/pypi/contract/1.4) (not [PyContracts](http://pypi.python.org/pypi/PyContracts/1.4.0)) to implement design-by-contracts for my genetic algorithms framework.
The main module is `GA.py`, which calls a function from `crossover.py` (let's call it `foocross`). I have written pr... | 2012/10/22 | [
"https://Stackoverflow.com/questions/13004202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/198633/"
] | It's a very simple mechanism that was introduced sometime around iBooks 1.5+, and finally made available to use all with the addition of the `+[UIScreen brightness]` API in iOS 5. Because it accepts a simple float from 0.0-1.0, storing it is a no-brainer, and restoring it can be done in any of the UIApplication delegat... | In Swift
```
static var defaultBrightNess:CGFloat = 0.5;
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool
{
AppDelegate.defaultBrightNess = UIScreen.main.brightness;
UIScreen.main.brightness = 1.0;
return true
}
func applicatio... |
13,004,202 | I am using [PyContract](http://pypi.python.org/pypi/contract/1.4) (not [PyContracts](http://pypi.python.org/pypi/PyContracts/1.4.0)) to implement design-by-contracts for my genetic algorithms framework.
The main module is `GA.py`, which calls a function from `crossover.py` (let's call it `foocross`). I have written pr... | 2012/10/22 | [
"https://Stackoverflow.com/questions/13004202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/198633/"
] | ```
static CGFloat s_brightness = 0.5f;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
s_brightness = [[UIScreen mainScreen] brightness];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
[[UIScreen mainScreen] ... | In Swift
```
static var defaultBrightNess:CGFloat = 0.5;
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool
{
AppDelegate.defaultBrightNess = UIScreen.main.brightness;
UIScreen.main.brightness = 1.0;
return true
}
func applicatio... |
38,729,273 | I'm looking for a way to colorize the output from `./configure` so that all instances of `yes` at the end of a check show in one color and `no` in another. I think there may be a way of creating the echo message using `AS_IF` to test the check result and then set the output using the usual bash color commands. I'd obvi... | 2016/08/02 | [
"https://Stackoverflow.com/questions/38729273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1825933/"
] | Lucky for you, Autoconf is basically one giant C-preprocessor-abuse, so its internals are all exposed and it's easy to do something hacky that, fair warning, might not carry over from one Autoconf version to the next.
The definition of `AC_MSG_RESULT` (which prints most of those yes/no messages) is found in `/usr/shar... | This is probably a dumb ask. I wrote one for the package check:
```
AC_DEFUN([COLOR_PKG_CHECK],[
red=$(tput setaf 1)
grn=$(tput setaf 2)
clr=$(tput sgr0)
PKG_CHECK_EXISTS([$1],[$2],[found=yes],[found=no])
AS_IF([test "x$found" = "xyes"],[
msg="checking for $1... ${grn}yes${clr}"
AC_MSG_RESULT($msg... |
58,811,959 | I have been using the code below to send sms to customers telling them their account balances after a given period. so far the code is able to send sms to one person at a time. Can i modify the code to send the message to all customers.
```
<?php
function sendsms($sms_username,$sms_password,$sender_ID,$number,$messag... | 2019/11/12 | [
"https://Stackoverflow.com/questions/58811959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12358842/"
] | -First, you can change your if statement with the condition if your loop at the first character in the phrase and meets a space.
-Second, you can change how the way you swap from this :
```
phrase[i] = temp;
phrase[i] = phrase[j];
phrase[j] = temp;
```
with this :
```
temp = phrase[i];
phrase[i] = phrase[j... | Here's the proper C++ way of doing it.
```
#include <iostream>
#include <string>
#include <sstream>
int main() {
std::string phrase;
std::cout << "Enter a phrase" << std::endl;
getline(std::cin, phrase);
std::stringstream ss{phrase};
std::string reversedPhrase;
std::string word;
while ... |
58,811,959 | I have been using the code below to send sms to customers telling them their account balances after a given period. so far the code is able to send sms to one person at a time. Can i modify the code to send the message to all customers.
```
<?php
function sendsms($sms_username,$sms_password,$sender_ID,$number,$messag... | 2019/11/12 | [
"https://Stackoverflow.com/questions/58811959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12358842/"
] | -First, you can change your if statement with the condition if your loop at the first character in the phrase and meets a space.
-Second, you can change how the way you swap from this :
```
phrase[i] = temp;
phrase[i] = phrase[j];
phrase[j] = temp;
```
with this :
```
temp = phrase[i];
phrase[i] = phrase[j... | This one is pretty easy!
You're on the right track. When you cin your phrase, you can immediately switch the 1st index with the 2nd. Then, you for loop thru the rest. Something like this:
[1]: <https://i.stack.imgur.com/M1ntj.png> |
58,811,959 | I have been using the code below to send sms to customers telling them their account balances after a given period. so far the code is able to send sms to one person at a time. Can i modify the code to send the message to all customers.
```
<?php
function sendsms($sms_username,$sms_password,$sender_ID,$number,$messag... | 2019/11/12 | [
"https://Stackoverflow.com/questions/58811959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12358842/"
] | This one is pretty easy!
You're on the right track. When you cin your phrase, you can immediately switch the 1st index with the 2nd. Then, you for loop thru the rest. Something like this:
[1]: <https://i.stack.imgur.com/M1ntj.png> | Here's the proper C++ way of doing it.
```
#include <iostream>
#include <string>
#include <sstream>
int main() {
std::string phrase;
std::cout << "Enter a phrase" << std::endl;
getline(std::cin, phrase);
std::stringstream ss{phrase};
std::string reversedPhrase;
std::string word;
while ... |
15,384,108 | I have a SSIS package where1 record (hard coded) flow through.

I have variable in DFT scope.

I assign value to variable using Row Count Transaformation.
![enter image descriptio... | 2013/03/13 | [
"https://Stackoverflow.com/questions/15384108",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1318701/"
] | The value for `variable` being assigned inside a `data flow task` can't be used in the `split transformation` or later in the Data Flow task . The values generally get `populated` once DFT gets `completed` .
```
Variable values does not update during the execution of Data Flow task
```
Even though you are able to s... | Alternatively you can use RANK Function as one of the columns, latter use Conditional split with max function to get the number of rows selected (in directly row count). Next you can use Copy column and remove RANK column before inserting into final destination. Hope this helps! |
21,816,052 | How can I have the same effect in iOS `UITextView` like below image.
Blur effect from the bottom of `UITextView`

Thanks in Advance :) | 2014/02/16 | [
"https://Stackoverflow.com/questions/21816052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1520570/"
] | Try the following: I tried the following with image but not UITextView
```
UIView *vwTest = [[UIView alloc] initWithFrame:_textView.frame];
[vwTest setBackgroundColor:[UIColor whiteColor]];
[vwTest setUserInteractionEnabled:NO];
[self.view addSubview:vwTest];
NSArray *colors = [NSArray arrayWithObjects:
... | Just place an UIImageView which contains a gradient image from clear to white on top of the bottom of the text view. That's the easiest way I guess. |
21,816,052 | How can I have the same effect in iOS `UITextView` like below image.
Blur effect from the bottom of `UITextView`

Thanks in Advance :) | 2014/02/16 | [
"https://Stackoverflow.com/questions/21816052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1520570/"
] | Try the following: I tried the following with image but not UITextView
```
UIView *vwTest = [[UIView alloc] initWithFrame:_textView.frame];
[vwTest setBackgroundColor:[UIColor whiteColor]];
[vwTest setUserInteractionEnabled:NO];
[self.view addSubview:vwTest];
NSArray *colors = [NSArray arrayWithObjects:
... | ```
let gradientLayer: CAGradientLayer = CAGradientLayer()
gradientLayer.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(textView.frame), CGRectGetHeight(textView.frame))
gradientLayer.colors = [UIColor.init(white: 1, alpha: 0).CGColor, UIColor.whiteColor().CGColor]
gradientLayer.startPoint = CGPoin... |
21,816,052 | How can I have the same effect in iOS `UITextView` like below image.
Blur effect from the bottom of `UITextView`

Thanks in Advance :) | 2014/02/16 | [
"https://Stackoverflow.com/questions/21816052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1520570/"
] | Try the following: I tried the following with image but not UITextView
```
UIView *vwTest = [[UIView alloc] initWithFrame:_textView.frame];
[vwTest setBackgroundColor:[UIColor whiteColor]];
[vwTest setUserInteractionEnabled:NO];
[self.view addSubview:vwTest];
NSArray *colors = [NSArray arrayWithObjects:
... | The answer of @Charlie above did not work as is for me on Swift 5.x, I had to make some changes.
First add an UIView with an UITextView on it. Then I did apply the calare like this:
```
let gradientLayer: CAGradientLayer = CAGradientLayer()
gradientLayer.frame = CGRect.init(x: 0.0, y: 0.0, width: textView.frame.width... |
476,176 | I want to ask what is the little numbers on top/over any random number? For example, 75 in² and 125 ft3. What is it called and what does it mean is my question. I couldn't find anything online since I don't know what it is called. | 2018/12/08 | [
"https://english.stackexchange.com/questions/476176",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/318987/"
] | In terms of formatting, numbers and letters that appear in the top half of a line are in *superscript*. Similarly, numbers in the bottom half of a line would be called *subscript*. "Super" and "sub" describe their position over or under the main text.
In your examples, these superscript numbers stand for a mathematic... | The general term for a number (or other text) written like this is **[superscript](https://en.wikipedia.org/wiki/Subscript_and_superscript)**.
The term in2 refers to [square inches](https://en.wikipedia.org/wiki/Square_inch), which is the amount of area in a square with sides an inch in length.
Likewise, if it were i... |
476,176 | I want to ask what is the little numbers on top/over any random number? For example, 75 in² and 125 ft3. What is it called and what does it mean is my question. I couldn't find anything online since I don't know what it is called. | 2018/12/08 | [
"https://english.stackexchange.com/questions/476176",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/318987/"
] | The general term for a number (or other text) written like this is **[superscript](https://en.wikipedia.org/wiki/Subscript_and_superscript)**.
The term in2 refers to [square inches](https://en.wikipedia.org/wiki/Square_inch), which is the amount of area in a square with sides an inch in length.
Likewise, if it were i... | **Exponent**
>
> 3.6 Derived Units— Derived units are formed by combining base units according to the algebraic relations linking
> the corresponding quantities. Symbols for derived units are obtained by means of mathematical signs for
> multiplication, division, and the use of **exponents**. For example, the SI u... |
476,176 | I want to ask what is the little numbers on top/over any random number? For example, 75 in² and 125 ft3. What is it called and what does it mean is my question. I couldn't find anything online since I don't know what it is called. | 2018/12/08 | [
"https://english.stackexchange.com/questions/476176",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/318987/"
] | In terms of formatting, numbers and letters that appear in the top half of a line are in *superscript*. Similarly, numbers in the bottom half of a line would be called *subscript*. "Super" and "sub" describe their position over or under the main text.
In your examples, these superscript numbers stand for a mathematic... | **Exponent**
>
> 3.6 Derived Units— Derived units are formed by combining base units according to the algebraic relations linking
> the corresponding quantities. Symbols for derived units are obtained by means of mathematical signs for
> multiplication, division, and the use of **exponents**. For example, the SI u... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | I looked at the answers on SO. I don't think they are satisfactory. People often argue for the normal distribution because of the central limit theorem. That may be okay in large samples when the problem involves averages. But machine learning problems can be more complex and sample sizes are not always large enough fo... | Machine learning (and statistics as well) treats data as the mix of deterministic (causal) and random parts. The random part of data usually has normal distribution. (Really, the causal relation is reverse: the distribution of random part of variable is called normal). Central limit theorem says that the sum of large n... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | I looked at the answers on SO. I don't think they are satisfactory. People often argue for the normal distribution because of the central limit theorem. That may be okay in large samples when the problem involves averages. But machine learning problems can be more complex and sample sizes are not always large enough fo... | i'm currently studying machine learning and the same question popped to my mind. What I think the reason should be is that in every machine learning problem we assume we have abundant observational data available and whenever data tends to infinity it gets normally distributed around its mean and thats what Normal dist... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | I looked at the answers on SO. I don't think they are satisfactory. People often argue for the normal distribution because of the central limit theorem. That may be okay in large samples when the problem involves averages. But machine learning problems can be more complex and sample sizes are not always large enough fo... | One reason that normal distributions are often (but not always!) assumed: the nature of the distribution often leads to extremely efficient computation. For example, in generalized linear regression, the solution is technically in closed form when your distribution is Gaussian:
$\hat \beta = (X^T X)^{-1} X^T Y$
where... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | I looked at the answers on SO. I don't think they are satisfactory. People often argue for the normal distribution because of the central limit theorem. That may be okay in large samples when the problem involves averages. But machine learning problems can be more complex and sample sizes are not always large enough fo... | I had the same question "what the is advantage of doing a Gaussian transformation on predictors or target?" Infact, caret package has a pre-processing step that enables this transformation.
I tried reasoning this out and am summarizing my understanding -
1. Usually the data distribution in Nature follows a Normal d... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | Machine learning (and statistics as well) treats data as the mix of deterministic (causal) and random parts. The random part of data usually has normal distribution. (Really, the causal relation is reverse: the distribution of random part of variable is called normal). Central limit theorem says that the sum of large n... | i'm currently studying machine learning and the same question popped to my mind. What I think the reason should be is that in every machine learning problem we assume we have abundant observational data available and whenever data tends to infinity it gets normally distributed around its mean and thats what Normal dist... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | Machine learning (and statistics as well) treats data as the mix of deterministic (causal) and random parts. The random part of data usually has normal distribution. (Really, the causal relation is reverse: the distribution of random part of variable is called normal). Central limit theorem says that the sum of large n... | One reason that normal distributions are often (but not always!) assumed: the nature of the distribution often leads to extremely efficient computation. For example, in generalized linear regression, the solution is technically in closed form when your distribution is Gaussian:
$\hat \beta = (X^T X)^{-1} X^T Y$
where... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | Machine learning (and statistics as well) treats data as the mix of deterministic (causal) and random parts. The random part of data usually has normal distribution. (Really, the causal relation is reverse: the distribution of random part of variable is called normal). Central limit theorem says that the sum of large n... | I had the same question "what the is advantage of doing a Gaussian transformation on predictors or target?" Infact, caret package has a pre-processing step that enables this transformation.
I tried reasoning this out and am summarizing my understanding -
1. Usually the data distribution in Nature follows a Normal d... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | One reason that normal distributions are often (but not always!) assumed: the nature of the distribution often leads to extremely efficient computation. For example, in generalized linear regression, the solution is technically in closed form when your distribution is Gaussian:
$\hat \beta = (X^T X)^{-1} X^T Y$
where... | i'm currently studying machine learning and the same question popped to my mind. What I think the reason should be is that in every machine learning problem we assume we have abundant observational data available and whenever data tends to infinity it gets normally distributed around its mean and thats what Normal dist... |
38,237 | For example, we always assumed that the data or signal error is a Gaussian distribution? why?
I have asked this question on stackoverflow, the link: <https://stackoverflow.com/questions/12616406/anyone-can-tell-me-why-we-always-use-the-gaussian-distribution-in-machine-learni> | 2012/09/29 | [
"https://stats.stackexchange.com/questions/38237",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/14477/"
] | I had the same question "what the is advantage of doing a Gaussian transformation on predictors or target?" Infact, caret package has a pre-processing step that enables this transformation.
I tried reasoning this out and am summarizing my understanding -
1. Usually the data distribution in Nature follows a Normal d... | i'm currently studying machine learning and the same question popped to my mind. What I think the reason should be is that in every machine learning problem we assume we have abundant observational data available and whenever data tends to infinity it gets normally distributed around its mean and thats what Normal dist... |
33,502,647 | I have successfully generated EF classes for a remote MySQL database, with a resulting `.edmx`object that contains the `Context` and table-associated C# classes.
I built the application and tried to add the EF classes as object data sources, but the wizard only displays the `Properties` namespace and its contents.
[!... | 2015/11/03 | [
"https://Stackoverflow.com/questions/33502647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/374253/"
] | Apparently there's a bug in Visual Studio. I reverted to .NET framework 4.5.2 from 4.6 and the data sources reappeared. | I had this problem and it turned out I had written my classes inside my entity framework class. It will let you do it and everything will work as normal, but these classes will not show up in the data source explorer. |
33,502,647 | I have successfully generated EF classes for a remote MySQL database, with a resulting `.edmx`object that contains the `Context` and table-associated C# classes.
I built the application and tried to add the EF classes as object data sources, but the wizard only displays the `Properties` namespace and its contents.
[!... | 2015/11/03 | [
"https://Stackoverflow.com/questions/33502647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/374253/"
] | I had same problem. Tried everything, even changed default namespace. On the and it was that, that my project build platform target was x64, after changing that to Any CPU,a after build namespaces and classes reappeared.
Regards! | I had this problem and it turned out I had written my classes inside my entity framework class. It will let you do it and everything will work as normal, but these classes will not show up in the data source explorer. |
376,572 | How electrical energy can be power over time when electrical energy is actually potential energy?
from a lot of sources (wiki ,study.com..) comes the information that electric energy is potential or kinetic energy. In other sources is said to be electric power p x t so i am confused by this if anyone could explain to ... | 2017/12/27 | [
"https://physics.stackexchange.com/questions/376572",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/179787/"
] | >
> Would not air pressure keep the paper pressed against the book's cover?
>
>
>
To an extent, possibly.
This is not the main reason why it is done though; although it does relate to your newspaper-ruler example.
The reason would be to minimize the effects of air drag on the piece of paper. Although all objects... | The actual experiment was performed with a stone and a feather in two vacuum tubes of sane length. It was demonstrated that both the stone and the feather fall the same distance in the same time, which shows that the time if fall is independent of the masses of the body.
In the experiment you stated, there may be chan... |
6,740,655 | I'm having a problem doing a request using Typhoeus as my query needs to have quotation marks into it.
If the URl is
```
url = "http://app.com/method.json?'my_query'"
```
everything works fine. However, the method I'm trying to run only returns the results I want if the query is the following (i've tested it in bro... | 2011/07/18 | [
"https://Stackoverflow.com/questions/6740655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/558452/"
] | You should be properly encoding your URI with [`URI.encode`](http://ruby-doc.org/stdlib/libdoc/uri/rdoc/classes/URI/Escape.html#M009396) or [`CGI.escape`](http://ruby-doc.org/stdlib/libdoc/cgi/rdoc/classes/CGI.html#M000093), doing so will get you proper URLs like this:
```
http://app.com/method.json?%27my_query%27 # S... | Try:
```
require 'uri'
URI.encode('"foo"')
=> "%22foo%22"
``` |
6,740,655 | I'm having a problem doing a request using Typhoeus as my query needs to have quotation marks into it.
If the URl is
```
url = "http://app.com/method.json?'my_query'"
```
everything works fine. However, the method I'm trying to run only returns the results I want if the query is the following (i've tested it in bro... | 2011/07/18 | [
"https://Stackoverflow.com/questions/6740655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/558452/"
] | You should be properly encoding your URI with [`URI.encode`](http://ruby-doc.org/stdlib/libdoc/uri/rdoc/classes/URI/Escape.html#M009396) or [`CGI.escape`](http://ruby-doc.org/stdlib/libdoc/cgi/rdoc/classes/CGI.html#M000093), doing so will get you proper URLs like this:
```
http://app.com/method.json?%27my_query%27 # S... | Passing json, quotes etc in GET request is tricky. In Ruby 2+ we can use Ruby's URI module's 'escape' method.
```
> URI.escape('http://app.com/method.json?agent={"account":
{"homePage":"http://demo.my.com","name":"Senior Leadership"}}')
```
But I suggest use it as POST request and pass it as a message body. |
29,952 | I've not seen a lot of material on this. I've seen people attempting to bring a C++ program back to C++ code, and claiming how hard it is, but C code from C++ program? I don't know.
If it is *possible,* what obstacles would be in the way? If *impossible,* what particular features make it so? | 2022/01/29 | [
"https://reverseengineering.stackexchange.com/questions/29952",
"https://reverseengineering.stackexchange.com",
"https://reverseengineering.stackexchange.com/users/40222/"
] | If you're asking whether it's possible for an automated decompiler to produce C code as output for a given C++ input binary (rather than producing C++ code as output), the answer is that most decompilers are going to do this anyway, and are not going to give you a choice as to which language they produce as output. Mac... | Of course, yes.
Here, the problem is that you need to know well about the difference between c and c++ from the viewpoint of reversing, I suppose.
For example, the c++ classes is converted to assem codes like c structure, and the virtual table of a class is converted a first member of a structure and other functions is... |
4 | I am looking for a starting point for my project, preferably using popular systems (ones there is a lot of support for). I have an Arduino Uno, a Raspberry Pi, and a lot of willpower :) Anyone here built a project using the systems above?
Observation: I'd like to start with a simple line-following vehicle and build up... | 2012/10/23 | [
"https://robotics.stackexchange.com/questions/4",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/32/"
] | The Arduino is really an AVR Atmega328p. The Arduino is a fine off-the-shelf implementation of this microcontroller, but if you make many of them, you can buy the chip for less than $3 each in bulk, and it requires very little circuitry to run on its own -- a crystal and a couple of capacitors to run at 20 Mhz, or not ... | I built a line following robot with an Arduino before. It was really simple to do and all we used were color sensors on the bottom inputted in the Arduino, and then of course some motors for the wheels.
But using an Arduino allowed us to have plenty of room for other components we wanted to add on to make our robot d... |
4 | I am looking for a starting point for my project, preferably using popular systems (ones there is a lot of support for). I have an Arduino Uno, a Raspberry Pi, and a lot of willpower :) Anyone here built a project using the systems above?
Observation: I'd like to start with a simple line-following vehicle and build up... | 2012/10/23 | [
"https://robotics.stackexchange.com/questions/4",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/32/"
] | If you want a line-following robot, then something similar to an [m3pi](http://mbed.org/cookbook/m3pi) would be achievable. Photo-transistors seem to be very effective with a black-on-white track.
As for a microcontroller, Mario Markarian is probably right, it is down to personal preference and the project you are wor... | If you want to go further than using microcontrollers you could run ROS on you [Raspberry Pi](http://www.ros.org/wiki/ROSberryPi/Setting%20up%20ROS%20on%20RaspberryPi).
I have build several robots and a couple of other projects using a [RoboCard](http://robocard.dk/) (site in Danish, but can [be translated](http://tra... |
4 | I am looking for a starting point for my project, preferably using popular systems (ones there is a lot of support for). I have an Arduino Uno, a Raspberry Pi, and a lot of willpower :) Anyone here built a project using the systems above?
Observation: I'd like to start with a simple line-following vehicle and build up... | 2012/10/23 | [
"https://robotics.stackexchange.com/questions/4",
"https://robotics.stackexchange.com",
"https://robotics.stackexchange.com/users/32/"
] | The Arduino is really an AVR Atmega328p. The Arduino is a fine off-the-shelf implementation of this microcontroller, but if you make many of them, you can buy the chip for less than $3 each in bulk, and it requires very little circuitry to run on its own -- a crystal and a couple of capacitors to run at 20 Mhz, or not ... | You should use an ARM. Then you can run full linux or android and have access to powerful libraries, high-level functional languages, and a package manager and community. You can use gcc or LLVM, and a modern debugger like gdb.
ARMs used to be too expensive and/or too big, but nowadays you can get an ARM for $5 that's... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.