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 |
|---|---|---|---|---|---|
62,432,752 | Stumbled upon a strange behavior. This formula:
```none
=ARRAYFORMULA(ROW($A$1:$E$5))
```
Returns a 5 element column with the row numbers from 1 to 5. I thought that `ARRAYFORMULA` would iterate through every cell in the range specified and execute the `ROW()` on it - resulting in a new range of the same size (5 col... | 2020/06/17 | [
"https://Stackoverflow.com/questions/62432752",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/279806/"
] | not rly much to say here just that `ROW` and `COLUMN` are only one dimensional. in other words, `ROW` will work only with one single column and `COLUMN` will work only with one single row - no matter that you feed it with range **A1:Z** or **A1:A**
as mentioned you can use MattKing's `SEQUENCE` to generate the matrix
... | Here is a workaround for you, man:
```none
=ARRAYFORMULA(ROW($A$1:$E$5) + 0 * ISBLANK(A1:E5))
```
`0 * ISBLANK(A1:E5)` part is there just to force the desired behavior without modifying (see that multiplication by `0`?) the values you need.
[](http... |
23,741,534 | I am trying to get the number of rows returned in a query. The while loop looping through the results works, but for some reason the sqlsrv\_num\_rows does not return any value:
```
$result = "SELECT * from dtable WHERE id2 = 'apple'";
$query = sqlsrv_query($conn, $result);
$row_count = sqlsrv_num_rows($query);
echo ... | 2014/05/19 | [
"https://Stackoverflow.com/questions/23741534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1067577/"
] | It is because `sqlsrv_query()` uses **`SQLSRV_CURSOR_FORWARD`** cursor type by default. However, in order to get a result from `sqlsrv_num_rows()`, you should choose one of these cursor types below:
* SQLSRV\_CURSOR\_STATIC
* SQLSRV\_CURSOR\_KEYSET
* SQLSRV\_CURSOR\_CLIENT\_BUFFERED
For more information, check: [Curs... | I agree with Jack. I count(\*) is a quick way to get a row count, however, you might have to do a clustered index scan. For small data sets, this is not an issue.
On the other hand, you can use the system catalog views. However, these get updated per some background thread. For multi-terabyte data sets, a catalog loo... |
137,361 | In Star Trek Beyond, they fix up the old Federation ship, USS Franklin. It wasn't made to fly in atmosphere, so in order to take off they need to propel it off a cliff and reach terminal velocity before the impulse engines can fire. (From what I can recall from a single viewing - if any of those assumptions are wrong p... | 2016/08/06 | [
"https://scifi.stackexchange.com/questions/137361",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/69852/"
] | The quote from the film is
>
> **Kirk:** *Scotty, can you get this thing started?*
>
>
> **Scott:** *Started yes, Sir. Flying, that's a different thing. These old vessels, they were built in space. They were never supposed to
> take off from atmosphere.*
>
>
>
then
>
> **Chekov:** *We have to achieve termin... | They specifically get the inspiration from the idea of the jumpstart. Then they basically "push started" the starship. So I'm assuming the older starships have a manual transmission, and they popped the clutch after getting up to speed. On a car, the wheels transmit the motion to the engine and engaging the engine sudd... |
137,361 | In Star Trek Beyond, they fix up the old Federation ship, USS Franklin. It wasn't made to fly in atmosphere, so in order to take off they need to propel it off a cliff and reach terminal velocity before the impulse engines can fire. (From what I can recall from a single viewing - if any of those assumptions are wrong p... | 2016/08/06 | [
"https://scifi.stackexchange.com/questions/137361",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/69852/"
] | The quote from the film is
>
> **Kirk:** *Scotty, can you get this thing started?*
>
>
> **Scott:** *Started yes, Sir. Flying, that's a different thing. These old vessels, they were built in space. They were never supposed to
> take off from atmosphere.*
>
>
>
then
>
> **Chekov:** *We have to achieve termin... | Spaceships in atmosphere are usually depicted as flying due to downward force from an engine, like a hovering harrier. Since the Franklin wasn't designed to fly in atmosphere, it may not be able to direct sufficient force in a downward direction to effect a vertical takeoff.
So, if it can't just take off straight up, ... |
137,361 | In Star Trek Beyond, they fix up the old Federation ship, USS Franklin. It wasn't made to fly in atmosphere, so in order to take off they need to propel it off a cliff and reach terminal velocity before the impulse engines can fire. (From what I can recall from a single viewing - if any of those assumptions are wrong p... | 2016/08/06 | [
"https://scifi.stackexchange.com/questions/137361",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/69852/"
] | Spaceships in atmosphere are usually depicted as flying due to downward force from an engine, like a hovering harrier. Since the Franklin wasn't designed to fly in atmosphere, it may not be able to direct sufficient force in a downward direction to effect a vertical takeoff.
So, if it can't just take off straight up, ... | They specifically get the inspiration from the idea of the jumpstart. Then they basically "push started" the starship. So I'm assuming the older starships have a manual transmission, and they popped the clutch after getting up to speed. On a car, the wheels transmit the motion to the engine and engaging the engine sudd... |
48,738,474 | Using Custom Elements, I would like to style the elements inside the custom element, but when I define the element, everything besides the shadow dom disappears.
How do I move the content from the element to the shadow dom? I already have a wrapper element (`<div class="wrapper">`) inside the shadow, but trying to use... | 2018/02/12 | [
"https://Stackoverflow.com/questions/48738474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9347844/"
] | If you want to control the CSS from outside of the custom element then just use `<slot>`. `<slot>` embeds the children into the slot but leaves CSS control to outside the element.
```js
class cardElement extends HTMLElement {
constructor() {
super();
var shadow = this.attachShadow({mode: 'open'});
va... | You should do it a bit later, in `window.onload`:
```
class cardElement extends HTMLElement {
constructor() {
super();
var shadow = this.attachShadow({ mode: 'open' });
var wrapper = document.createElement('div');
wrapper.setAttribute('class', 'wrapper');
window.onload = () ... |
61,105,481 | I am getting this error 'Cypress executable not found at: /root/.cache/Cypress/3.8.3/Cypress/Cypress' when the cypress command 'npx cypress run -P projects/demoProject-cypress' is run on docker at cloud. This is a command written in jenkins to run before deployment. I have tried wait-on but it is not useful. This is a ... | 2020/04/08 | [
"https://Stackoverflow.com/questions/61105481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3331785/"
] | Set `CYPRESS_CACHE_FOLDER` environment variable.
Ex on Linux:
```
export CYPRESS_CACHE_FOLDER=/custom_path/cypress
```
When you install `Cypress` it's caching some binaries and stuff. Usually, for a regular user, default cache locations are as follows.
```
MacOS: ~/Library/Caches/Cypress
Linux: ~/.cache/Cypress
Wi... | your npx command trying to run from the root. Try using from nodemodules of the current project.
```
/node_modules/.bin/cypress run
```
This will open and run the cypress. Let me know still you are facing issues. |
61,105,481 | I am getting this error 'Cypress executable not found at: /root/.cache/Cypress/3.8.3/Cypress/Cypress' when the cypress command 'npx cypress run -P projects/demoProject-cypress' is run on docker at cloud. This is a command written in jenkins to run before deployment. I have tried wait-on but it is not useful. This is a ... | 2020/04/08 | [
"https://Stackoverflow.com/questions/61105481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3331785/"
] | your npx command trying to run from the root. Try using from nodemodules of the current project.
```
/node_modules/.bin/cypress run
```
This will open and run the cypress. Let me know still you are facing issues. | If you installed cypress through npm i.e **npm install cypress**, then follow the instructions displayed after a complete installation. Which in my case said, *You can now open Cypress by running:* **node\_modules/.bin/cypress open**. This command should be run if you are running Cypress for the first time, whereby Cyp... |
61,105,481 | I am getting this error 'Cypress executable not found at: /root/.cache/Cypress/3.8.3/Cypress/Cypress' when the cypress command 'npx cypress run -P projects/demoProject-cypress' is run on docker at cloud. This is a command written in jenkins to run before deployment. I have tried wait-on but it is not useful. This is a ... | 2020/04/08 | [
"https://Stackoverflow.com/questions/61105481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3331785/"
] | your npx command trying to run from the root. Try using from nodemodules of the current project.
```
/node_modules/.bin/cypress run
```
This will open and run the cypress. Let me know still you are facing issues. | Perhaps late answer, but still:
I had this errors mostly because of the version mismatch between docker image specified in Dockerfile or docker run command: `cypress/included:8.4.0` and cypress version in project package.json which was `"cypress": "8.3.0"` |
61,105,481 | I am getting this error 'Cypress executable not found at: /root/.cache/Cypress/3.8.3/Cypress/Cypress' when the cypress command 'npx cypress run -P projects/demoProject-cypress' is run on docker at cloud. This is a command written in jenkins to run before deployment. I have tried wait-on but it is not useful. This is a ... | 2020/04/08 | [
"https://Stackoverflow.com/questions/61105481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3331785/"
] | Set `CYPRESS_CACHE_FOLDER` environment variable.
Ex on Linux:
```
export CYPRESS_CACHE_FOLDER=/custom_path/cypress
```
When you install `Cypress` it's caching some binaries and stuff. Usually, for a regular user, default cache locations are as follows.
```
MacOS: ~/Library/Caches/Cypress
Linux: ~/.cache/Cypress
Wi... | If you installed cypress through npm i.e **npm install cypress**, then follow the instructions displayed after a complete installation. Which in my case said, *You can now open Cypress by running:* **node\_modules/.bin/cypress open**. This command should be run if you are running Cypress for the first time, whereby Cyp... |
61,105,481 | I am getting this error 'Cypress executable not found at: /root/.cache/Cypress/3.8.3/Cypress/Cypress' when the cypress command 'npx cypress run -P projects/demoProject-cypress' is run on docker at cloud. This is a command written in jenkins to run before deployment. I have tried wait-on but it is not useful. This is a ... | 2020/04/08 | [
"https://Stackoverflow.com/questions/61105481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3331785/"
] | Set `CYPRESS_CACHE_FOLDER` environment variable.
Ex on Linux:
```
export CYPRESS_CACHE_FOLDER=/custom_path/cypress
```
When you install `Cypress` it's caching some binaries and stuff. Usually, for a regular user, default cache locations are as follows.
```
MacOS: ~/Library/Caches/Cypress
Linux: ~/.cache/Cypress
Wi... | Perhaps late answer, but still:
I had this errors mostly because of the version mismatch between docker image specified in Dockerfile or docker run command: `cypress/included:8.4.0` and cypress version in project package.json which was `"cypress": "8.3.0"` |
61,105,481 | I am getting this error 'Cypress executable not found at: /root/.cache/Cypress/3.8.3/Cypress/Cypress' when the cypress command 'npx cypress run -P projects/demoProject-cypress' is run on docker at cloud. This is a command written in jenkins to run before deployment. I have tried wait-on but it is not useful. This is a ... | 2020/04/08 | [
"https://Stackoverflow.com/questions/61105481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3331785/"
] | Perhaps late answer, but still:
I had this errors mostly because of the version mismatch between docker image specified in Dockerfile or docker run command: `cypress/included:8.4.0` and cypress version in project package.json which was `"cypress": "8.3.0"` | If you installed cypress through npm i.e **npm install cypress**, then follow the instructions displayed after a complete installation. Which in my case said, *You can now open Cypress by running:* **node\_modules/.bin/cypress open**. This command should be run if you are running Cypress for the first time, whereby Cyp... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | The Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are true for the worldlings who have craving (tanha) and greed (lobha) or aversion / revulsion (dosa), caused by ignorance (moha). Tanha, lobha, dosa, moha provides nourishment for the continuation of life from existence to existen... | * Son's flesh - eating itself is unsatisfactory (as the sensations produced by it is unsatisfactory - [Kīta,giri Sutta](http://www.themindingcentre.org/dharmafarer/wp-content/uploads/2009/12/11.1-Kitagiri-S-m70-piya.pdf)). eating should be only to maintain life to fulfil holy life and not for the please of it.
* Skinne... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | Its simple, i will explain each 4 nutriement in points
(1) physical food- it is to be regarded only for survival ,not for flavour or intoxication. We should treat our physical food like we are feeding on our young baby
(2) contact- if contact happens with our six senses (eye, ear, skin ,etc) to its corresponding obj... | * Son's flesh - eating itself is unsatisfactory (as the sensations produced by it is unsatisfactory - [Kīta,giri Sutta](http://www.themindingcentre.org/dharmafarer/wp-content/uploads/2009/12/11.1-Kitagiri-S-m70-piya.pdf)). eating should be only to maintain life to fulfil holy life and not for the please of it.
* Skinne... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | The Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are true for the worldlings who have craving (tanha) and greed (lobha) or aversion / revulsion (dosa), caused by ignorance (moha). Tanha, lobha, dosa, moha provides nourishment for the continuation of life from existence to existen... | Here's my personal interpretation of [SN 12.63](https://suttacentral.net/sn12.63/en/bodhi).
To understand each of the similes, the clue is in the epilogue of each simile. The nutriments are not taken literally. Each simile becomes harder to interpret than the previous one. Each simile is also related in some way to th... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | Existence is nourished by four nutriments as pointed out in the Sutta in @Dhammadhatu ‘s OP. They are essential to continue life in this repeated existence in samsara. This is true even to the deities in the celestial world and brahmas in the Brahma world. Of these four kinds, one is material/physical, and the other th... | * Son's flesh - eating itself is unsatisfactory (as the sensations produced by it is unsatisfactory - [Kīta,giri Sutta](http://www.themindingcentre.org/dharmafarer/wp-content/uploads/2009/12/11.1-Kitagiri-S-m70-piya.pdf)). eating should be only to maintain life to fulfil holy life and not for the please of it.
* Skinne... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | The Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are true for the worldlings who have craving (tanha) and greed (lobha) or aversion / revulsion (dosa), caused by ignorance (moha). Tanha, lobha, dosa, moha provides nourishment for the continuation of life from existence to existen... | I am happy to see this quiz or riddle being attempted. For many years I used to wonder about this teaching of nutriments, was never satisfied with Ven. Nyanaponika's explanation & could not work out a satisfactory explanation for myself.
My personal interpretation is as follows:
1. The skinned cow refers to all sen... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | Its simple, i will explain each 4 nutriement in points
(1) physical food- it is to be regarded only for survival ,not for flavour or intoxication. We should treat our physical food like we are feeding on our young baby
(2) contact- if contact happens with our six senses (eye, ear, skin ,etc) to its corresponding obj... | Here's my personal interpretation of [SN 12.63](https://suttacentral.net/sn12.63/en/bodhi).
To understand each of the similes, the clue is in the epilogue of each simile. The nutriments are not taken literally. Each simile becomes harder to interpret than the previous one. Each simile is also related in some way to th... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | While the sutta did not state the nutriments are evil, it did give vivid and explicit similes of the son's flesh, the skinned cow, the man being dragged toward a burning pit, and a criminal being pierced with three hundred spears. Needless to say, one doesn't have to be very smart to think carefully before indulging on... | Its simple, i will explain each 4 nutriement in points
(1) physical food- it is to be regarded only for survival ,not for flavour or intoxication. We should treat our physical food like we are feeding on our young baby
(2) contact- if contact happens with our six senses (eye, ear, skin ,etc) to its corresponding obj... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | I am happy to see this quiz or riddle being attempted. For many years I used to wonder about this teaching of nutriments, was never satisfied with Ven. Nyanaponika's explanation & could not work out a satisfactory explanation for myself.
My personal interpretation is as follows:
1. The skinned cow refers to all sen... | * Son's flesh - eating itself is unsatisfactory (as the sensations produced by it is unsatisfactory - [Kīta,giri Sutta](http://www.themindingcentre.org/dharmafarer/wp-content/uploads/2009/12/11.1-Kitagiri-S-m70-piya.pdf)). eating should be only to maintain life to fulfil holy life and not for the please of it.
* Skinne... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | While the sutta did not state the nutriments are evil, it did give vivid and explicit similes of the son's flesh, the skinned cow, the man being dragged toward a burning pit, and a criminal being pierced with three hundred spears. Needless to say, one doesn't have to be very smart to think carefully before indulging on... | Existence is nourished by four nutriments as pointed out in the Sutta in @Dhammadhatu ‘s OP. They are essential to continue life in this repeated existence in samsara. This is true even to the deities in the celestial world and brahmas in the Brahma world. Of these four kinds, one is material/physical, and the other th... |
17,167 | In the [Puttamansa Sutta](http://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.063.nypo.html), the Four Nutriments ('ahara') of physical food, sense contact, intention & consciousness are discussed using four comparative similes ('metaphors').
The 1st simile of eating the flesh of one's own son (merely for the sake o... | 2016/08/06 | [
"https://buddhism.stackexchange.com/questions/17167",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8157/"
] | Existence is nourished by four nutriments as pointed out in the Sutta in @Dhammadhatu ‘s OP. They are essential to continue life in this repeated existence in samsara. This is true even to the deities in the celestial world and brahmas in the Brahma world. Of these four kinds, one is material/physical, and the other th... | Here's my personal interpretation of [SN 12.63](https://suttacentral.net/sn12.63/en/bodhi).
To understand each of the similes, the clue is in the epilogue of each simile. The nutriments are not taken literally. Each simile becomes harder to interpret than the previous one. Each simile is also related in some way to th... |
18,197,051 | **How to easily list all routes that we have defined in our application with Zend Framework** 2?
By "routes" I mean those which are defined in:
`module/[moduleName]/config/module.config.php`
under
```
'router' => array(
'routes' => array(
...
)
)
```
I need to list them all but I can't figure out ... | 2013/08/12 | [
"https://Stackoverflow.com/questions/18197051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1410020/"
] | You can find the complete (merged) config or dump the Router itself. There is no way to export all route objects, so there I've to disappoint you.
To get the complete config, get it from the service locator:
```
// $sl instanceof Zend\ServiceManager\ServiceManager
$config = $sl->get('COnfig');
$routes = $config['rou... | To get all routes I use [ZFTool](http://framework.zend.com/manual/current/en/modules/zendtool.introduction.html)
And console command to get dump of routes:
```
php vendor/bin/zf.php config list | grep routes
```
For Windows users (not tested):
```
php vendor/bin/zf.php config list | findstr /R /C:"[routes]"
``` |
18,197,051 | **How to easily list all routes that we have defined in our application with Zend Framework** 2?
By "routes" I mean those which are defined in:
`module/[moduleName]/config/module.config.php`
under
```
'router' => array(
'routes' => array(
...
)
)
```
I need to list them all but I can't figure out ... | 2013/08/12 | [
"https://Stackoverflow.com/questions/18197051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1410020/"
] | You can find the complete (merged) config or dump the Router itself. There is no way to export all route objects, so there I've to disappoint you.
To get the complete config, get it from the service locator:
```
// $sl instanceof Zend\ServiceManager\ServiceManager
$config = $sl->get('COnfig');
$routes = $config['rou... | I needed to differentiate routes per module so that we can use BjyAuthorize's ACL setup respectively in different situations.
While there is more than one way to do to this such as shown by [Jurian Sluiman](https://stackoverflow.com/users/434223/jurian-sluiman) to read in all the routes (variables changed):
```php
<?... |
18,197,051 | **How to easily list all routes that we have defined in our application with Zend Framework** 2?
By "routes" I mean those which are defined in:
`module/[moduleName]/config/module.config.php`
under
```
'router' => array(
'routes' => array(
...
)
)
```
I need to list them all but I can't figure out ... | 2013/08/12 | [
"https://Stackoverflow.com/questions/18197051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1410020/"
] | You can find the complete (merged) config or dump the Router itself. There is no way to export all route objects, so there I've to disappoint you.
To get the complete config, get it from the service locator:
```
// $sl instanceof Zend\ServiceManager\ServiceManager
$config = $sl->get('COnfig');
$routes = $config['rou... | You can get a list of routes from the router using the following code snippet. `$mvcEvent` is an instance of `Zend\Mvc\MvcEvent` and `TreeRouteStack` is `Zend\Router\Http\TreeRouteStack`.
```php
$router = $mvcEvent->getRouter();
$routes = (array) $router->getRoutes();
$routes = array_values($routes);
$routes = count($... |
18,197,051 | **How to easily list all routes that we have defined in our application with Zend Framework** 2?
By "routes" I mean those which are defined in:
`module/[moduleName]/config/module.config.php`
under
```
'router' => array(
'routes' => array(
...
)
)
```
I need to list them all but I can't figure out ... | 2013/08/12 | [
"https://Stackoverflow.com/questions/18197051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1410020/"
] | To get all routes I use [ZFTool](http://framework.zend.com/manual/current/en/modules/zendtool.introduction.html)
And console command to get dump of routes:
```
php vendor/bin/zf.php config list | grep routes
```
For Windows users (not tested):
```
php vendor/bin/zf.php config list | findstr /R /C:"[routes]"
``` | I needed to differentiate routes per module so that we can use BjyAuthorize's ACL setup respectively in different situations.
While there is more than one way to do to this such as shown by [Jurian Sluiman](https://stackoverflow.com/users/434223/jurian-sluiman) to read in all the routes (variables changed):
```php
<?... |
18,197,051 | **How to easily list all routes that we have defined in our application with Zend Framework** 2?
By "routes" I mean those which are defined in:
`module/[moduleName]/config/module.config.php`
under
```
'router' => array(
'routes' => array(
...
)
)
```
I need to list them all but I can't figure out ... | 2013/08/12 | [
"https://Stackoverflow.com/questions/18197051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1410020/"
] | To get all routes I use [ZFTool](http://framework.zend.com/manual/current/en/modules/zendtool.introduction.html)
And console command to get dump of routes:
```
php vendor/bin/zf.php config list | grep routes
```
For Windows users (not tested):
```
php vendor/bin/zf.php config list | findstr /R /C:"[routes]"
``` | You can get a list of routes from the router using the following code snippet. `$mvcEvent` is an instance of `Zend\Mvc\MvcEvent` and `TreeRouteStack` is `Zend\Router\Http\TreeRouteStack`.
```php
$router = $mvcEvent->getRouter();
$routes = (array) $router->getRoutes();
$routes = array_values($routes);
$routes = count($... |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | ```
if (number == 1 || number == 2 || number == 3)
``` | What language?
For example in VB.NET you use the word OR, and in C# you use || |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | If you are using PHP, then suppose your list of numbers is an array
```
$list = array(1,3,5,7,9);
```
then for any element, you can use
```
if(in_array($element, $list)){
//Element present in list
}else{
//not present.
}
```
Function structure:
```
bool in_array ( mixed $needle , array $haystack [, bool $strict ... | For a list of integers:
```
static bool Found(List<int> arr, int val)
{
int result = default(int);
if (result == val)
result++;
result = arr.FindIndex(delegate(int myVal)
{
return (myVal == val);
});
return (result > -1);
}
``` |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | ```
if ((number >= 1) && (number <= 3))
``` | For a list of integers:
```
static bool Found(List<int> arr, int val)
{
int result = default(int);
if (result == val)
result++;
result = arr.FindIndex(delegate(int myVal)
{
return (myVal == val);
});
return (result > -1);
}
``` |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | ```
if (number == 1 || number == 2 || number == 3)
``` | For a list of integers:
```
static bool Found(List<int> arr, int val)
{
int result = default(int);
if (result == val)
result++;
result = arr.FindIndex(delegate(int myVal)
{
return (myVal == val);
});
return (result > -1);
}
``` |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | ```
if ((number >= 1) && (number <= 3))
``` | In T-SQL you can use the IN operator:
```
select * from MyTable where ID in (1,2,3)
```
If you are using a collection there may be a contains operator for another way to do this.
In C# for another way that may be easier to add values:
```
List<int> numbers = new List<int>(){1,2,3};
if (numbers.Contains(num... |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | What language?
For example in VB.NET you use the word OR, and in C# you use || | In T-SQL you can use the IN operator:
```
select * from MyTable where ID in (1,2,3)
```
If you are using a collection there may be a contains operator for another way to do this.
In C# for another way that may be easier to add values:
```
List<int> numbers = new List<int>(){1,2,3};
if (numbers.Contains(num... |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | ```
if (number == 1 || number == 2 || number == 3)
``` | ```
if ((number >= 1) && (number <= 3))
``` |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | ```
if (number == 1 || number == 2 || number == 3)
``` | If you are using PHP, then suppose your list of numbers is an array
```
$list = array(1,3,5,7,9);
```
then for any element, you can use
```
if(in_array($element, $list)){
//Element present in list
}else{
//not present.
}
```
Function structure:
```
bool in_array ( mixed $needle , array $haystack [, bool $strict ... |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | What language?
For example in VB.NET you use the word OR, and in C# you use || | I'll assume a C-Style language, here's a quick primer on IF AND OR logic:
```
if(variable == value){
//does something if variable is equal to value
}
if(!variable == value){
//does something if variable is NOT equal to value
}
if(variable1 == value1 && variable2 == value2){
//does something if variable1 ... |
1,532,036 | How can I check if a condition passes multiple values?
Example:
```
if(number == 1,2,3)
```
I know that commas don't work. | 2009/10/07 | [
"https://Stackoverflow.com/questions/1532036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/185672/"
] | Since you specify no language I add a Python solution:
```
if number in [1, 2, 3]:
pass
``` | In Java you have objects that wrap primitive variables (Integer for int, Long for long, etc). if you look to compare values between a lot of complete numbers (ints), what you can do is initiate a bunch of Integer objects, stuff them inside an iterable such as an ArrayList, iterate over them and compare.
something like... |
84,477 | I have a newbie question about focal length, what it actually means for lenses and how I can translate this into "how close to the target it's going to practically take me" (I don't want to use the term zoom here to avoid confusion, perhaps magnifying power is what describes best what I'm after, basically shots from th... | 2016/11/13 | [
"https://photo.stackexchange.com/questions/84477",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/58322/"
] | Sony Cyber-Shot DSC-HX60 has a small sensor ([6.16x4.62 mm](http://www.digicamdb.com/specs/sony_cybershot-dsc-hx60/)). When talking about "Sigma 18-200mm lens", you don't mention which camera you use it on, but I guess it's an APS-C sensor (24×16 mm), hence 3.8 times bigger. At constant image size on the sensor, the sm... | Your question cannot be answered that way. There are instead other factors.
Your 18-200 Sigma lens is for a APS size camera, with a relatively large digital sensor.
Your little compact has a very tiny sensor (all compacts and phones do).
These are very important differences regarding the size image they can show.
So ... |
84,477 | I have a newbie question about focal length, what it actually means for lenses and how I can translate this into "how close to the target it's going to practically take me" (I don't want to use the term zoom here to avoid confusion, perhaps magnifying power is what describes best what I'm after, basically shots from th... | 2016/11/13 | [
"https://photo.stackexchange.com/questions/84477",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/58322/"
] | Sony Cyber-Shot DSC-HX60 has a small sensor ([6.16x4.62 mm](http://www.digicamdb.com/specs/sony_cybershot-dsc-hx60/)). When talking about "Sigma 18-200mm lens", you don't mention which camera you use it on, but I guess it's an APS-C sensor (24×16 mm), hence 3.8 times bigger. At constant image size on the sensor, the sm... | There are several characteristics of an objective which define the sizes of objects:
* the equivalent focal length is the focal length of an objective which yields the same FoV on the 35mm film frame;
* the Field of View (FoV) defines the sizes of object on the recorded image, it is calculated from sensor dimensions a... |
84,477 | I have a newbie question about focal length, what it actually means for lenses and how I can translate this into "how close to the target it's going to practically take me" (I don't want to use the term zoom here to avoid confusion, perhaps magnifying power is what describes best what I'm after, basically shots from th... | 2016/11/13 | [
"https://photo.stackexchange.com/questions/84477",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/58322/"
] | Sony Cyber-Shot DSC-HX60 has a small sensor ([6.16x4.62 mm](http://www.digicamdb.com/specs/sony_cybershot-dsc-hx60/)). When talking about "Sigma 18-200mm lens", you don't mention which camera you use it on, but I guess it's an APS-C sensor (24×16 mm), hence 3.8 times bigger. At constant image size on the sensor, the sm... | **Overall the image from the smaller sensor is being enlarged about 3.6X more than the image captured by the larger APS-C sensor when viewed at the same display size. That's why objects in the picture taken by the compact camera from the same distance appear larger than the same objects in the picture taken by the came... |
45,600 | This should be simple but I am horrible at math.
Anyways I forgot basic math properties and when I try to work it out in more simple terms I can't make sense of anything. Anyways I have to factor $(\sin x+1)^2 - (\sin x-1)^2$
So I figure that I just do $(\sin x+1)(\sin x+1)$ for the first term and then $(\sin x-1)(\s... | 2011/06/15 | [
"https://math.stackexchange.com/questions/45600",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/9334/"
] | Any time you have a **difference of squares**,
$$a^2 - b^2$$
it can be factored as
$$a^2-b^2 = (a+b)(a-b).$$
Here you have a difference of squares, with $a=\sin x+1$ and $b=\sin x -1$, so you can factor it this way, and then simplify to see what you get. Note that this factorization is completely independent of the fa... | Arturo's answer is the 'slickest' way to get to the answer, but if you wanted to be more pedestrian you could just multiply out the brackets one at a time, and then do the necessary simplifications:
$$\begin{align}
(\sin x + 1)^2 - (\sin x - 1)^2
&= (\sin^2 x + 2\sin x + 1) - (\sin^2 x - 2\sin x + 1) & \textrm{(mult... |
45,600 | This should be simple but I am horrible at math.
Anyways I forgot basic math properties and when I try to work it out in more simple terms I can't make sense of anything. Anyways I have to factor $(\sin x+1)^2 - (\sin x-1)^2$
So I figure that I just do $(\sin x+1)(\sin x+1)$ for the first term and then $(\sin x-1)(\s... | 2011/06/15 | [
"https://math.stackexchange.com/questions/45600",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/9334/"
] | Any time you have a **difference of squares**,
$$a^2 - b^2$$
it can be factored as
$$a^2-b^2 = (a+b)(a-b).$$
Here you have a difference of squares, with $a=\sin x+1$ and $b=\sin x -1$, so you can factor it this way, and then simplify to see what you get. Note that this factorization is completely independent of the fa... | Adam,
It seems to me, from this and many other comments, that you are approaching this (and previous mathematical courses) as subjects to be solely (or mainly) memorized. While it is certainly true that some things need to be memorized (e.g., the multiplication tables, some basic values for sine and cosine, etc), it i... |
23,209,086 | So, I'm trying to create a function that will take in a list of lists, each consisting of 9 integers numbered 1 through 9, and return a Boolean if it is a valid solution to for a Sudoku. Right now, I've managed to solve part of the problem with checking for rows and columns, but I am stuck on the implementation of chec... | 2014/04/22 | [
"https://Stackoverflow.com/questions/23209086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3483844/"
] | How about something like this?
```
public bool validate(string text)
{
return (text == num.ToString());
}
```
And calling it in your code like this. You should try to make code as reusable as possible. Which means that references to specific instances of controls on a Form is not always the best design.
```
i... | Sorry I can't comment on your post, I don't have enough reputation.
I've had similar trouble once before getting a form to access a string from another form.
In my case I just had to make the string static. Try doing the same with your textbox.
```
public static TextBox textBox1;
public Form1()
``` |
23,209,086 | So, I'm trying to create a function that will take in a list of lists, each consisting of 9 integers numbered 1 through 9, and return a Boolean if it is a valid solution to for a Sudoku. Right now, I've managed to solve part of the problem with checking for rows and columns, but I am stuck on the implementation of chec... | 2014/04/22 | [
"https://Stackoverflow.com/questions/23209086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3483844/"
] | Probably best to keep the gui separate from the logic:
```
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Authenticator at = new Authenticator();
if (at.validate(textBox1.Text)) {
... | Sorry I can't comment on your post, I don't have enough reputation.
I've had similar trouble once before getting a form to access a string from another form.
In my case I just had to make the string static. Try doing the same with your textbox.
```
public static TextBox textBox1;
public Form1()
``` |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | As [commented by goldilocks](https://unix.stackexchange.com/questions/118090/mounting-mmcblk0p1-failed-with-invalid-argument#comment192054_118090), `mount -t` expects the filesystem type to come after `-t`, so it won't work. Otherwise it sounds like you just need to specify the filesystem type. If you don't know the fi... | I seem to remember this is the error you get when the type of partition you're trying to mount isn't supported. |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | Basic reasons: (updated)
1) Your system does not (properly?) initialize or does not recognize the SD when booting from flash. Is there the `/dev/mmcblk0` device after you boot from flash? What does `fdisk -l /dev/mmcblk0` say?
2) There is no file system on /dev/mmcblk0p1, you need to create a file system first (`mkfs... | I seem to remember this is the error you get when the type of partition you're trying to mount isn't supported. |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | First check the file systems supported in the kernel.
```
[kevin@hexcore ~]
$ cat /proc/filesystems
....
ext3
ext2
ext4
....
```
I assume that you are trying to mount the same SD card from which you are running the Linux. If so, I assume, quite reasonably, that it has native file system support in Linux... | I seem to remember this is the error you get when the type of partition you're trying to mount isn't supported. |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | As [commented by goldilocks](https://unix.stackexchange.com/questions/118090/mounting-mmcblk0p1-failed-with-invalid-argument#comment192054_118090), `mount -t` expects the filesystem type to come after `-t`, so it won't work. Otherwise it sounds like you just need to specify the filesystem type. If you don't know the fi... | Maybe you need to use (parted command) due to partition size:
```
# /sbin/parted /dev/mmcblk0p1
(parted) mklabel gpt
this disk will be lost. Do you want to continue?
Yes/No? yes
....
(parted) quit
```
To make sure that the partition is properly created use `/sbin/parted /dev/mmcblk0p1 print”`
Then you have to forma... |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | As [commented by goldilocks](https://unix.stackexchange.com/questions/118090/mounting-mmcblk0p1-failed-with-invalid-argument#comment192054_118090), `mount -t` expects the filesystem type to come after `-t`, so it won't work. Otherwise it sounds like you just need to specify the filesystem type. If you don't know the fi... | Basic reasons: (updated)
1) Your system does not (properly?) initialize or does not recognize the SD when booting from flash. Is there the `/dev/mmcblk0` device after you boot from flash? What does `fdisk -l /dev/mmcblk0` say?
2) There is no file system on /dev/mmcblk0p1, you need to create a file system first (`mkfs... |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | As [commented by goldilocks](https://unix.stackexchange.com/questions/118090/mounting-mmcblk0p1-failed-with-invalid-argument#comment192054_118090), `mount -t` expects the filesystem type to come after `-t`, so it won't work. Otherwise it sounds like you just need to specify the filesystem type. If you don't know the fi... | First check the file systems supported in the kernel.
```
[kevin@hexcore ~]
$ cat /proc/filesystems
....
ext3
ext2
ext4
....
```
I assume that you are trying to mount the same SD card from which you are running the Linux. If so, I assume, quite reasonably, that it has native file system support in Linux... |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | Basic reasons: (updated)
1) Your system does not (properly?) initialize or does not recognize the SD when booting from flash. Is there the `/dev/mmcblk0` device after you boot from flash? What does `fdisk -l /dev/mmcblk0` say?
2) There is no file system on /dev/mmcblk0p1, you need to create a file system first (`mkfs... | Maybe you need to use (parted command) due to partition size:
```
# /sbin/parted /dev/mmcblk0p1
(parted) mklabel gpt
this disk will be lost. Do you want to continue?
Yes/No? yes
....
(parted) quit
```
To make sure that the partition is properly created use `/sbin/parted /dev/mmcblk0p1 print”`
Then you have to forma... |
118,090 | When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:
```
# mount /dev/mmcblk0p1 /mnt/
mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument
```
What could be the basic reason for this error ? ... | 2014/03/04 | [
"https://unix.stackexchange.com/questions/118090",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/52334/"
] | First check the file systems supported in the kernel.
```
[kevin@hexcore ~]
$ cat /proc/filesystems
....
ext3
ext2
ext4
....
```
I assume that you are trying to mount the same SD card from which you are running the Linux. If so, I assume, quite reasonably, that it has native file system support in Linux... | Maybe you need to use (parted command) due to partition size:
```
# /sbin/parted /dev/mmcblk0p1
(parted) mklabel gpt
this disk will be lost. Do you want to continue?
Yes/No? yes
....
(parted) quit
```
To make sure that the partition is properly created use `/sbin/parted /dev/mmcblk0p1 print”`
Then you have to forma... |
56,516,555 | I would like to create a graph that has superscripts on the axis instead of displaying unformatted numbers using `ggplot2`. **I know that there are a lot of answers which change the axis label, but not the axis text. I am not trying to change the label of the graph, but the text on the axis.**
Example:
```
x<-c('2^-5... | 2019/06/09 | [
"https://Stackoverflow.com/questions/56516555",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4110765/"
] | ```
completable1.doSomething()
.andThen(completable2.doSomethingElse())
```
>
> Shouldn't andThen() never be called if the first completable emitts error?
>
>
>
`andThen` will always call `completable2.doSomethingElse()` to build the stream, but the Completable that is returned by it will never be subscribed... | If anybody stuck with the same issue try to `defer` the second Completable.
abstract example:
```
repo.executeCompletable1()
.andThen(
Completable.defer {
repo.executeCompletable2()
}
)
``` |
4,232,009 | According to Peter Olver in his book “Applications of Lie Groups to Differential Equations”, p. 104, Example 2.32, the ODE:
$$(u-x)u\_x + u + x = 0 \tag{1}$$
is transformed in polar coordinates with $x = r\cos \theta$ and $u = r\sin\theta$ to:
$$\frac{dr}{d\theta} = r.$$
How do I transform $u\_x=\partial\_x(r\sin\t... | 2021/08/24 | [
"https://math.stackexchange.com/questions/4232009",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/81994/"
] | You get by the chain rule, where it is applicable
$$
\frac{du}{dx}=\frac{\frac{du}{dθ}}{\frac{dx}{dθ}}
=\frac{r'(θ)\sinθ+r(θ)\cosθ}{r'(θ)\cosθ-r(θ)\sinθ}
$$
which on the other hand is equal due to the given equation to
$$
=\frac{\sinθ+\cosθ}{\cosθ-\sinθ}
$$
Now solve this by cross-multiplying
$$
(r'(θ)\sinθ+r(θ)\cosθ)(... | $$(u-x)u\_x + u + x = 0 \tag{1}$$
$$-xu\_x + u =- x -uu\_x$$
$$\left(\dfrac u x \right)' =\dfrac 1 {x^2}(x+uu\_x)$$
$$\left(\dfrac u x\right)' =\dfrac 1 {2x^2}(x^2+u^2)'$$
Multiply both sides by $ \dfrac {dx}{d\theta}$:
$$\dfrac {d}{d \theta}(\tan \theta )=\dfrac 1 {2r^2 \cos^2 \theta}\dfrac {dr^2}{d\theta }$$
$$\dfrac... |
58,204,831 | Docker is fairly new to me, I'm creating a jupyterhub container like that
```
FROM ubuntu:18.04
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
# install nodejs, utf8 locale, set CDN because default httpredir is unreliable
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && \
apt-get -y upgrade ... | 2019/10/02 | [
"https://Stackoverflow.com/questions/58204831",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1265067/"
] | Python runs on Windows, Mac, and Linux.
Yes, you can control your web cam and other hardware.
To control your webcam: [How do I access my webcam in Python?](https://stackoverflow.com/questions/604749/how-do-i-access-my-webcam-in-python)
Mouse and keyboard: <https://steemit.com/python/@howo/how-to-control-the-mouse-a... | Yes, depending on the specific hardware you want to use.
Also, python runs on all major operating systems. |
36,866 | I guess it's technically a Mornay, it has Parmesan and Fontina. I've got about 1 1/2 cups in my fridge. Refrigerated it's solid enough to hold a knife vertically, when it was warm it was just barely pourable and self spreading. It's a darn good sauce, I'd hate to waste it, but after all my adventures lately making an '... | 2013/09/17 | [
"https://cooking.stackexchange.com/questions/36866",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/20183/"
] | Crouque-Monsier or the similar "Hot Brown" sandwich is perfect for my needs. That will use up the sauce in a completely different way. It will also make a great lunch. Thanks SAJ14SAJ for the tip. | You're already half way towards [kroketten](http://en.wikipedia.org/wiki/Croquette#Netherlands).
(Search for 'Dutch Croquettes' to find recipes in English) |
36,866 | I guess it's technically a Mornay, it has Parmesan and Fontina. I've got about 1 1/2 cups in my fridge. Refrigerated it's solid enough to hold a knife vertically, when it was warm it was just barely pourable and self spreading. It's a darn good sauce, I'd hate to waste it, but after all my adventures lately making an '... | 2013/09/17 | [
"https://cooking.stackexchange.com/questions/36866",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/20183/"
] | Crouque-Monsier or the similar "Hot Brown" sandwich is perfect for my needs. That will use up the sauce in a completely different way. It will also make a great lunch. Thanks SAJ14SAJ for the tip. | You can mix it with a little bit of tomatoes and pour it over spicy burritos the oven heat makes everything golden brown and crusty. |
36,866 | I guess it's technically a Mornay, it has Parmesan and Fontina. I've got about 1 1/2 cups in my fridge. Refrigerated it's solid enough to hold a knife vertically, when it was warm it was just barely pourable and self spreading. It's a darn good sauce, I'd hate to waste it, but after all my adventures lately making an '... | 2013/09/17 | [
"https://cooking.stackexchange.com/questions/36866",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/20183/"
] | Crouque-Monsier or the similar "Hot Brown" sandwich is perfect for my needs. That will use up the sauce in a completely different way. It will also make a great lunch. Thanks SAJ14SAJ for the tip. | If you want something kind of healthy, you can always mix it with steamed spinach and it can't be more delicious!!! Oh, with brocoli works pretty well too ;-) |
41,618,266 | I am trying to populate the GA e-commerce code using jQuery, or JS. I don't have access to the code, so I am unable to populate them from the actual page - which is a pain in the backside, i know!
I have so far been able to get the order number and order total. To get each product in the basket I have been trying to ... | 2017/01/12 | [
"https://Stackoverflow.com/questions/41618266",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4676485/"
] | Moving the send function into the each loop worked.
The reason it didn't work was due to the transaction items not being sent to GA | You probably dont need to clear after send because "Once complete, the shopping cart is cleared and ready to send data for a new transaction. If a previous ecommerce:send command was issued, only new transaction and item data will be sent."
See here: <https://developers.google.com/analytics/devguides/collection/analyti... |
5,714,746 | ```
{
"Flight1":{
"3":{
"id":"10",
"name":"JumboJet1B",
"level":"1",
"category":"1",
"energy":"10",
"bonus":"10",
"completed":0
},
"4":{
"id":"10",
"name":"JumboJet1B",
"level":"1",
"category":"1",
... | 2011/04/19 | [
"https://Stackoverflow.com/questions/5714746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/714975/"
] | If the order inside Flight1 doesn’t matter, the following should work:
```
NSDictionary *flights = … // result from a JSON parser
NSDictionary *flight1 = [flights objectForKey:@"Flight1"];
for (NSString *key in [flight1 allKeys]) {
NSDictionary *flight1Entry = [flight1 objectForKey:key];
NSString *entryId = ... | Assuming that you are using the [json framework](http://code.google.com/p/json-framework/) you could access it like this:
```
NSDictionary *jsonDict = [jsonString JSONValue];
NSString *id = [[[jsonDict objectForKey:@"Flight1"] objectForKey:@"3"] objectForKey:@"id"];
```
This assumes alot, so make use of try except ... |
94,618 | Actually I'm planning to buy multiple lens but my budget is little less I can't afford telephoto Lens so if I buy tele converter, is it possible that I can use it for all types of lens or only for specific lens | 2017/12/04 | [
"https://photo.stackexchange.com/questions/94618",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/70425/"
] | * A teleconverter is basically a magnifying lens used between the camera body and the existing lens, it is also called an Extender.
* Physical compatibility with a teleconverter depends on the lens being used and not the camera, but of course they need to be the same mount. A lens with a protruding rear element, which ... | Teleconverters can only be used with specific lenses.
Issues of fitment with the modified mount prevent them being used with Canon EF-S lenses. Even with EF lenses or third party APS-C only lenses where the mounts would couple, the arrangement of the rear lens elements in many lenses prevent them from being attached t... |
44,135,907 | I have a table in Excel for which I would like to calculate average goals scored for `n` recent games with criteria being the team.
```
Team Score
Real 4
Real 4
Barca 2
Real 3
Barca 2
Real ... | 2017/05/23 | [
"https://Stackoverflow.com/questions/44135907",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7290892/"
] | You can use this formula:
```
=AVERAGEIF($A$3:INDEX($A:$A,AGGREGATE(15,6,ROW($A$3:INDEX($A:$A,MATCH("ZZZ",$A:$A)))/($A$3:INDEX($A:$A,MATCH("ZZZ",$A:$A))=$D$2),E2)),$D$2,$B$3:INDEX($B:$B,AGGREGATE(15,6,ROW($A$3:INDEX($A:$A,MATCH("ZZZ",$A:$A)))/($A$3:INDEX($A:$A,MATCH("ZZZ",$A:$A))=$D$2),E2)))
```
It will average the ... | Append a calculation sheet, from which you read the ranges. Make those cells protected after write so it's not immediately editable by the user. |
21,424,463 | I have 2 files with many observations. I need to merge both of them vertically. For example:
Csv A contains the foll data on some people:
```
Sr.no Name, Age , Sex, Weight, Height
1. A, 12, M, 40, 4ft
2. B, 13, F, 35, 3.9ft
3. C, 15, F, 45, 4.2ft
```
Csv B co... | 2014/01/29 | [
"https://Stackoverflow.com/questions/21424463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3231320/"
] | No, you don't need to resort to mocked static classes - that's one of many options.
If you're in an embedded environment where a virtual dispatch is too much overhead, or the compiler/linker optimizer for that architecture does a really bad job, then you can try the following 3 ways to mock the platform calls.
Assume... | First of all, virtual dispatch is not that expensive, therefore you may be doing micro optimization. Even for an embedded platform.
If you really want to avoid virtual dispatch, you could use static polymorphism, with templates, and inject system calls through template parameter. Something like this :
```
struct SysC... |
3,981,267 | I have a Django application, and I'm using a shared server hosting, so I cannot change apache's config files. The only thing that I can change is the .htaccess file in my application. I also have a standard django.wsgi python file, as an entry point.
In dev environment, I'm using Django to serve the static files, but ... | 2010/10/20 | [
"https://Stackoverflow.com/questions/3981267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48721/"
] | The first step is to add just
```
AddHandler wsgi-script .wsgi
```
to your .htaccess file with nothing else to establish wsgi as the handler. This will make requests to django.wsgi and django.wsgi/whatever go to your django app.
To make the django.wsgi part of the URL go away, you will need to use mod\_rewrite. Hop... | Serve the static files from a different virtual host. |
355,233 | I like the new notification version of the review icon, which I'm guessing is still undergoing A/B testing:

It does a better job at saying "attention here, please" than the old icon which was almost indiscernible, and certainly easily ignored.
What it doesn't do i... | 2017/08/17 | [
"https://meta.stackoverflow.com/questions/355233",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/2756409/"
] | >
> Or does it light up when a particular queue is full to a certain threshold?
>
>
>
This. ~~Currently the thresholds are based on 90% of the max hourly value over the past couple weeks~~ (test is done, thresholds now aspirational - see below); we'll adjust those based on the initial test results in an effort to ... | Just in case anyone decides that the lack of any useful information behind the alert is enough of a reason to want to hide the redness altogether, @Glorfindel made a nice little script that hides exactly that part of the CSS [over here](https://meta.stackoverflow.com/a/358157/1338280).
Of course, at some point your wi... |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | [VisualSVN](http://www.visualsvn.com/server/download/) server is the easiest to get up and running | Setting up VisualSVN, like @dr suggested, would require your own windows server to install it on (ie a cheap VPS). You can get svn running on linux and linux vps are event cheaper than windows so shouldn't be too much of a financial burden if you want to go this route.
If you want pure free, then I feel unfortunatly y... |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | It is very easy to set up a simple subversion repository, especially if it just for you. Actually, if it is just for you, you may set up a svn repository on local disk and you do not have to setup any server. I do that sometimes for my own little projects, just to have the history of my work.
Assuming you are on Unix,... | You could use a distributed version control system like Mercurial or Git. With these systems you simply create a local repository to work against.
For backup/remote access you simply upload the folder to a web storage. |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | [VisualSVN](http://www.visualsvn.com/server/download/) server is the easiest to get up and running | If you have your own server, then you can simply follow a tutorial for whatever os.
I have ubuntu server and followed this tutorial <https://help.ubuntu.com/community/Subversion> |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | It is very easy to set up a simple subversion repository, especially if it just for you. Actually, if it is just for you, you may set up a svn repository on local disk and you do not have to setup any server. I do that sometimes for my own little projects, just to have the history of my work.
Assuming you are on Unix,... | Setting up VisualSVN, like @dr suggested, would require your own windows server to install it on (ie a cheap VPS). You can get svn running on linux and linux vps are event cheaper than windows so shouldn't be too much of a financial burden if you want to go this route.
If you want pure free, then I feel unfortunatly y... |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | [VisualSVN](http://www.visualsvn.com/server/download/) server is the easiest to get up and running | It is very easy to set up a simple subversion repository, especially if it just for you. Actually, if it is just for you, you may set up a svn repository on local disk and you do not have to setup any server. I do that sometimes for my own little projects, just to have the history of my work.
Assuming you are on Unix,... |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | You can't install subversion on a standard shared web hosting package. You will need either specialized hosting that explicitly provides subversion, or rent a small (possibly virtual) server and install all the software you need on that (the most flexible solution, but also requires quite a bit of knowledge to set up s... | Setting up VisualSVN, like @dr suggested, would require your own windows server to install it on (ie a cheap VPS). You can get svn running on linux and linux vps are event cheaper than windows so shouldn't be too much of a financial burden if you want to go this route.
If you want pure free, then I feel unfortunatly y... |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | [VisualSVN](http://www.visualsvn.com/server/download/) server is the easiest to get up and running | You can't install subversion on a standard shared web hosting package. You will need either specialized hosting that explicitly provides subversion, or rent a small (possibly virtual) server and install all the software you need on that (the most flexible solution, but also requires quite a bit of knowledge to set up s... |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | You can't install subversion on a standard shared web hosting package. You will need either specialized hosting that explicitly provides subversion, or rent a small (possibly virtual) server and install all the software you need on that (the most flexible solution, but also requires quite a bit of knowledge to set up s... | You could use a distributed version control system like Mercurial or Git. With these systems you simply create a local repository to work against.
For backup/remote access you simply upload the folder to a web storage. |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | If you have your own server, then you can simply follow a tutorial for whatever os.
I have ubuntu server and followed this tutorial <https://help.ubuntu.com/community/Subversion> | You could use a distributed version control system like Mercurial or Git. With these systems you simply create a local repository to work against.
For backup/remote access you simply upload the folder to a web storage. |
2,596,041 | Since a week I use *ToirtoiseSVN* and *AnkhSVN* and **GoogleCode** and **sourceforge.net** as my project hosting. For me it's frustrating to fill all this forms before create next project. So I start thinking about my own repository hosting.
Can I use simple file hosting etc. and install there software like use Google... | 2010/04/07 | [
"https://Stackoverflow.com/questions/2596041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259227/"
] | If you have your own server, then you can simply follow a tutorial for whatever os.
I have ubuntu server and followed this tutorial <https://help.ubuntu.com/community/Subversion> | Setting up VisualSVN, like @dr suggested, would require your own windows server to install it on (ie a cheap VPS). You can get svn running on linux and linux vps are event cheaper than windows so shouldn't be too much of a financial burden if you want to go this route.
If you want pure free, then I feel unfortunatly y... |
2,590,045 | The figure shows the cross section of
a swimming pool. What angle does the slopping bottom make with the horizontal?
[](https://i.stack.imgur.com/h8A8Y.png)
how can i solve that | 2018/01/03 | [
"https://math.stackexchange.com/questions/2590045",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/500795/"
] | Note that
$$\begin{align}\frac{x^{x}}{(1+x)^x}&=\left(1+\frac{1}{x}\right)^{-x}=\exp\left(-x\ln\left(1+\frac{1}{x}\right)\right)\\&=\exp\left(-x\left(\frac{1}{x}-\frac{1}{2x^2}+o(1/x^2)\right)\right)\\&=e^{-1}\exp\left(\frac{1}{2x}+o(1/x)\right)
\end{align}$$
where we used the Taylor expansion of $\ln(1+t)$ at $t=0$.
H... | Write that
$$
\frac{x^{1+x}}{\left(1+x\right)^{x}}=x\left(\frac{x}{1+x}\right)^{x}=x\left(1-\frac{1}{1+x}\right)^{x}=xe^{x \ln \left(1-\frac{1}{1+x}\right)}
$$
See if you can continue from here |
2,590,045 | The figure shows the cross section of
a swimming pool. What angle does the slopping bottom make with the horizontal?
[](https://i.stack.imgur.com/h8A8Y.png)
how can i solve that | 2018/01/03 | [
"https://math.stackexchange.com/questions/2590045",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/500795/"
] | Write that
$$
\frac{x^{1+x}}{\left(1+x\right)^{x}}=x\left(\frac{x}{1+x}\right)^{x}=x\left(1-\frac{1}{1+x}\right)^{x}=xe^{x \ln \left(1-\frac{1}{1+x}\right)}
$$
See if you can continue from here | I would write
$$\frac{x^{1+x}}{(1+x)^x}= x \frac{x^{x}}{(1+x)^x} = x \left(\frac{1}{1+1/x}\right)^x.$$
Then
$$\ln \left(\frac{1}{1+1/x}\right)^x = -x \ln(1+1/x)=-1+1/2x + o(1/x^2)$$ and
$$\frac{x^{1+x}}{(1+x)^x} = \frac{x}{e}\left(1+1/(2x) + o(1/x^2) \right)=\frac{x}{e}+1/(2e) + o(1/x).$$
Therefore
$$\lim\_{x\rightar... |
2,590,045 | The figure shows the cross section of
a swimming pool. What angle does the slopping bottom make with the horizontal?
[](https://i.stack.imgur.com/h8A8Y.png)
how can i solve that | 2018/01/03 | [
"https://math.stackexchange.com/questions/2590045",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/500795/"
] | Note that
$$\begin{align}\frac{x^{x}}{(1+x)^x}&=\left(1+\frac{1}{x}\right)^{-x}=\exp\left(-x\ln\left(1+\frac{1}{x}\right)\right)\\&=\exp\left(-x\left(\frac{1}{x}-\frac{1}{2x^2}+o(1/x^2)\right)\right)\\&=e^{-1}\exp\left(\frac{1}{2x}+o(1/x)\right)
\end{align}$$
where we used the Taylor expansion of $\ln(1+t)$ at $t=0$.
H... | One may write, as $x \to \infty$,
$$
x\ln\left(1+\frac1x \right)=x\left(\frac1x-\frac1{2x^2} +o\left(\frac1{x^2} \right)\right)
$$ and
$$
\frac{x^x}{(1+x)^x}=\left(1+\frac1x\right)^{-x}=e^{\large-x\ln\left(1+\frac{1}{x}\right)}
$$ to conclude. |
2,590,045 | The figure shows the cross section of
a swimming pool. What angle does the slopping bottom make with the horizontal?
[](https://i.stack.imgur.com/h8A8Y.png)
how can i solve that | 2018/01/03 | [
"https://math.stackexchange.com/questions/2590045",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/500795/"
] | Note that
$$\begin{align}\frac{x^{x}}{(1+x)^x}&=\left(1+\frac{1}{x}\right)^{-x}=\exp\left(-x\ln\left(1+\frac{1}{x}\right)\right)\\&=\exp\left(-x\left(\frac{1}{x}-\frac{1}{2x^2}+o(1/x^2)\right)\right)\\&=e^{-1}\exp\left(\frac{1}{2x}+o(1/x)\right)
\end{align}$$
where we used the Taylor expansion of $\ln(1+t)$ at $t=0$.
H... | I would write
$$\frac{x^{1+x}}{(1+x)^x}= x \frac{x^{x}}{(1+x)^x} = x \left(\frac{1}{1+1/x}\right)^x.$$
Then
$$\ln \left(\frac{1}{1+1/x}\right)^x = -x \ln(1+1/x)=-1+1/2x + o(1/x^2)$$ and
$$\frac{x^{1+x}}{(1+x)^x} = \frac{x}{e}\left(1+1/(2x) + o(1/x^2) \right)=\frac{x}{e}+1/(2e) + o(1/x).$$
Therefore
$$\lim\_{x\rightar... |
2,590,045 | The figure shows the cross section of
a swimming pool. What angle does the slopping bottom make with the horizontal?
[](https://i.stack.imgur.com/h8A8Y.png)
how can i solve that | 2018/01/03 | [
"https://math.stackexchange.com/questions/2590045",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/500795/"
] | One may write, as $x \to \infty$,
$$
x\ln\left(1+\frac1x \right)=x\left(\frac1x-\frac1{2x^2} +o\left(\frac1{x^2} \right)\right)
$$ and
$$
\frac{x^x}{(1+x)^x}=\left(1+\frac1x\right)^{-x}=e^{\large-x\ln\left(1+\frac{1}{x}\right)}
$$ to conclude. | I would write
$$\frac{x^{1+x}}{(1+x)^x}= x \frac{x^{x}}{(1+x)^x} = x \left(\frac{1}{1+1/x}\right)^x.$$
Then
$$\ln \left(\frac{1}{1+1/x}\right)^x = -x \ln(1+1/x)=-1+1/2x + o(1/x^2)$$ and
$$\frac{x^{1+x}}{(1+x)^x} = \frac{x}{e}\left(1+1/(2x) + o(1/x^2) \right)=\frac{x}{e}+1/(2e) + o(1/x).$$
Therefore
$$\lim\_{x\rightar... |
1,030,941 | I can't find my error in the following code. When it is run a type error is given for line: *cur.executemany(sql % itr.next())* => '**function takes exactly 2 arguments (1 given)**,
```
import sqlite3
con = sqlite3.connect('test.sqlite')
cur = con.cursor()
cur.execute("create table IF NOT EXISTS fred (dat)")
def newS... | 2009/06/23 | [
"https://Stackoverflow.com/questions/1030941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/63109/"
] | See [the sqlite3 documentation](http://docs.python.org/library/sqlite3.html#sqlite3.Cursor.executemany). As you'll see, the `Cursor.executemany` method expects two parameters. Perhaps you mistook it for the `Connection.executemany` method which only takes one? | Perhaps you meant:
>
> cur.executemany(sql, itr)
>
>
>
also note that the print statement consumes one item from the iterator. |
1,030,941 | I can't find my error in the following code. When it is run a type error is given for line: *cur.executemany(sql % itr.next())* => '**function takes exactly 2 arguments (1 given)**,
```
import sqlite3
con = sqlite3.connect('test.sqlite')
cur = con.cursor()
cur.execute("create table IF NOT EXISTS fred (dat)")
def newS... | 2009/06/23 | [
"https://Stackoverflow.com/questions/1030941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/63109/"
] | Like it says, executemany takes two arguments. Instead of interpolating the string values yourself with the %, you should pass both the sql and the values and let the db adapter quote them.
```
sql = " '''insert into %s (%s) values(%%s)'''," % (className, colNames)
cur.executemany(sql, itr.next())
``` | Perhaps you meant:
>
> cur.executemany(sql, itr)
>
>
>
also note that the print statement consumes one item from the iterator. |
1,030,941 | I can't find my error in the following code. When it is run a type error is given for line: *cur.executemany(sql % itr.next())* => '**function takes exactly 2 arguments (1 given)**,
```
import sqlite3
con = sqlite3.connect('test.sqlite')
cur = con.cursor()
cur.execute("create table IF NOT EXISTS fred (dat)")
def newS... | 2009/06/23 | [
"https://Stackoverflow.com/questions/1030941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/63109/"
] | Thank you all for your answers. After pushing and poking for several days and using your guidance the following works. I'm guilty of overthinking my problem. Didn't need an iter() conversion. The objData variable is a list and already an iterable! This was one of the reasons the code didn't work.
```
import sqlite3
co... | Perhaps you meant:
>
> cur.executemany(sql, itr)
>
>
>
also note that the print statement consumes one item from the iterator. |
38,318,401 | I have two tables that are layed out inline so that the right side of Table 1 touches the left side of table 2, creating the illusion that they are one table.
The reason why is that on mobile device, the tables are to be displayed one under the other so users don't have to scroll left-right while reading.
That said, ... | 2016/07/12 | [
"https://Stackoverflow.com/questions/38318401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/910737/"
] | Keep in mind that borders add together so when placing the tables next to each other 2px + 2px = 4px
Step 1: Remove the HTML you don't need
Step 2: Simplify the CSS and remove the right border of the left table when they are placed next to eachother.
Note I have floated the tables so you dont have to hack the closin... | Firstly, assigning a width to your p tags will fix your inconsistent width.
Second, removing the 1 px border around the tables, which adds onto the border around each cell, should fix your inconsistent border thickness. |
58,740,645 | i have a list of `cards` to be displayed in a `component`. On each card there is a `cover-image` whose url is coming from server and there is a `ngFor` in my `component.html` like this
```
<div [style.background-image]="'url('+row.companyId?.coverUrl+')'" class="img-area">
</div>
<div class="card-content-area">
<p ... | 2019/11/07 | [
"https://Stackoverflow.com/questions/58740645",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8152794/"
] | I would try add some height and width to my div
try with random values:
```
.img-area{
height:50px;
width:50px;
}
``` | Can you try with ngStyle
```
<div [ngStyle]="{'background-image': 'url(' + row.companyId?.coverUrl + ')'}" class="img-area">
``` |
50,536,185 | I am making my first ionic app. I want to include an [Action sheet](https://ionicframework.com/docs/components/#action-sheets). I saw the [demo source](https://github.com/ionic-team/ionic-preview-app/tree/master/src/pages/action-sheets/basic). It has three files, `.html`, `.css` and a .ts file. How and where do we incl... | 2018/05/25 | [
"https://Stackoverflow.com/questions/50536185",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Why you just want to add a .ts file.
You can make a page using the Ionic Cli "ionic generate page pageName" and in there you can have actionSheet or whatever you want.
After running the command, ow you can see the page here:
src/pages/pageName
It will create a page where you will see another html, css and ts file
In ... | You can make a file page.ts file and you can call class of page.ts in where you want |
62,336,426 | I am a novice web application developer and I am learning by developing a web app where each successfully registered user will login to his database. all the users have **the same database schema** and there comes a time where I need to update the schema because of a feature I've added.
I am trying to find away to upd... | 2020/06/12 | [
"https://Stackoverflow.com/questions/62336426",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2785266/"
] | >
> I need to delete rows from both tables if A.itemID does not exist in table B
>
>
>
If the `itemId` does not match, then there is no row in `B`. So, you just need to delete in `A`. So:
```
DELETE a FROM a
WHERE NOT EXISTS (SELECT 1
FROM B b
WHERE b.cid = a.itemID... | You could also express your logic using a delete anti-join:
```
DELETE a
FROM A a
LEFT JOIN B b ON b.cid = a.itemID
WHERE b.cid IS NULL;
``` |
62,336,426 | I am a novice web application developer and I am learning by developing a web app where each successfully registered user will login to his database. all the users have **the same database schema** and there comes a time where I need to update the schema because of a feature I've added.
I am trying to find away to upd... | 2020/06/12 | [
"https://Stackoverflow.com/questions/62336426",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2785266/"
] | >
> I need to delete rows from both tables if A.itemID does not exist in table B
>
>
>
If the `itemId` does not match, then there is no row in `B`. So, you just need to delete in `A`. So:
```
DELETE a FROM a
WHERE NOT EXISTS (SELECT 1
FROM B b
WHERE b.cid = a.itemID... | To add to Gordon Linoff's answer (which helped me get to my solution) the following shows how to view the records that will be deleted before doing it:
To view the records that WILL be affected:
```
SELECT TableA.ColumnName FROM TableA
WHERE NOT EXISTS
(SELECT 1 FROM TableB WHERE TableB.ColumnName = TableA.ColumnNam... |
89,401 | In confirmatory analysis do you basically just test hypotheses? Then in exploratory analysis you try to generate hypotheses? In general, I know that you can first do exploratory analysis to form hypotheses and then confirmatory analysis to test them. But can you first do confirmatory analysis and then do exploratory an... | 2014/03/10 | [
"https://stats.stackexchange.com/questions/89401",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/41612/"
] | First EDA will be done on the data set to understand the data & prepare the hypothesis, then confirmatory analysis is done. In EDA, most of the time we do visual analysis. Whereas in Confirmatory analysis we take probability models into consideration.
Comparison from [here](http://www.geog.ucsb.edu/~joel/g210_w07/lect... | I don't think there is a set recipe for when to perform which. You have to use the tools required for the task, whether they are most useful for an exploratory analysis or testing hypotheses. It is likely you will begin with hypotheses (that's why you collected this data in the first place right?) and then test them. Y... |
63,999,342 | So I have a little project, in it, there's the possibility to upload banners images to be shown on the main page. All the stuff related to the DB are already created and the option to create a banner is working, it creates the banner and then stores the image on the DB for use later. Now I'm trying to work on an edit f... | 2020/09/21 | [
"https://Stackoverflow.com/questions/63999342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14262789/"
] | The `$banner` variable is not a Model instance, it is a Collection.
Adjust your controller to pass this to the view instead of dong the query in the view:
```
public function edit($id)
{
$banner = Banner::findOrFail($id);
return view('admin.edit-banners', ['banner' => $banner]);
}
```
You could also use Ro... | If you include `$id` in your function declaration then when you call the `route` helper it expects you to give it an `id` parameter. Try with
```
<form class="card-box" action="{{ route('banner.update',['id' => $id]) }}">
```
You should be able to retrieve the form data just fine form the `$request` variable. More i... |
63,999,342 | So I have a little project, in it, there's the possibility to upload banners images to be shown on the main page. All the stuff related to the DB are already created and the option to create a banner is working, it creates the banner and then stores the image on the DB for use later. Now I'm trying to work on an edit f... | 2020/09/21 | [
"https://Stackoverflow.com/questions/63999342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14262789/"
] | The `$banner` variable is not a Model instance, it is a Collection.
Adjust your controller to pass this to the view instead of dong the query in the view:
```
public function edit($id)
{
$banner = Banner::findOrFail($id);
return view('admin.edit-banners', ['banner' => $banner]);
}
```
You could also use Ro... | The code below should be the error source. $banner variable then is an array but the update function accept object or id.
```
@php
use\App\Banner;
$banner = Banner::where('id','=',$id)->get();
@endphp
```
You should try to replay this code by this one...
```
@php
use\App\Banner;
$banner = Banne... |
123,398 | My agency has been developing an application that they're hoping will bring in a lot of revenue and they're going about it the wrong way. The agency usually only deals with wordpress and drupal type sites. Our typical client approaches us for 3-6 months of work on a custom theme and then follows up after that with main... | 2018/11/25 | [
"https://workplace.stackexchange.com/questions/123398",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/94952/"
] | Build a consensus amongst the technical team. Take what you've written here and bring it to the lead dev of the other team and see what they say. Preface it with "We can do it, but I have some reservations" and lay out your concerns.
If you get the other person to agree with you, you both bring it to the boss present... | You don't get involved with another teams project over which you have no control in terms of enforcing what is used and how.
If they request something, you refer them to decision makers who can then ask you if they want. If they do then this is the point at which you treat it as your teams project and let them know wh... |
123,398 | My agency has been developing an application that they're hoping will bring in a lot of revenue and they're going about it the wrong way. The agency usually only deals with wordpress and drupal type sites. Our typical client approaches us for 3-6 months of work on a custom theme and then follows up after that with main... | 2018/11/25 | [
"https://workplace.stackexchange.com/questions/123398",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/94952/"
] | Build a consensus amongst the technical team. Take what you've written here and bring it to the lead dev of the other team and see what they say. Preface it with "We can do it, but I have some reservations" and lay out your concerns.
If you get the other person to agree with you, you both bring it to the boss present... | If the company culture allows it, I would have an open chat with the decision maker and, without slandering the other team, explain that you reviewed the requirements, and to apply your better performing solution the most efficient way is to recreate the other project from scratch. Nobody wants infighting or to make an... |
123,398 | My agency has been developing an application that they're hoping will bring in a lot of revenue and they're going about it the wrong way. The agency usually only deals with wordpress and drupal type sites. Our typical client approaches us for 3-6 months of work on a custom theme and then follows up after that with main... | 2018/11/25 | [
"https://workplace.stackexchange.com/questions/123398",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/94952/"
] | Build a consensus amongst the technical team. Take what you've written here and bring it to the lead dev of the other team and see what they say. Preface it with "We can do it, but I have some reservations" and lay out your concerns.
If you get the other person to agree with you, you both bring it to the boss present... | Another possible outcome is that the manager decides the feature isn't important after all, or not important enough to rewrite what they have. You mention it will require great expense, but not how much it will help out. |
123,398 | My agency has been developing an application that they're hoping will bring in a lot of revenue and they're going about it the wrong way. The agency usually only deals with wordpress and drupal type sites. Our typical client approaches us for 3-6 months of work on a custom theme and then follows up after that with main... | 2018/11/25 | [
"https://workplace.stackexchange.com/questions/123398",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/94952/"
] | You don't get involved with another teams project over which you have no control in terms of enforcing what is used and how.
If they request something, you refer them to decision makers who can then ask you if they want. If they do then this is the point at which you treat it as your teams project and let them know wh... | If the company culture allows it, I would have an open chat with the decision maker and, without slandering the other team, explain that you reviewed the requirements, and to apply your better performing solution the most efficient way is to recreate the other project from scratch. Nobody wants infighting or to make an... |
123,398 | My agency has been developing an application that they're hoping will bring in a lot of revenue and they're going about it the wrong way. The agency usually only deals with wordpress and drupal type sites. Our typical client approaches us for 3-6 months of work on a custom theme and then follows up after that with main... | 2018/11/25 | [
"https://workplace.stackexchange.com/questions/123398",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/94952/"
] | You don't get involved with another teams project over which you have no control in terms of enforcing what is used and how.
If they request something, you refer them to decision makers who can then ask you if they want. If they do then this is the point at which you treat it as your teams project and let them know wh... | Another possible outcome is that the manager decides the feature isn't important after all, or not important enough to rewrite what they have. You mention it will require great expense, but not how much it will help out. |
7,086 | I 'm new to Elementary OS , I'm adapting to the desktop and to their way of seeing things "I have a few questions . :
One is whether there is any way to put a new folder in the area of personal directories Files Pantheon [](https://i.stack.imgur.com/GB... | 2016/07/28 | [
"https://elementaryos.stackexchange.com/questions/7086",
"https://elementaryos.stackexchange.com",
"https://elementaryos.stackexchange.com/users/5691/"
] | Click on "Carpeta Personal", create your Work file in Home (or wherever you want). Then right-click that new file and left click on Bookmark (or for you it's probably "Marcador" or something like that). Then it should be available on the left-hand panel.
I made a little slideshow for you: <https://goo.gl/photos/Zvk4Kb... | Right click on the folder you want to add and left click 'bookmark' in the menu that appears. |
7,086 | I 'm new to Elementary OS , I'm adapting to the desktop and to their way of seeing things "I have a few questions . :
One is whether there is any way to put a new folder in the area of personal directories Files Pantheon [](https://i.stack.imgur.com/GB... | 2016/07/28 | [
"https://elementaryos.stackexchange.com/questions/7086",
"https://elementaryos.stackexchange.com",
"https://elementaryos.stackexchange.com/users/5691/"
] | You can drag and drop the folder too. Just look for the cursor to have a green plus sign and a line to appear indicating where in the list the folder will appear. | Right click on the folder you want to add and left click 'bookmark' in the menu that appears. |
7,086 | I 'm new to Elementary OS , I'm adapting to the desktop and to their way of seeing things "I have a few questions . :
One is whether there is any way to put a new folder in the area of personal directories Files Pantheon [](https://i.stack.imgur.com/GB... | 2016/07/28 | [
"https://elementaryos.stackexchange.com/questions/7086",
"https://elementaryos.stackexchange.com",
"https://elementaryos.stackexchange.com/users/5691/"
] | Click on "Carpeta Personal", create your Work file in Home (or wherever you want). Then right-click that new file and left click on Bookmark (or for you it's probably "Marcador" or something like that). Then it should be available on the left-hand panel.
I made a little slideshow for you: <https://goo.gl/photos/Zvk4Kb... | You can drag and drop the folder too. Just look for the cursor to have a green plus sign and a line to appear indicating where in the list the folder will appear. |
11,258,861 | I have a contact request form which uses telerik:RadTextBoxes.
The whole of the form looks good and everything's where it's meant to be in every browser, apart from Chrome, where one of the input boxes is not picking up on the line breaks!
Is there a way I could maybe do a separate style sheet for Chrome, or a tric... | 2012/06/29 | [
"https://Stackoverflow.com/questions/11258861",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1485882/"
] | As i proposed in the comments above, this seems the way to go, as stated here:
<http://doctrine-orm.readthedocs.org/en/2.0.x/cookbook/working-with-datetime.html>
So try like this:
```
$app['dbs']['main']->update('phonebook', array(
'mediated' => new \DateTime("now")
), array(
'telephone' => $telephone_int... | I stumbled over the same problem. As there's no much and no good documentation for DBAL itself, I'm going to post my solution.
There's a last parameter which specifies the type (in the order of the data and identifcation array *merged*; as if they were in the same array):
```
$app['dbs']['main']->update('phonebook', ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.