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 |
|---|---|---|---|---|---|
2,540,625 | Suppose $\{A\_i\}\_{i=1}^{\infty}$ is a sequence of matrices with $\lim\_{i\to\infty}A\_i= B$. Then does $\lim\_{i\to \infty}A\_i^\top= B^\top$ if we measure distances between matrices with a 2-norm? | 2017/11/28 | [
"https://math.stackexchange.com/questions/2540625",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407611/"
] | If $P(n,k)$ is the probability for exactly $k$ people out of $n$ have the same birthday and $P(n,\ge t)$ is the probability for at least $t$ people out of $n$ have the same birthday then:
$P(n, \ge3)=P(n,3)+P(n,4)+\cdots+P(n,n)=\sum\limits\_{i=3}^n P(n,i)=1-\left(\sum\limits\_{j=0}^2 P(n,j)\right)=1-(P(n,2)+P(n,1)+P(n... | Consider the complementary event, i.e. there is no group of three or more people with the same birthday. Then there can only be pairs of people (possibly zero pairs) with the same birthday; let's say there are exactly $i$ pairs of people with the same birthday, where $ 0 \le i \le \lfloor n/2 \rfloor$. If we consider t... |
32,932,527 | I have a JSON source and want to get results from it with a post request.
When I test with POSTMAN extension in chorme it works really well. But when I do that with angularJS the page keep loading and chrome consoles shows errors.
My code is here:
```
angular.module('loginApp', []).controller('loginController', func... | 2015/10/04 | [
"https://Stackoverflow.com/questions/32932527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3206762/"
] | You want to show the "No results found"-message when no rows are found in the database table.
To do this, you can use below PHP and SQL code:
```
$sql = "SELECT * FROM search WHERE isbn='$isbn' OR bookname='$bookname' OR author='$author' OR category='$category'";
$query = $db->prepare($sql);
$query->execute();
$rows ... | Assuming you are using [Mysqli](http://php.net/manual/en/mysqli.quickstart.php) ,
```
//connect with mysql
$conn = mysqli_connect("localhost", "user", "password", "db");
//here is the query
if($result = mysqli_query($conn,"SELECT * FROM search WHERE isbn='$isbn' OR bookname='$bookname' OR author='$author'... |
48,636,463 | I am a new learner of html and css. I want to make my circle orange background curve wave using only css not using background-image or svg. Like the screenshot:
<https://i.stack.imgur.com/rDQeY.png>
[](https://i.stack.imgur.com/rDQeY.png)
Without usi... | 2018/02/06 | [
"https://Stackoverflow.com/questions/48636463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7983778/"
] | Try this.
```css
#yin-yang {
display: flex;
align-items: center;
width: 80vmin;
height: 80vmin;
border-radius: 50%;
background: linear-gradient(black 50%, #3ed89c 0);
}
#yin-yang:before, #yin-yang:after {
flex: 1;
height: 50%;
border-radius: 50%;
background: black;
content: "";
}
#... | Have a look at the example below.
You can take help of SVG Cubic Bezier curves to create complex shapes. You need to specify three sets of coordinates.
>
> C x1 y1, x2 y2, x y (or c dx1 dy1, dx2 dy2, dx dy)
>
>
>
Check this link: <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>
```html
<svg wid... |
48,636,463 | I am a new learner of html and css. I want to make my circle orange background curve wave using only css not using background-image or svg. Like the screenshot:
<https://i.stack.imgur.com/rDQeY.png>
[](https://i.stack.imgur.com/rDQeY.png)
Without usi... | 2018/02/06 | [
"https://Stackoverflow.com/questions/48636463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7983778/"
] | I used Div Containers and CSS to reproduce your required results. Feel free to tweak as you need. First i made a div container with a border or 50% on all sides for our circle. Next i built 2 more divs with a border radius and gradient and rotated them to place to create the results. Hope it helps.
```css
.circleConta... | Have a look at the example below.
You can take help of SVG Cubic Bezier curves to create complex shapes. You need to specify three sets of coordinates.
>
> C x1 y1, x2 y2, x y (or c dx1 dy1, dx2 dy2, dx dy)
>
>
>
Check this link: <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>
```html
<svg wid... |
48,636,463 | I am a new learner of html and css. I want to make my circle orange background curve wave using only css not using background-image or svg. Like the screenshot:
<https://i.stack.imgur.com/rDQeY.png>
[](https://i.stack.imgur.com/rDQeY.png)
Without usi... | 2018/02/06 | [
"https://Stackoverflow.com/questions/48636463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7983778/"
] | I used Div Containers and CSS to reproduce your required results. Feel free to tweak as you need. First i made a div container with a border or 50% on all sides for our circle. Next i built 2 more divs with a border radius and gradient and rotated them to place to create the results. Hope it helps.
```css
.circleConta... | Try this.
```css
#yin-yang {
display: flex;
align-items: center;
width: 80vmin;
height: 80vmin;
border-radius: 50%;
background: linear-gradient(black 50%, #3ed89c 0);
}
#yin-yang:before, #yin-yang:after {
flex: 1;
height: 50%;
border-radius: 50%;
background: black;
content: "";
}
#... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | Rather old question, but to who it might be helpfull:
If you code your own template and upload it to Mailchimp you lose the 'drag & drop' system/UX interface with the different blocks. You are able to create repeatable blocks but then it works with a dropdown list. This is (in my humble opinion) not that user friendl... | Still not possible, answer from the Mailchimp support: "At the moment, it's not currently possible to code a drag and drop template completely--one of our drag and drop template layouts will need to be selected, but you can drop in Code blocks to get a little more control over the styling of certain sections."
Though,... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | Rather old question, but to who it might be helpfull:
If you code your own template and upload it to Mailchimp you lose the 'drag & drop' system/UX interface with the different blocks. You are able to create repeatable blocks but then it works with a dropdown list. This is (in my humble opinion) not that user friendl... | I know this is an old question, but while searching for this myself I stumbled upon a solution posted [here](https://stackoverflow.com/a/41620134/3041866).
Basically it is possible to code your own drag n' drop template, but the solution has not been documented.
1. Find one of the Mailchimp templates (either one of t... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | Rather old question, but to who it might be helpfull:
If you code your own template and upload it to Mailchimp you lose the 'drag & drop' system/UX interface with the different blocks. You are able to create repeatable blocks but then it works with a dropdown list. This is (in my humble opinion) not that user friendl... | I found part of the answer on another topic: [[Is it possible to code drag&drop templates for mailchimp?](https://stackoverflow.com/questions/38447364/is-it-possible-to-code-dragdrop-templates-for-mailchimp/58088578#58088578][1])
If you add the following code into your main content div or td it will enable the drag an... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | Rather old question, but to who it might be helpfull:
If you code your own template and upload it to Mailchimp you lose the 'drag & drop' system/UX interface with the different blocks. You are able to create repeatable blocks but then it works with a dropdown list. This is (in my humble opinion) not that user friendl... | You can create your own drag and drop template you need to add the following into your html coded template where you want the 'drag and drop' feature to exist.
```
<div id="templateBody" mc:container="container_name" mccontainer="container_name" class="tpl-container">
<div mc:block=... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | Still not possible, answer from the Mailchimp support: "At the moment, it's not currently possible to code a drag and drop template completely--one of our drag and drop template layouts will need to be selected, but you can drop in Code blocks to get a little more control over the styling of certain sections."
Though,... | I found part of the answer on another topic: [[Is it possible to code drag&drop templates for mailchimp?](https://stackoverflow.com/questions/38447364/is-it-possible-to-code-dragdrop-templates-for-mailchimp/58088578#58088578][1])
If you add the following code into your main content div or td it will enable the drag an... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | Still not possible, answer from the Mailchimp support: "At the moment, it's not currently possible to code a drag and drop template completely--one of our drag and drop template layouts will need to be selected, but you can drop in Code blocks to get a little more control over the styling of certain sections."
Though,... | You can create your own drag and drop template you need to add the following into your html coded template where you want the 'drag and drop' feature to exist.
```
<div id="templateBody" mc:container="container_name" mccontainer="container_name" class="tpl-container">
<div mc:block=... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | I know this is an old question, but while searching for this myself I stumbled upon a solution posted [here](https://stackoverflow.com/a/41620134/3041866).
Basically it is possible to code your own drag n' drop template, but the solution has not been documented.
1. Find one of the Mailchimp templates (either one of t... | I found part of the answer on another topic: [[Is it possible to code drag&drop templates for mailchimp?](https://stackoverflow.com/questions/38447364/is-it-possible-to-code-dragdrop-templates-for-mailchimp/58088578#58088578][1])
If you add the following code into your main content div or td it will enable the drag an... |
33,575,177 | I'd like to create a custom drag and drop template so I can increase the design possibilities without losing the functionality. I can't find anything in their documentation.
I was hoping to create something like [this](http://i.stack.imgur.com/KhAd3.png), not sure if I'm missing something obvious but I can't find a dr... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33575177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3325606/"
] | I know this is an old question, but while searching for this myself I stumbled upon a solution posted [here](https://stackoverflow.com/a/41620134/3041866).
Basically it is possible to code your own drag n' drop template, but the solution has not been documented.
1. Find one of the Mailchimp templates (either one of t... | You can create your own drag and drop template you need to add the following into your html coded template where you want the 'drag and drop' feature to exist.
```
<div id="templateBody" mc:container="container_name" mccontainer="container_name" class="tpl-container">
<div mc:block=... |
5,230 | I'm trying to get a webcam working with my Raspberry Pi
[How do I install webcam firmware on the Raspberry Pi?](https://raspberrypi.stackexchange.com/questions/5111/how-do-i-install-webcam-firmware-on-the-raspberry-pi)
I found a possible way of doing this with gspca.
So I downloaded the file and unzipped it.
<h... | 2013/03/03 | [
"https://raspberrypi.stackexchange.com/questions/5230",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/3027/"
] | `/lib/modules/NN.NN.NN/build` is conventionally a soft link to the kernel source tree used to build the modules (often `/usr/src/linux-NN.NN.NN`). *[The 'N' there and in the rest of this post means an actual version number, not a literal N.]*
It would appear you are using 3.6.11+ ? **Make SURE this is the case.**
```... | We had the very same problem, and it turned out that '$(PWD)/build' directory, '/lib/modules/4.8.0-53-generic/build' on my laptop, is empty, but this build folder must be a shortcut of '/usr/src/linux-headers-4.8.0-53-generic' directory, therefore we built such shortcut manually and finally it started working perfectly... |
5,230 | I'm trying to get a webcam working with my Raspberry Pi
[How do I install webcam firmware on the Raspberry Pi?](https://raspberrypi.stackexchange.com/questions/5111/how-do-i-install-webcam-firmware-on-the-raspberry-pi)
I found a possible way of doing this with gspca.
So I downloaded the file and unzipped it.
<h... | 2013/03/03 | [
"https://raspberrypi.stackexchange.com/questions/5230",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/3027/"
] | `/lib/modules/NN.NN.NN/build` is conventionally a soft link to the kernel source tree used to build the modules (often `/usr/src/linux-NN.NN.NN`). *[The 'N' there and in the rest of this post means an actual version number, not a literal N.]*
It would appear you are using 3.6.11+ ? **Make SURE this is the case.**
```... | First you need to ensure you have the kernel headers installed in the device, you can check using `ls -l /usr/src/linux-headers-$(uname -r)` , if you don't see any files in the output you need toinstall the rpi headers for the kernel. You can download it using `sudo apt install raspberrypi-kernel-headers`.
If you alre... |
5,230 | I'm trying to get a webcam working with my Raspberry Pi
[How do I install webcam firmware on the Raspberry Pi?](https://raspberrypi.stackexchange.com/questions/5111/how-do-i-install-webcam-firmware-on-the-raspberry-pi)
I found a possible way of doing this with gspca.
So I downloaded the file and unzipped it.
<h... | 2013/03/03 | [
"https://raspberrypi.stackexchange.com/questions/5230",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/3027/"
] | `/lib/modules/NN.NN.NN/build` is conventionally a soft link to the kernel source tree used to build the modules (often `/usr/src/linux-NN.NN.NN`). *[The 'N' there and in the rest of this post means an actual version number, not a literal N.]*
It would appear you are using 3.6.11+ ? **Make SURE this is the case.**
```... | I spent two days in this problem.
I had to upgrade the OS using this [link](https://www.tomshardware.com/how-to/upgrade-raspberry-pi-os-to-bullseye-from-buster)
```
sudo apt dist-upgrade -y
sudo rpi-update
sudo apt update sudo apt
dist-upgrade
``` |
5,230 | I'm trying to get a webcam working with my Raspberry Pi
[How do I install webcam firmware on the Raspberry Pi?](https://raspberrypi.stackexchange.com/questions/5111/how-do-i-install-webcam-firmware-on-the-raspberry-pi)
I found a possible way of doing this with gspca.
So I downloaded the file and unzipped it.
<h... | 2013/03/03 | [
"https://raspberrypi.stackexchange.com/questions/5230",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/3027/"
] | We had the very same problem, and it turned out that '$(PWD)/build' directory, '/lib/modules/4.8.0-53-generic/build' on my laptop, is empty, but this build folder must be a shortcut of '/usr/src/linux-headers-4.8.0-53-generic' directory, therefore we built such shortcut manually and finally it started working perfectly... | First you need to ensure you have the kernel headers installed in the device, you can check using `ls -l /usr/src/linux-headers-$(uname -r)` , if you don't see any files in the output you need toinstall the rpi headers for the kernel. You can download it using `sudo apt install raspberrypi-kernel-headers`.
If you alre... |
5,230 | I'm trying to get a webcam working with my Raspberry Pi
[How do I install webcam firmware on the Raspberry Pi?](https://raspberrypi.stackexchange.com/questions/5111/how-do-i-install-webcam-firmware-on-the-raspberry-pi)
I found a possible way of doing this with gspca.
So I downloaded the file and unzipped it.
<h... | 2013/03/03 | [
"https://raspberrypi.stackexchange.com/questions/5230",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/3027/"
] | We had the very same problem, and it turned out that '$(PWD)/build' directory, '/lib/modules/4.8.0-53-generic/build' on my laptop, is empty, but this build folder must be a shortcut of '/usr/src/linux-headers-4.8.0-53-generic' directory, therefore we built such shortcut manually and finally it started working perfectly... | I spent two days in this problem.
I had to upgrade the OS using this [link](https://www.tomshardware.com/how-to/upgrade-raspberry-pi-os-to-bullseye-from-buster)
```
sudo apt dist-upgrade -y
sudo rpi-update
sudo apt update sudo apt
dist-upgrade
``` |
5,230 | I'm trying to get a webcam working with my Raspberry Pi
[How do I install webcam firmware on the Raspberry Pi?](https://raspberrypi.stackexchange.com/questions/5111/how-do-i-install-webcam-firmware-on-the-raspberry-pi)
I found a possible way of doing this with gspca.
So I downloaded the file and unzipped it.
<h... | 2013/03/03 | [
"https://raspberrypi.stackexchange.com/questions/5230",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/3027/"
] | First you need to ensure you have the kernel headers installed in the device, you can check using `ls -l /usr/src/linux-headers-$(uname -r)` , if you don't see any files in the output you need toinstall the rpi headers for the kernel. You can download it using `sudo apt install raspberrypi-kernel-headers`.
If you alre... | I spent two days in this problem.
I had to upgrade the OS using this [link](https://www.tomshardware.com/how-to/upgrade-raspberry-pi-os-to-bullseye-from-buster)
```
sudo apt dist-upgrade -y
sudo rpi-update
sudo apt update sudo apt
dist-upgrade
``` |
29,096 | While it's certainly very crude, if not plain gross, it's [not all that uncommon](http://www.aismedia.com/press/facebook-making-a-splash-in-the-bathroom/) for people to use social media sites like Facebook while in the bathroom.
[Many Posekim](http://www.theyeshivaworld.com/weekly_torah.php?id=245) forbid speaking in ... | 2013/05/29 | [
"https://judaism.stackexchange.com/questions/29096",
"https://judaism.stackexchange.com",
"https://judaism.stackexchange.com/users/5/"
] | Here's a shiur talking exactly about your question (haven't listened to it) I would define texting and using social media sites to be basically the same thing.
<http://www.yutorah.org/lectures/lecture.cfm/782704/Rabbi_Aryeh_Lebowitz/Ten_Minute_Halacha_-_Talking_Texting_and_Eating_in_the_Bathroom> (in English).
Some so... | From the Ben Ish Chai Shana Alef Parshas vayetzei 10 talking should not be done but to make noises is fine ,it is saying words(letters) that is problematic.It seems that texting words should be fine. |
120,181 | I can see blocks on pages, their classes and structure and guess where they are added and what their name is - what is the best way to do this?
Is this what path hints is made for? Is there any other way even if it requires familiarity? | 2016/06/09 | [
"https://magento.stackexchange.com/questions/120181",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/38988/"
] | you can either edit the template that renders the block and add this at the top of it
```
echo $this->getName();
```
But this may not always help you.
You can enable the template path hints, then search in the layout files for something that matches the template name and the block type. | Magento has a highlight mechanism in **System Configuration** to find the `template path` and also show you the `block name`
**To turn on template path hints in Magento:**
1- Log into the magento back-end admin
2- Go to System -> Configuration in the main menu
3- Go to Developer on the bottom left under ADVANCED
4... |
120,181 | I can see blocks on pages, their classes and structure and guess where they are added and what their name is - what is the best way to do this?
Is this what path hints is made for? Is there any other way even if it requires familiarity? | 2016/06/09 | [
"https://magento.stackexchange.com/questions/120181",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/38988/"
] | you can either edit the template that renders the block and add this at the top of it
```
echo $this->getName();
```
But this may not always help you.
You can enable the template path hints, then search in the layout files for something that matches the template name and the block type. | As mentioned above you can enable template hints either through the admin, or it's usually faster to search the codebase. For example:
If the block/container you are trying to find has a unique class or ID then I usually find it quicker just to search for those. For example if I wanted to find out which block is respo... |
120,181 | I can see blocks on pages, their classes and structure and guess where they are added and what their name is - what is the best way to do this?
Is this what path hints is made for? Is there any other way even if it requires familiarity? | 2016/06/09 | [
"https://magento.stackexchange.com/questions/120181",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/38988/"
] | Magento has a highlight mechanism in **System Configuration** to find the `template path` and also show you the `block name`
**To turn on template path hints in Magento:**
1- Log into the magento back-end admin
2- Go to System -> Configuration in the main menu
3- Go to Developer on the bottom left under ADVANCED
4... | As mentioned above you can enable template hints either through the admin, or it's usually faster to search the codebase. For example:
If the block/container you are trying to find has a unique class or ID then I usually find it quicker just to search for those. For example if I wanted to find out which block is respo... |
54,027,888 | When importing items into my Rails app I keep getting the above error being raised by SearchKick on behalf of Elasticsearch.
I'm running Elasticsearch in a Docker. I start my app by running docker-compose up. I've tried running the command recommended above but i just get "No such file or directory" returned. Any idea... | 2019/01/03 | [
"https://Stackoverflow.com/questions/54027888",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1125496/"
] | Indeed, running `curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'` as suggested by @[Nishant Saini](https://stackoverflow.com/users/1136371/nishant-saini) resolves the very similar issue I ran just into.
I hit disk watermarks limits ... | Use the following command in `linux`:
```
curl -s -H 'Content-Type: application/json' -XPUT 'http://localhost:9200/_all/_settings?pretty' -d ' {
"index":{
"blocks" : {"read_only_allow_delete":"false"}
}
}'
```
the same command in `Kibana's DEV TOOL` format :
```
PUT _all/_settings
{
"index... |
61,797,942 | I'm using Material UI grid and as soon as I put spacing higher than 0 ,my Grid doesnt fit the screen and bottom slider is visible and i can move the page horizontally a bit.
Simplified code i'm using :
```
<Grid container
justify="space-around"
spacing={4}>
<Grid item xs={6} >
<Paper>a</Paper>
</Grid>
... | 2020/05/14 | [
"https://Stackoverflow.com/questions/61797942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12914612/"
] | Here is the official answer to this question courtesy of the [docs](https://material-ui.com/components/grid/#limitations):
>
> Negative margin
>
>
> There is one limitation with the negative margin we use to implement the spacing between items. A horizontal scroll will appear if a negative margin goes beyond the . ... | ```
<Grid container justify="space-around" spacing={8}>
<Grid item xs >
<Paper>a</Paper>
</Grid>
<Grid item xs >
<Paper>b</Paper>
</Grid>
</Grid>
```
Assuming that you want to keep the columns of equal width you can keep them dynamic `<Grid item xs >` rather then assigning a fix width of `<Grid item x... |
61,797,942 | I'm using Material UI grid and as soon as I put spacing higher than 0 ,my Grid doesnt fit the screen and bottom slider is visible and i can move the page horizontally a bit.
Simplified code i'm using :
```
<Grid container
justify="space-around"
spacing={4}>
<Grid item xs={6} >
<Paper>a</Paper>
</Grid>
... | 2020/05/14 | [
"https://Stackoverflow.com/questions/61797942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12914612/"
] | ```
<Grid container justify="space-around" spacing={8}>
<Grid item xs >
<Paper>a</Paper>
</Grid>
<Grid item xs >
<Paper>b</Paper>
</Grid>
</Grid>
```
Assuming that you want to keep the columns of equal width you can keep them dynamic `<Grid item xs >` rather then assigning a fix width of `<Grid item x... | Reduce the spacing dimension. `spacing={4}` is providing `4*8=32px` of space around the Grid items. Consequently, horizontal scroll bar is appearing in your page, as the width of the two contained grids along with the space is more than the width of the sandbox browser window. I checked with `spacing={2}` which puts a ... |
61,797,942 | I'm using Material UI grid and as soon as I put spacing higher than 0 ,my Grid doesnt fit the screen and bottom slider is visible and i can move the page horizontally a bit.
Simplified code i'm using :
```
<Grid container
justify="space-around"
spacing={4}>
<Grid item xs={6} >
<Paper>a</Paper>
</Grid>
... | 2020/05/14 | [
"https://Stackoverflow.com/questions/61797942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12914612/"
] | Here is the official answer to this question courtesy of the [docs](https://material-ui.com/components/grid/#limitations):
>
> Negative margin
>
>
> There is one limitation with the negative margin we use to implement the spacing between items. A horizontal scroll will appear if a negative margin goes beyond the . ... | You can use {gap:15} as style
```
<Grid container style={{ gap: 15 }}>
<Grid item xs={12}>
//one element
</Grid>
<Grid item xs={12}>
//other element
</Grid>
</Grid>
```
or you can use `spacing`
```
<Grid container spacing={1}>
... |
61,797,942 | I'm using Material UI grid and as soon as I put spacing higher than 0 ,my Grid doesnt fit the screen and bottom slider is visible and i can move the page horizontally a bit.
Simplified code i'm using :
```
<Grid container
justify="space-around"
spacing={4}>
<Grid item xs={6} >
<Paper>a</Paper>
</Grid>
... | 2020/05/14 | [
"https://Stackoverflow.com/questions/61797942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12914612/"
] | Here is the official answer to this question courtesy of the [docs](https://material-ui.com/components/grid/#limitations):
>
> Negative margin
>
>
> There is one limitation with the negative margin we use to implement the spacing between items. A horizontal scroll will appear if a negative margin goes beyond the . ... | Reduce the spacing dimension. `spacing={4}` is providing `4*8=32px` of space around the Grid items. Consequently, horizontal scroll bar is appearing in your page, as the width of the two contained grids along with the space is more than the width of the sandbox browser window. I checked with `spacing={2}` which puts a ... |
61,797,942 | I'm using Material UI grid and as soon as I put spacing higher than 0 ,my Grid doesnt fit the screen and bottom slider is visible and i can move the page horizontally a bit.
Simplified code i'm using :
```
<Grid container
justify="space-around"
spacing={4}>
<Grid item xs={6} >
<Paper>a</Paper>
</Grid>
... | 2020/05/14 | [
"https://Stackoverflow.com/questions/61797942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12914612/"
] | You can use {gap:15} as style
```
<Grid container style={{ gap: 15 }}>
<Grid item xs={12}>
//one element
</Grid>
<Grid item xs={12}>
//other element
</Grid>
</Grid>
```
or you can use `spacing`
```
<Grid container spacing={1}>
... | Reduce the spacing dimension. `spacing={4}` is providing `4*8=32px` of space around the Grid items. Consequently, horizontal scroll bar is appearing in your page, as the width of the two contained grids along with the space is more than the width of the sandbox browser window. I checked with `spacing={2}` which puts a ... |
162,657 | Hay, i need to find a software solution to a problem. I want to be able to limit a Windows XP machine's bandwidth on all ports between 10AM - 11PM.
I have access to the machine in question, i need an application which can achieve this. I want to be able to limit to bandwidth to something like 10kb/s between these tim... | 2010/07/21 | [
"https://serverfault.com/questions/162657",
"https://serverfault.com",
"https://serverfault.com/users/23155/"
] | [NetLimiter](http://www.netlimiter.com/) can probably do the job. | I was curious myself if Windows has an "in-house" way of doing this. Apparently, [a part of SCCM, called Data Protection Manager](http://technet.microsoft.com/en-us/library/cc161325.aspx) **partly** offers what you are looking for, if I understand it correctly. That requires you have much more enterprise infrastructure... |
130,775 | This news about the Tesla stock came yesterday. The stock rose to 8% and then retreated. The following is the story.
My question is, what caused the stock to retreat other than a reason of a seller sold the stocks? Is it by a computer algorithm automatically adjusted before a few seconds before the real buying took pl... | 2020/09/11 | [
"https://money.stackexchange.com/questions/130775",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/92007/"
] | Fibonacci Retracement (and most technical indicators, IMHO) is an *effect*, not a *cause*. It may work on average (meaning it predicts resistance correctly more often than it doesn't), but I highly doubt that there are many traders that say "Tesla passed this retreatment/resistence level so I'd better sell now." More l... | If you draw a matrix of lines on the price chart of a security, there's a a high probability that price movement will move to the vicinity of one of these arbitrary levels. It could be Fibonacci numbers or for that matter, you could just as well draw price ratio horizontal lines based prime numbers above and below curr... |
52,535,994 | I'm setting up a new server (Ubuntu 18.04.1 LTS) with postfix v3.3.0.
I followed the standard deployment for postfix to send-only setup.
<http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client>
```
1 /etc/postfix/main.cf:
2 myhostname = hostname.example.com
3 myorigin = $mydomain
4 relayho... | 2018/09/27 | [
"https://Stackoverflow.com/questions/52535994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/936635/"
] | OK - After several digging on my environment, I found that there was monit ping every 2 minutes to check the status of postfix on port#25. Since it is send-only setup where SMTPD daemon is disabled to listen on port#25.
I know it looks very trivial now but just wanted to mention to this post so when someone comes acr... | this is a correct health-check by monit (see linux man-page monit). To change the ping rate manually, open the file monitrc (nano /etc/monit/monitrc) and change the line
`set daemon 120 # check services at 10-minute intervals`
to whatever ping-rate you want. |
69,925,974 | I am currently using a IBM MQ Advanced for Developers server for testing our client and was able to achieve around 1000 messages per second using the sample consumer written in jms, which seems to be pretty slow. Is this a limit for dev server, and if yes that what throughput can be achieved using a licensed production... | 2021/11/11 | [
"https://Stackoverflow.com/questions/69925974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6825571/"
] | There is no artificial limit associated with IBM MQ Advanced for Developers. It is the same as the licensed production version of IBM MQ.
You don't say what type of machine you were using, what persistence your messages were, what size they were, or any other qualifying criteria.
You say client, but I don't know whet... | As an ex MQ performance person I would say - it depends.
At one level you can ask - what can one application in isolation process.
For persistent messages this will come down to the rate at which you can write to the log files.
If you have 10 applications in parallel each putting and getting from their own queue, the... |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | ```
$('input:checkbox').change(function(){
if($(this).is(':checked')){
alert('Checked');
}
});
```
[**Here is a demo**](http://jsfiddle.net/Shef/E6RS9/) | If you want to use .on this works
```
jQuery('input[type=checkbox]').on('change', function() {
if (this.checked) {
console.log('checked');
}
});
``` |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | ```
$('input:checkbox').change(function(){
if($(this).is(':checked')){
alert('Checked');
}
});
```
[**Here is a demo**](http://jsfiddle.net/Shef/E6RS9/) | ```
$("input:checkbox").change(function(){
alert($(this).val());
});
```
here is the fiddle <http://jsfiddle.net/SXph5/>
[**`jquery change`**](http://api.jquery.com/change/) |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | Use the `change()` event, and the `is()` test:
```
$('input:checkbox').change(
function(){
if ($(this).is(':checked')) {
alert('checked');
}
});
```
I've updated the above, to the following, because of my silly reliance on jQuery (in the `if`) when the DOM properties would be equa... | ```
$("input:checkbox").change(function(){
alert($(this).val());
});
```
here is the fiddle <http://jsfiddle.net/SXph5/>
[**`jquery change`**](http://api.jquery.com/change/) |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | Use the `change()` event, and the `is()` test:
```
$('input:checkbox').change(
function(){
if ($(this).is(':checked')) {
alert('checked');
}
});
```
I've updated the above, to the following, because of my silly reliance on jQuery (in the `if`) when the DOM properties would be equa... | ```
$("input[type='checkbox']").click(function(){
alert("checked");
});
```
Just a normal `.click` will do. |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | ```
$('input:checkbox').live('change', function(){
if($(this).is(':checked')){
alert('checked');
} else {
alert('un-checked');
}
});
```
jsfiddle: <http://jsfiddle.net/7Zg3x/1/> | Try this
```
$('input:checkbox').change(function(){
if(this.checked)
alert('checked');
else
alert('not checked');
});
``` |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | Use the `change()` event, and the `is()` test:
```
$('input:checkbox').change(
function(){
if ($(this).is(':checked')) {
alert('checked');
}
});
```
I've updated the above, to the following, because of my silly reliance on jQuery (in the `if`) when the DOM properties would be equa... | If you want to use .on this works
```
jQuery('input[type=checkbox]').on('change', function() {
if (this.checked) {
console.log('checked');
}
});
``` |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | ```
$('input:checkbox').live('change', function(){
if($(this).is(':checked')){
alert('checked');
} else {
alert('un-checked');
}
});
```
jsfiddle: <http://jsfiddle.net/7Zg3x/1/> | ```
$("input:checkbox").change(function(){
alert($(this).val());
});
```
here is the fiddle <http://jsfiddle.net/SXph5/>
[**`jquery change`**](http://api.jquery.com/change/) |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | If you want to use .on this works
```
jQuery('input[type=checkbox]').on('change', function() {
if (this.checked) {
console.log('checked');
}
});
``` | ```
$("input[type='checkbox']").click(function(){
alert("checked");
});
```
Just a normal `.click` will do. |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | ```
$('input:checkbox').change(function(){
if($(this).is(':checked')){
alert('Checked');
}
});
```
[**Here is a demo**](http://jsfiddle.net/Shef/E6RS9/) | ```
$("input[type='checkbox']").click(function(){
alert("checked");
});
```
Just a normal `.click` will do. |
6,878,757 | I need to know when any checkbox on the page is checked:
e.g.
```
<input type="checkbox">
```
I tried this in Jquery
```
$('input type=["checkbox"]').change(function(){
alert('changed');
});
```
But it didn't work, any ideas? | 2011/07/29 | [
"https://Stackoverflow.com/questions/6878757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1443677/"
] | ```
$("input:checkbox").change(function(){
alert($(this).val());
});
```
here is the fiddle <http://jsfiddle.net/SXph5/>
[**`jquery change`**](http://api.jquery.com/change/) | ```
$("input[type='checkbox']").click(function(){
alert("checked");
});
```
Just a normal `.click` will do. |
33,922,657 | Hi I am using visual c++ I have a working program EXCEPT for one thing I want it be able to use separate screenshot program. I have separate screenshot program installed it program have a registered hotkey to take a screenshot, I want my program to do it.
I tried keybd\_event and SendInput with FindWindow and it works... | 2015/11/25 | [
"https://Stackoverflow.com/questions/33922657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4142790/"
] | Maybe keyboard hook will solve the problem?
* [example 1](http://www.codeguru.com/cpp/w-p/system/keyboard/article.php/c5699/Hooking-the-Keyboard.htm)
* [example 2](https://code.msdn.microsoft.com/windowsapps/CppWindowsHook-06957865)
* [example 3](http://www.codeproject.com/Articles/1264/KeyBoard-Hooks)
Not perfect bu... | [](https://i.stack.imgur.com/WFjCr.jpg)
Here is a source code for a global hotkey . It has been set to listen for a `CTRL` + `y` key combination. Once `CTRL` + `y` is triggered it grabs a screenshot.
To close the global hotkey, simply press `CTRL` +... |
578 | **Background:**
My community is a web forum and two game servers. There are about 500 members that are active in the community. Last year one of my moderators found an external site that is solely used to criticize my community. Almost all of it is someone blowing off steam, but there are a few legitimate complaints th... | 2014/08/22 | [
"https://moderators.stackexchange.com/questions/578",
"https://moderators.stackexchange.com",
"https://moderators.stackexchange.com/users/344/"
] | It's probably the best policy to keep on doing what you are currently doing. That is improving the site and it's moderation without acknowledging the source of these improvements is the trolls. Why - one thing the trolls want is attention and even by acknowledging that something happened because of trolling feeds that ... | You're already saying that you're taking actions based on what legitimate criticism you find on the hate site, but without acknowledging the source. Given this, the only question is whether you'll use the specific moderators targeted by the site in order to leverage the hate site into advertisement for your own site - ... |
578 | **Background:**
My community is a web forum and two game servers. There are about 500 members that are active in the community. Last year one of my moderators found an external site that is solely used to criticize my community. Almost all of it is someone blowing off steam, but there are a few legitimate complaints th... | 2014/08/22 | [
"https://moderators.stackexchange.com/questions/578",
"https://moderators.stackexchange.com",
"https://moderators.stackexchange.com/users/344/"
] | It appears that you have encountered a helpful troll. Channel this and use it to your advantage. These types of trolls are rare.

>
> This site brings in traffic to both the forums and the game servers. [...] 10% stick around as guests and the remainder join the c... | You're already saying that you're taking actions based on what legitimate criticism you find on the hate site, but without acknowledging the source. Given this, the only question is whether you'll use the specific moderators targeted by the site in order to leverage the hate site into advertisement for your own site - ... |
578 | **Background:**
My community is a web forum and two game servers. There are about 500 members that are active in the community. Last year one of my moderators found an external site that is solely used to criticize my community. Almost all of it is someone blowing off steam, but there are a few legitimate complaints th... | 2014/08/22 | [
"https://moderators.stackexchange.com/questions/578",
"https://moderators.stackexchange.com",
"https://moderators.stackexchange.com/users/344/"
] | I'd challenge you never want to feed trolls, but it doesn't sound like these guys are really trolls. Disagreements always happen in communities, it is a natural and healthy part of them. It becomes a problem when one side starts to be too hard on the other. If the moderators are too strict and don't listen to the valid... | You're already saying that you're taking actions based on what legitimate criticism you find on the hate site, but without acknowledging the source. Given this, the only question is whether you'll use the specific moderators targeted by the site in order to leverage the hate site into advertisement for your own site - ... |
578 | **Background:**
My community is a web forum and two game servers. There are about 500 members that are active in the community. Last year one of my moderators found an external site that is solely used to criticize my community. Almost all of it is someone blowing off steam, but there are a few legitimate complaints th... | 2014/08/22 | [
"https://moderators.stackexchange.com/questions/578",
"https://moderators.stackexchange.com",
"https://moderators.stackexchange.com/users/344/"
] | It appears that you have encountered a helpful troll. Channel this and use it to your advantage. These types of trolls are rare.

>
> This site brings in traffic to both the forums and the game servers. [...] 10% stick around as guests and the remainder join the c... | It's probably the best policy to keep on doing what you are currently doing. That is improving the site and it's moderation without acknowledging the source of these improvements is the trolls. Why - one thing the trolls want is attention and even by acknowledging that something happened because of trolling feeds that ... |
578 | **Background:**
My community is a web forum and two game servers. There are about 500 members that are active in the community. Last year one of my moderators found an external site that is solely used to criticize my community. Almost all of it is someone blowing off steam, but there are a few legitimate complaints th... | 2014/08/22 | [
"https://moderators.stackexchange.com/questions/578",
"https://moderators.stackexchange.com",
"https://moderators.stackexchange.com/users/344/"
] | It appears that you have encountered a helpful troll. Channel this and use it to your advantage. These types of trolls are rare.

>
> This site brings in traffic to both the forums and the game servers. [...] 10% stick around as guests and the remainder join the c... | I'd challenge you never want to feed trolls, but it doesn't sound like these guys are really trolls. Disagreements always happen in communities, it is a natural and healthy part of them. It becomes a problem when one side starts to be too hard on the other. If the moderators are too strict and don't listen to the valid... |
10,366,885 | I am looking for a way to extract information out of a chromatogram out of a GC or HPLC. A chromatogram looks like this:

I am not really into image processing/analysis so I'm looking for a tool/algorithim to extract the length (and the surface under a peak if possi... | 2012/04/28 | [
"https://Stackoverflow.com/questions/10366885",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/312700/"
] | I've written some quick python code that will extract chromatogram (or any single-valued) data from an image file.
It has the following requirements:
* Image is clean (no text or other data).
* Curve is single valued, ie. curve pixel width of one (it will still work without this, but it will always take the upper val... | When i use this code I get the following image

The code is the same as above (with slight modifications)
```
from PIL import Image
import numpy as np
def get_data(im, x_range, x_offset, y_range, y_offset):
x_data = np.array([])
y_data = np.array([])
... |
1,994,711 | I'd like to ask if this equality is true: $$\lim\_{N\to \infty} \sum\_{n=N}^{\infty}|a\_n| = lim\_{n\to \infty} |a\_n|$$
It seems to me to be correct, but I do not know how to prove it.
**Edit**: I see that it is not true in every case, but it must be true if the series converges, why is it so? | 2016/11/01 | [
"https://math.stackexchange.com/questions/1994711",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/382649/"
] | This is not true, a counter example is
$$
a\_n=\frac1n,\qquad \lim\_{n\to \infty}|a\_n|=0, \qquad \lim\_{N\to \infty} \sum\_{n=N}^{\infty}|a\_n|=\lim\_{N\to \infty} \sum\_{n=N}^{\infty}\frac1n=\infty.
$$ | It is true if either
a) $\displaystyle \sum\_{k=1}^\infty |a\_n|$ converges, by virtue of the fact that both quantities are zero, or
b) $|a\_n| \to \infty$. |
600,720 | Here's the story.
There's a local sharepoint server called brksharepoint at ip address 10.2.1.40.
I had set up my computer to use google's dns because I found it to be more reliable than my local isp.
Using an app that had recently been set up I was getting 401 errors, I couldn't figure out why as I was logged into ... | 2013/05/28 | [
"https://superuser.com/questions/600720",
"https://superuser.com",
"https://superuser.com/users/93014/"
] | Can you run a local DNS server, on your router perhaps? This way you could run a lightweight client like dnsmasq to resolve local names before requesting it from Google.
What I suspect is happening is your computer tries to resolve `brksharepoint` with Google but this of course isn't a real name, so it returns an inco... | You're using a public DNS server while trying to access a local address on your LAN. Set up a local DNS server that looks to 8.8.8.8 in the event it cannot resolve something. Or in your network settings, enter the local address as DNS1 and 8.8.8 as the alternate. |
600,720 | Here's the story.
There's a local sharepoint server called brksharepoint at ip address 10.2.1.40.
I had set up my computer to use google's dns because I found it to be more reliable than my local isp.
Using an app that had recently been set up I was getting 401 errors, I couldn't figure out why as I was logged into ... | 2013/05/28 | [
"https://superuser.com/questions/600720",
"https://superuser.com",
"https://superuser.com/users/93014/"
] | Can you run a local DNS server, on your router perhaps? This way you could run a lightweight client like dnsmasq to resolve local names before requesting it from Google.
What I suspect is happening is your computer tries to resolve `brksharepoint` with Google but this of course isn't a real name, so it returns an inco... | **There's multiple points where Naming takes place.**
Home routers automatically updates its own local DNS tables upon registration of DHCP hosts. Since you're not using your dhcp server and only using google, you cannot resolve these names. Your machine can and will also check NetBios. NetBIOS in Windows will communi... |
600,720 | Here's the story.
There's a local sharepoint server called brksharepoint at ip address 10.2.1.40.
I had set up my computer to use google's dns because I found it to be more reliable than my local isp.
Using an app that had recently been set up I was getting 401 errors, I couldn't figure out why as I was logged into ... | 2013/05/28 | [
"https://superuser.com/questions/600720",
"https://superuser.com",
"https://superuser.com/users/93014/"
] | **There's multiple points where Naming takes place.**
Home routers automatically updates its own local DNS tables upon registration of DHCP hosts. Since you're not using your dhcp server and only using google, you cannot resolve these names. Your machine can and will also check NetBios. NetBIOS in Windows will communi... | You're using a public DNS server while trying to access a local address on your LAN. Set up a local DNS server that looks to 8.8.8.8 in the event it cannot resolve something. Or in your network settings, enter the local address as DNS1 and 8.8.8 as the alternate. |
404,076 | In this github, <https://github.com/johnph/simple-transaction>, under the `Transaction.Framework` project, there are entities (located at Data/Entities)
* AccountSummaryEntity.cs
* AccountTransactionEntity
and in the domain folder, there are domain model:
* AccountSummary.cs
* AccountTransaction.cs
* TransactionResu... | 2020/01/21 | [
"https://softwareengineering.stackexchange.com/questions/404076",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/338001/"
] | It is *unfortunately* a popular form of DDD. I say unfortunately because it completely ignores the core principles of DDD, that is the actual modeling of the problem.
Having pure data structures does nothing to tell the reader what is happening, what problems are being solved, it does *not* use the Ubiquitous Language... | I see this as strict separation between the domain model and the persistence model. By duplicating this model, it becomes possible to fine-tune models for their specific purpose. One represents business rules, other is easy to persist and query. If it was just single model, it would be necessary to make tradeoff-s betw... |
404,076 | In this github, <https://github.com/johnph/simple-transaction>, under the `Transaction.Framework` project, there are entities (located at Data/Entities)
* AccountSummaryEntity.cs
* AccountTransactionEntity
and in the domain folder, there are domain model:
* AccountSummary.cs
* AccountTransaction.cs
* TransactionResu... | 2020/01/21 | [
"https://softwareengineering.stackexchange.com/questions/404076",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/338001/"
] | I see this as strict separation between the domain model and the persistence model. By duplicating this model, it becomes possible to fine-tune models for their specific purpose. One represents business rules, other is easy to persist and query. If it was just single model, it would be necessary to make tradeoff-s betw... | Aggregates ARE domain entities - domain entities that contain other entities, thereby modelling one or more conceptual relationships. |
404,076 | In this github, <https://github.com/johnph/simple-transaction>, under the `Transaction.Framework` project, there are entities (located at Data/Entities)
* AccountSummaryEntity.cs
* AccountTransactionEntity
and in the domain folder, there are domain model:
* AccountSummary.cs
* AccountTransaction.cs
* TransactionResu... | 2020/01/21 | [
"https://softwareengineering.stackexchange.com/questions/404076",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/338001/"
] | It is *unfortunately* a popular form of DDD. I say unfortunately because it completely ignores the core principles of DDD, that is the actual modeling of the problem.
Having pure data structures does nothing to tell the reader what is happening, what problems are being solved, it does *not* use the Ubiquitous Language... | Aggregates ARE domain entities - domain entities that contain other entities, thereby modelling one or more conceptual relationships. |
260,021 | I use a PuTTY session to copy my nightly backups to another location. I log in as the `root` user and change directories to `/store/BackupLocation` which holds backups from the last 100 days. I can then run:
`bash /bin/ScriptThatCopiesBackup.sh`
This script copies my backups from `/store/BackupLocation` to another di... | 2016/02/05 | [
"https://unix.stackexchange.com/questions/260021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/155069/"
] | The problem is that your script is not set to be executable. `chmod u+x /bin/ScriptThatCopiesBackup.sh` will make the script runnable by its owner (in this case, `root`). | Your problem could be that you are editing the wrong `crontab` file. (Even though you said you are doing everything from `root`). Try editing the `crontab` file with `crontab -u root`.
It is also possible that your script is not executable. `chmod +x /path/to/yourscript.sh`should make it executable. |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | I've always assumed that `do_something_that_returns_an_array()` only runs once because, unlike in the for loop, there's no reason for it to run multiple times. The reason the for loop truth checker runs at the end of every iteration is to allow for very complicated checkers.
As a test, I did the following:
```
functi... | foreach() works with Iterator or IteratorAggregate objects (e.g., arrays and objects implementing the interface). It can't work with **immutable** objects. Functions return **immutable** objects, so the returning array have to be copied into Iterator object before foreaching (it's made by php itself) |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | `foreach` makes a copy of the input array and works on that in each iteration. So you can use `foreach (do_something_that_returns_an_array() as $key => $val)` and it'll call `do_something_that_returns_an_array()` only once. | foreach() works with Iterator or IteratorAggregate objects (e.g., arrays and objects implementing the interface). It can't work with **immutable** objects. Functions return **immutable** objects, so the returning array have to be copied into Iterator object before foreaching (it's made by php itself) |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | `foreach()` is [implemented using iterators](http://php.net/manual/en/language.oop5.iterations.php) - thus it only calls the function that returns an array once, and then uses the iterator which points to the existing result set to continue with each item. | foreach() works with Iterator or IteratorAggregate objects (e.g., arrays and objects implementing the interface). It can't work with **immutable** objects. Functions return **immutable** objects, so the returning array have to be copied into Iterator object before foreaching (it's made by php itself) |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | I would set up an example to see what happens. Something like...
```
function do_something_that_returns_an_array() {
echo 'I have been called!';
return array('i am an', 'array');
}
```
[As you can see on CodePad, it is only being called once](http://codepad.org/3nHcgaCm). | foreach() works with Iterator or IteratorAggregate objects (e.g., arrays and objects implementing the interface). It can't work with **immutable** objects. Functions return **immutable** objects, so the returning array have to be copied into Iterator object before foreaching (it's made by php itself) |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | I think testing it will surely answer that.
Here is my code:
```
function GetArray() {
echo "I am called.\n";
return array("One"=>1, "Two"=>2, "Three"=>3, "Four"=>4, "Five"=>5);
}
echo "Case #1\n";
$array = GetArray();
foreach ($array as $key => $val){
// Do stuff while traversing array
echo " In... | I would set up an example to see what happens. Something like...
```
function do_something_that_returns_an_array() {
echo 'I have been called!';
return array('i am an', 'array');
}
```
[As you can see on CodePad, it is only being called once](http://codepad.org/3nHcgaCm). |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | `foreach()` is [implemented using iterators](http://php.net/manual/en/language.oop5.iterations.php) - thus it only calls the function that returns an array once, and then uses the iterator which points to the existing result set to continue with each item. | I would set up an example to see what happens. Something like...
```
function do_something_that_returns_an_array() {
echo 'I have been called!';
return array('i am an', 'array');
}
```
[As you can see on CodePad, it is only being called once](http://codepad.org/3nHcgaCm). |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | `foreach` makes a copy of the input array and works on that in each iteration. So you can use `foreach (do_something_that_returns_an_array() as $key => $val)` and it'll call `do_something_that_returns_an_array()` only once. | I would set up an example to see what happens. Something like...
```
function do_something_that_returns_an_array() {
echo 'I have been called!';
return array('i am an', 'array');
}
```
[As you can see on CodePad, it is only being called once](http://codepad.org/3nHcgaCm). |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | I think testing it will surely answer that.
Here is my code:
```
function GetArray() {
echo "I am called.\n";
return array("One"=>1, "Two"=>2, "Three"=>3, "Four"=>4, "Five"=>5);
}
echo "Case #1\n";
$array = GetArray();
foreach ($array as $key => $val){
// Do stuff while traversing array
echo " In... | foreach() works with Iterator or IteratorAggregate objects (e.g., arrays and objects implementing the interface). It can't work with **immutable** objects. Functions return **immutable** objects, so the returning array have to be copied into Iterator object before foreaching (it's made by php itself) |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | `foreach` makes a copy of the input array and works on that in each iteration. So you can use `foreach (do_something_that_returns_an_array() as $key => $val)` and it'll call `do_something_that_returns_an_array()` only once. | I've always assumed that `do_something_that_returns_an_array()` only runs once because, unlike in the for loop, there's no reason for it to run multiple times. The reason the for loop truth checker runs at the end of every iteration is to allow for very complicated checkers.
As a test, I did the following:
```
functi... |
1,685,689 | We have all heard of how in a `for` loop, we should do this:
```
for ($i = 0, $count = count($array); $i < $c; ++$i)
{
// Do stuff while traversing array
}
```
instead of this:
```
for ($i = 0; $i < count($array); ++$i)
{
// Do stuff while traversing array
}
```
for performance reasons (i.e. initializing ... | 2009/11/06 | [
"https://Stackoverflow.com/questions/1685689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/106224/"
] | `foreach()` is [implemented using iterators](http://php.net/manual/en/language.oop5.iterations.php) - thus it only calls the function that returns an array once, and then uses the iterator which points to the existing result set to continue with each item. | I think testing it will surely answer that.
Here is my code:
```
function GetArray() {
echo "I am called.\n";
return array("One"=>1, "Two"=>2, "Three"=>3, "Four"=>4, "Five"=>5);
}
echo "Case #1\n";
$array = GetArray();
foreach ($array as $key => $val){
// Do stuff while traversing array
echo " In... |
23,373,927 | I stack with the following problem, I need to finding maximum between equal positions between lists. Map function works pretty well, but how to make it work for the list of the lists? using map(max,d) gave the max of the every list. The problem is that the number of the lists in the list is variable. Any suggestions ar... | 2014/04/29 | [
"https://Stackoverflow.com/questions/23373927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1417445/"
] | ```
a = [0,1,2,6]
b = [5,1,0,7]
c = [3,8,0,8]
print [max(itm) for itm in zip(a, b, c)]
```
or even shorter:
```
print map(max, zip(a, b, c))
``` | How about this:
`max(map(max,d))` |
6,762,529 | I have a huge mess of a nested list that looks something like this, just longer:
```
fruit_mess = [['watermelon,0,1.0\n'], ['apple,0,1.0\n'], ['"pineapple",0,1.0\n'], ['"strawberry, banana",0,1.0\n'], ['peach plum pear,0,1.0\n'], ['"orange, grape",0,1.0\n']]
```
Ultimately I want something that looks like this:
```... | 2011/07/20 | [
"https://Stackoverflow.com/questions/6762529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/808545/"
] | Use the `csv` module (in the standard library) to handle the double-quoted fruits with commas in their names:
```
import csv
import io
fruit_mess = [['watermelon,0,1.0\n'], ['apple,0,1.0\n'], ['"pineapple",0,1.0\n'], ['"strawberry, banana",0,1.0\n'], ['peach plum pear,0,1.0\n'], ['"orange, grape",0,1.0\n']]
# flatte... | A regex-based solution:
```
>>> import re
>>> regex = re.compile(r'("[^"]*"|[^,]*),(\d+),([\d.]+)')
>>> neat_fruit = []
>>> for item in fruit_mess:
... match = regex.match(item[0])
... result = [match.group(1).strip('"'), int(match.group(2)), float(match.group(3))]
... neat_fruit.append(result)
...
>>> nea... |
6,762,529 | I have a huge mess of a nested list that looks something like this, just longer:
```
fruit_mess = [['watermelon,0,1.0\n'], ['apple,0,1.0\n'], ['"pineapple",0,1.0\n'], ['"strawberry, banana",0,1.0\n'], ['peach plum pear,0,1.0\n'], ['"orange, grape",0,1.0\n']]
```
Ultimately I want something that looks like this:
```... | 2011/07/20 | [
"https://Stackoverflow.com/questions/6762529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/808545/"
] | Use the `csv` module (in the standard library) to handle the double-quoted fruits with commas in their names:
```
import csv
import io
fruit_mess = [['watermelon,0,1.0\n'], ['apple,0,1.0\n'], ['"pineapple",0,1.0\n'], ['"strawberry, banana",0,1.0\n'], ['peach plum pear,0,1.0\n'], ['"orange, grape",0,1.0\n']]
# flatte... | One more simple solution:
```
fruit_mess = [['watermelon,0,1.0\n'], ['apple,0,1.0\n'], ['"pineapple",0,1.0\n'], ['"strawberry, banana",0,1.0\n'], ['peach plum pear,0,1.0\n'], ['"orange, grape",0,1.0\n']]
for i,x in enumerate(fruit_mess):
data = x[0].rstrip('\n').rsplit(',', 2)
fruit_mess[i] = [data[0], int(dat... |
6,762,529 | I have a huge mess of a nested list that looks something like this, just longer:
```
fruit_mess = [['watermelon,0,1.0\n'], ['apple,0,1.0\n'], ['"pineapple",0,1.0\n'], ['"strawberry, banana",0,1.0\n'], ['peach plum pear,0,1.0\n'], ['"orange, grape",0,1.0\n']]
```
Ultimately I want something that looks like this:
```... | 2011/07/20 | [
"https://Stackoverflow.com/questions/6762529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/808545/"
] | One more simple solution:
```
fruit_mess = [['watermelon,0,1.0\n'], ['apple,0,1.0\n'], ['"pineapple",0,1.0\n'], ['"strawberry, banana",0,1.0\n'], ['peach plum pear,0,1.0\n'], ['"orange, grape",0,1.0\n']]
for i,x in enumerate(fruit_mess):
data = x[0].rstrip('\n').rsplit(',', 2)
fruit_mess[i] = [data[0], int(dat... | A regex-based solution:
```
>>> import re
>>> regex = re.compile(r'("[^"]*"|[^,]*),(\d+),([\d.]+)')
>>> neat_fruit = []
>>> for item in fruit_mess:
... match = regex.match(item[0])
... result = [match.group(1).strip('"'), int(match.group(2)), float(match.group(3))]
... neat_fruit.append(result)
...
>>> nea... |
57,386,586 | I have a dropdown menu which has a controlled state. If the user changed the dropdown value and if the input is not empty, fire a function passed from other component.
```
export default ({ triggerChange, inputVal }) => {
const [dropdown, setDropdown] = useState(1);
useEffect(() => {
if (inputVal) {
tri... | 2019/08/07 | [
"https://Stackoverflow.com/questions/57386586",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11298270/"
] | Add those to the dependency:
```
useEffect(() => {
if (inputVal) {
triggerChange(dropdown);
}
}, [dropdown, inputVal]);
```
This will only re-run the effect if either `dropdown` or `inputVal` values change.
**For `triggerChange`:**
if `dropdown` changes frequently, use `useCallback` hook.
```
// Parent.js... | ```
useEffect(() => {
if (inputVal) {
triggerChange(dropdown);
}
}, [dropdown]); // this line throw a warning
```
In this piece of code, if you notice, `inputVal`, `triggerChange` and `dropdown` are variables and they are dependencies to useEffect hook because useEffect gets triggered whenever any cha... |
73,733,046 | I am currently using the method "table" which is inside a class-component to render several table items (table rows).
The function uses the component "Row" for the table row.
It seems a bit verbose and I wonder if there is the chance to pass properties to the child in a more compact way ?
```
//table is a method ins... | 2022/09/15 | [
"https://Stackoverflow.com/questions/73733046",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19024399/"
] | Vue Quill is expecting you to define [your custom toolbar](https://vueup.github.io/vue-quill/guide/toolbar.html#custom-toolbar-container). That error happens when you define a custom toolbar selector '#toolbar' but don't actually put the toolbar anywhere (it is looking for an element with an id of "toolbar"). | The main reason to this could be due to the fact that when ssr is used, Nuxt tried to render in server-side but it does not exist.
Moreover, I am not really sure if quill will support Vite at the moment so I suggest using packages like vue3-quill-editor-vite. |
26,335,936 | I have a menu: <http://jsfiddle.net/hu5x3hL1/3/>
**HTML**
```
<ul id="menu" class="sidebar">
<li> <a href="#" class="clickme">Menu</a>
<ul id="menu1">
<li><a class="dropdown-class-name" href="#">Dropdown link1</a></li>
<li><a class="dropdown-class-name" href="#">Dropdown link2</a></li>
</ul>
<... | 2014/10/13 | [
"https://Stackoverflow.com/questions/26335936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3820773/"
] | You will have to do the check in the dom ready handler, not in the click handler
```
$('#menu1 li a').click(function (e) {
$('a').removeClass('dropdown-class-name active');
$(this).addClass('dropdown-class-name active');
});
var url = window.location.pathname;//need to make sure that this is the href value
$(... | Try this
```
$('#menu1 li a').click(function(e) {
if($('a').hasClass('dropdown-class-name active')=="false"){$('a').removeClass('dropdown-class-name active');}
$(this).addClass('dropdown-class-name active');
});
```
<http://jsfiddle.net/hu5x3hL1/4/> |
26,335,936 | I have a menu: <http://jsfiddle.net/hu5x3hL1/3/>
**HTML**
```
<ul id="menu" class="sidebar">
<li> <a href="#" class="clickme">Menu</a>
<ul id="menu1">
<li><a class="dropdown-class-name" href="#">Dropdown link1</a></li>
<li><a class="dropdown-class-name" href="#">Dropdown link2</a></li>
</ul>
<... | 2014/10/13 | [
"https://Stackoverflow.com/questions/26335936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3820773/"
] | You will have to do the check in the dom ready handler, not in the click handler
```
$('#menu1 li a').click(function (e) {
$('a').removeClass('dropdown-class-name active');
$(this).addClass('dropdown-class-name active');
});
var url = window.location.pathname;//need to make sure that this is the href value
$(... | did you tried to put the anchor reference in the selector?
```
var localURL = '[href="'+window.location.href+'"]'
$('#menu1 li a'+localURL).click(function(e) {
$('a').removeClass('dropdown-class-name active');
$(this).addClass('dropdown-class-name active');
});
```
<http://jsfiddle.net/hnxhcbgw/1/>
keep in... |
26,335,936 | I have a menu: <http://jsfiddle.net/hu5x3hL1/3/>
**HTML**
```
<ul id="menu" class="sidebar">
<li> <a href="#" class="clickme">Menu</a>
<ul id="menu1">
<li><a class="dropdown-class-name" href="#">Dropdown link1</a></li>
<li><a class="dropdown-class-name" href="#">Dropdown link2</a></li>
</ul>
<... | 2014/10/13 | [
"https://Stackoverflow.com/questions/26335936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3820773/"
] | You will have to do the check in the dom ready handler, not in the click handler
```
$('#menu1 li a').click(function (e) {
$('a').removeClass('dropdown-class-name active');
$(this).addClass('dropdown-class-name active');
});
var url = window.location.pathname;//need to make sure that this is the href value
$(... | the below code should work
```
$("#menu1 li a").click(function() {
var $Link = $(this); // cache it as we will use ot mote than once
//also url == a.href cannot return true if you use relative url in the link.
//url most likely http://domain.com/pagename href will be just a page name
//if active do not... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | This modification of [a\_horse\_with\_no\_name's answer](https://stackoverflow.com/a/43363536/1394393) will give you the last (or current, if it's still actively running) query of the blocking session in addition to just the blocked sessions:
```
SELECT
activity.pid,
activity.usename,
activity.query,
b... | **How to show all blocked queries.**
```
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0;
```
**You can kill a blocked query by using the below command.**
```
SELECT pg_cancel_backend(a.pid), ... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | From this [excellent article on query locks in Postgres](http://big-elephants.com/2013-09/exploring-query-locks-in-postgres/), one can get blocked query and blocker query and their information from the following query.
```
CREATE VIEW lock_monitor AS(
SELECT
COALESCE(blockingl.relation::regclass::text,blockingl.loc... | This modification of [a\_horse\_with\_no\_name's answer](https://stackoverflow.com/a/43363536/1394393) will give you the last (or current, if it's still actively running) query of the blocking session in addition to just the blocked sessions:
```
SELECT
activity.pid,
activity.usename,
activity.query,
b... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | Since 9.6 this is a lot easier as it introduced the function `pg_blocking_pids()` to find the sessions that are blocking another session.
So you can use something like this:
```
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardina... | This modification of [a\_horse\_with\_no\_name's answer](https://stackoverflow.com/a/43363536/1394393) will give you the last (or current, if it's still actively running) query of the blocking session in addition to just the blocked sessions:
```
SELECT
activity.pid,
activity.usename,
activity.query,
b... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | Postgres has a very rich system catalog exposed via SQL tables.
PG's statistics collector is a subsystem that supports collection and reporting of information about server activity.
Now to figure out the blocking PIDs you can simply query `pg_stat_activity`.
```
select pg_blocking_pids(pid) as blocked_by
from pg_stat... | for postgresql versions earlier than postgresql 9.6 which does not have `pg_blocking_pids` function,you can use following query to find blocked query and blocking query.
```sql
SELECT w.query AS waiting_query,
w.pid AS waiting_pid,
w.usename ... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | From this [excellent article on query locks in Postgres](http://big-elephants.com/2013-09/exploring-query-locks-in-postgres/), one can get blocked query and blocker query and their information from the following query.
```
CREATE VIEW lock_monitor AS(
SELECT
COALESCE(blockingl.relation::regclass::text,blockingl.loc... | Postgres has a very rich system catalog exposed via SQL tables.
PG's statistics collector is a subsystem that supports collection and reporting of information about server activity.
Now to figure out the blocking PIDs you can simply query `pg_stat_activity`.
```
select pg_blocking_pids(pid) as blocked_by
from pg_stat... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | **How to show all blocked queries.**
```
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0;
```
**You can kill a blocked query by using the below command.**
```
SELECT pg_cancel_backend(a.pid), ... | One thing I find that is often missing from these is an ability to look up row locks. At least on the larger databases I have worked on, row locks are not shown in pg\_locks (if they were, pg\_locks would be much, much larger and there isn't a real data type to show the locked row in that view properly).
I don't know ... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | From this [excellent article on query locks in Postgres](http://big-elephants.com/2013-09/exploring-query-locks-in-postgres/), one can get blocked query and blocker query and their information from the following query.
```
CREATE VIEW lock_monitor AS(
SELECT
COALESCE(blockingl.relation::regclass::text,blockingl.loc... | **How to show all blocked queries.**
```
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0;
```
**You can kill a blocked query by using the below command.**
```
SELECT pg_cancel_backend(a.pid), ... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | Since 9.6 this is a lot easier as it introduced the function `pg_blocking_pids()` to find the sessions that are blocking another session.
So you can use something like this:
```
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardina... | From this [excellent article on query locks in Postgres](http://big-elephants.com/2013-09/exploring-query-locks-in-postgres/), one can get blocked query and blocker query and their information from the following query.
```
CREATE VIEW lock_monitor AS(
SELECT
COALESCE(blockingl.relation::regclass::text,blockingl.loc... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | Since 9.6 this is a lot easier as it introduced the function `pg_blocking_pids()` to find the sessions that are blocking another session.
So you can use something like this:
```
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardina... | Postgres has a very rich system catalog exposed via SQL tables.
PG's statistics collector is a subsystem that supports collection and reporting of information about server activity.
Now to figure out the blocking PIDs you can simply query `pg_stat_activity`.
```
select pg_blocking_pids(pid) as blocked_by
from pg_stat... |
26,489,244 | I want to track mutual locks in postgres constantly.
I came across [Locks Monitoring](https://wiki.postgresql.org/wiki/Lock_Monitoring) article and tried to run the following query:
```
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
kl.pid AS blocking_pid,
ka.usename AS blocking_user... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26489244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/100516/"
] | Since 9.6 this is a lot easier as it introduced the function `pg_blocking_pids()` to find the sessions that are blocking another session.
So you can use something like this:
```
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
where cardina... | One thing I find that is often missing from these is an ability to look up row locks. At least on the larger databases I have worked on, row locks are not shown in pg\_locks (if they were, pg\_locks would be much, much larger and there isn't a real data type to show the locked row in that view properly).
I don't know ... |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | Hi Below is the steps to create application by using eclipse:
Step 1 : Download the JBOSS tool from the following URL
<http://download.jboss.org/jbosstools/updates/development/juno/>
Step 2 : Sign up for an OpenShift Account
If you don’t already have an OpenShift account, head on over to the openshift website and clic... | You could import it from DockerHub. You can install an app from DockerHub using:
`oc new-app docker.io/<repo>/<app-name>` |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | [Have a look in this video](http://www.youtube.com/watch?v=4Htd9vAxJAc),it shows you how to configure a openshift project (a new or a existing one) and then generate a ssh key for your app,you can manually copy/paste the ssh key to the openshift website,or the eclipse plug in will do it.. | You could import it from DockerHub. You can install an app from DockerHub using:
`oc new-app docker.io/<repo>/<app-name>` |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | I think the best way to use OpenShift is through the rhc command line in combination with git. Once you're setup you can easily git push to OpenShift and control your application's deployment with action hooks. Check out an OpenShift example with a Python Django app: <https://github.com/openshift/django-example>
and th... | You could import it from DockerHub. You can install an app from DockerHub using:
`oc new-app docker.io/<repo>/<app-name>` |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | Hi Below is the steps to create application by using eclipse:
Step 1 : Download the JBOSS tool from the following URL
<http://download.jboss.org/jbosstools/updates/development/juno/>
Step 2 : Sign up for an OpenShift Account
If you don’t already have an OpenShift account, head on over to the openshift website and clic... | The Openshift Eclipse plugin takes care of the process of creating an Openshift Gear, deploying your application and adding any cartridge you may want to use.
So, basically you just need to have your Openshift Online credentials handy. |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | If your app is a Java EE web app, try this:
* <http://jaitechwriteups.blogspot.com.br/2011/08/deploy-java-ee-application-on-openshift.html>
* <https://openshift.redhat.com/community/forums/express/how-can-i-deploy-a-war> | Hi Below is the steps to create application by using eclipse:
Step 1 : Download the JBOSS tool from the following URL
<http://download.jboss.org/jbosstools/updates/development/juno/>
Step 2 : Sign up for an OpenShift Account
If you don’t already have an OpenShift account, head on over to the openshift website and clic... |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | I think the best way to use OpenShift is through the rhc command line in combination with git. Once you're setup you can easily git push to OpenShift and control your application's deployment with action hooks. Check out an OpenShift example with a Python Django app: <https://github.com/openshift/django-example>
and th... | Hi Below is the steps to create application by using eclipse:
Step 1 : Download the JBOSS tool from the following URL
<http://download.jboss.org/jbosstools/updates/development/juno/>
Step 2 : Sign up for an OpenShift Account
If you don’t already have an OpenShift account, head on over to the openshift website and clic... |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | I think the best way to use OpenShift is through the rhc command line in combination with git. Once you're setup you can easily git push to OpenShift and control your application's deployment with action hooks. Check out an OpenShift example with a Python Django app: <https://github.com/openshift/django-example>
and th... | [Have a look in this video](http://www.youtube.com/watch?v=4Htd9vAxJAc),it shows you how to configure a openshift project (a new or a existing one) and then generate a ssh key for your app,you can manually copy/paste the ssh key to the openshift website,or the eclipse plug in will do it.. |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | I think the best way to use OpenShift is through the rhc command line in combination with git. Once you're setup you can easily git push to OpenShift and control your application's deployment with action hooks. Check out an OpenShift example with a Python Django app: <https://github.com/openshift/django-example>
and th... | The Openshift Eclipse plugin takes care of the process of creating an Openshift Gear, deploying your application and adding any cartridge you may want to use.
So, basically you just need to have your Openshift Online credentials handy. |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | If your app is a Java EE web app, try this:
* <http://jaitechwriteups.blogspot.com.br/2011/08/deploy-java-ee-application-on-openshift.html>
* <https://openshift.redhat.com/community/forums/express/how-can-i-deploy-a-war> | The Openshift Eclipse plugin takes care of the process of creating an Openshift Gear, deploying your application and adding any cartridge you may want to use.
So, basically you just need to have your Openshift Online credentials handy. |
12,954,161 | I created an web app and i d like to deploy in on Openshift.
What s the easiest way to do it? I m using the Openshift Eclipse client.
Shall I create a new openshift and then copy all the files from the my exisitng app or is there are an easier way to covnert my existing app to an openshift one?
thnx | 2012/10/18 | [
"https://Stackoverflow.com/questions/12954161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525894/"
] | If your app is a Java EE web app, try this:
* <http://jaitechwriteups.blogspot.com.br/2011/08/deploy-java-ee-application-on-openshift.html>
* <https://openshift.redhat.com/community/forums/express/how-can-i-deploy-a-war> | [Have a look in this video](http://www.youtube.com/watch?v=4Htd9vAxJAc),it shows you how to configure a openshift project (a new or a existing one) and then generate a ssh key for your app,you can manually copy/paste the ssh key to the openshift website,or the eclipse plug in will do it.. |
170,977 | A friend of mine (for real, not me) received an offer letter from two tech firms in Silicon Valley. Let's called one X and the other Y.
X's offer letter has a better salary and sign-on bonus. However, my friend prefers to go to Y. Y is willing to match X's salary and sign-on bonus, but wants proof in the form of the o... | 2021/03/31 | [
"https://workplace.stackexchange.com/questions/170977",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/14182/"
] | You didn't give any info as to where this (may have) occurred, but as a general principle I think an NDA on a job offer would be difficult to enforce, because the offer doesn't contain anything proprietary or that would be viewed as a corporate secret.
To me, the larger issue is moral or ethical if the interview was in... | >
> "Y wants proof in the form of (seeing) the offer letter"
>
>
>
Run away from Y. Do not even respond to them in any way. Ghost them.
--------------------------------------------------------------------
* This behavior from Y is so unprofessional, **so far outside the industry norms**, that I would suggest it i... |
170,977 | A friend of mine (for real, not me) received an offer letter from two tech firms in Silicon Valley. Let's called one X and the other Y.
X's offer letter has a better salary and sign-on bonus. However, my friend prefers to go to Y. Y is willing to match X's salary and sign-on bonus, but wants proof in the form of the o... | 2021/03/31 | [
"https://workplace.stackexchange.com/questions/170977",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/14182/"
] | Salary negotiation can be summarized as follows:
“We’re willing to pay you x.”
“I’d be willing to accept x+2.”
“We’ll only go as high as x+1”
All the reasoning and justifications that go in between only serve to fill gaps in an otherwise very uncomfortable exchange. The idea of needing proof of some extraneous deta... | As [Kilisi said](https://workplace.stackexchange.com/a/170979/59502), there is no legal problem in the absence of an agreement, but a minor chance of some blowback.
However, I don't view it as weak if your friend complies with the request. I think it's completely reasonable for a hiring company to not be able to take ... |
170,977 | A friend of mine (for real, not me) received an offer letter from two tech firms in Silicon Valley. Let's called one X and the other Y.
X's offer letter has a better salary and sign-on bonus. However, my friend prefers to go to Y. Y is willing to match X's salary and sign-on bonus, but wants proof in the form of the o... | 2021/03/31 | [
"https://workplace.stackexchange.com/questions/170977",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/14182/"
] | Confidential does not have any legal weight in most places without a formal agreement. You can't just send someone something and mark it confidential.
But handing it over would be a breach of the company (that actually has given an offer) expectations. And there is no guarantee that the other company will better the o... | Salary negotiation can be summarized as follows:
“We’re willing to pay you x.”
“I’d be willing to accept x+2.”
“We’ll only go as high as x+1”
All the reasoning and justifications that go in between only serve to fill gaps in an otherwise very uncomfortable exchange. The idea of needing proof of some extraneous deta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.