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
28,385,804
I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now. Her...
2015/02/07
[ "https://Stackoverflow.com/questions/28385804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428400/" ]
In your save path you need to set up a location folder. Use `'files'` as session driver preferred. As like below I have set up a cache to store sessions in BASE PATH which is setting folder. Make sure you have auto loaded sessions and `$config['encryption_key'] = ''` add key. You can set up a database sessions but thi...
In application/config/config.php set this value: ``` $config['sess_save_path'] = sys_get_temp_dir(); ```
28,385,804
I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now. Her...
2015/02/07
[ "https://Stackoverflow.com/questions/28385804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428400/" ]
In your save path you need to set up a location folder. Use `'files'` as session driver preferred. As like below I have set up a cache to store sessions in BASE PATH which is setting folder. Make sure you have auto loaded sessions and `$config['encryption_key'] = ''` add key. You can set up a database sessions but thi...
I have used 2 different values and somehow they worked, it depends on the version of Centos: For Centos 6.X I used: In application/config/config.php set this value: $config['sess\_save\_path'] = NULL; For Centos 7.X I used: $config['sess\_save\_path'] = sys\_get\_temp\_dir(); it will not work if you move your app...
28,385,804
I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now. Her...
2015/02/07
[ "https://Stackoverflow.com/questions/28385804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428400/" ]
In application/config/config.php set this value: ``` $config['sess_save_path'] = sys_get_temp_dir(); ```
I use this code it work. ``` if (version_compare(PHP_VERSION, '5.4.0', '<')) { if(session_id() == '') session_start(); } else { if (session_status() == PHP_SESSION_NONE) session_start(); } ```
28,385,804
I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now. Her...
2015/02/07
[ "https://Stackoverflow.com/questions/28385804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428400/" ]
In application/config/config.php set this value: ``` $config['sess_save_path'] = sys_get_temp_dir(); ```
I have used 2 different values and somehow they worked, it depends on the version of Centos: For Centos 6.X I used: In application/config/config.php set this value: $config['sess\_save\_path'] = NULL; For Centos 7.X I used: $config['sess\_save\_path'] = sys\_get\_temp\_dir(); it will not work if you move your app...
47,930,329
I'm a novice Excel macro writer and have produced the following code via searching/using forum posts on similar things. What I'm trying to do is this: I have a big data set, with a particular field in it that contains text strings. It also has a new field I've added for profit centre, which is currently blank. I then h...
2017/12/21
[ "https://Stackoverflow.com/questions/47930329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9128192/" ]
It’s hexadecimal floating-point as supported by C and [more recently C++](http://wg21.link/p0245). The significand is given in hexadecimal, and the exponent is given in decimal and interpreted with respect to base 2. It can exactly represent all floating-point numbers except NaNs. The text format adopted this in [t...
It is hexadecimal float notation, as inspired by C and other languages. The respective specification can be found [here](https://webassembly.github.io/spec/core/text/values.html#floating-point).
18,035,072
I have a text file with some configuration value. There a comment starts with a # I am trying to find a regular expression pattern that will find out all the lines that start with a # So, sample file: ``` 1st line #test line this line #new line aaaa #aaaa bbbbbbbbbbb# cccccccccccc #ddddddddd ``` I want to find ``...
2013/08/03
[ "https://Stackoverflow.com/questions/18035072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1644094/" ]
You forgot the multiline modifier (and you should *not* use the singleline modifier; also the case-insensitive modifier is unnecessary as well as the ungreedy modifier): ``` preg_match_all("/^#(.*)$/m",$text,$m); ``` **Explanation:** * `/m` allows the `^` and `$` to match at the start/end of lines, not just the ent...
You can simply write: ``` preg_match_all('~^#.*~m', $text, $m); ``` since the quantifier is greedy by default and the dot doesn't match newlines by default, you will obtain what you want.
45,579,156
I created a CSV file and I saved it as (CSV UTF8 Comma delimited) but I got message > > Some features in your workbook might be lost if you save it as CSV UTF-8 (Comma delimited). Do you want to keep using the format? > > > [![enter image description here](https://i.stack.imgur.com/qWLcH.png)](https://i.stack.im...
2017/08/08
[ "https://Stackoverflow.com/questions/45579156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3003810/" ]
Load the image before `$.ajax()` call. Toggle the CSS `display` property of the `<img>` element at `beforeSend` function, instead of changing the `.src` of the `<img>` element. ``` jQuery.ajax({ url: url, type: 'GET', timeout: 20000, beforeSend: function() { console.log(1); document.get...
Fetching the image by changing "src" is asynchronous, I think you can just set the src when the page is load but make the image element invisible. And set the image visible when ajax begin.
45,579,156
I created a CSV file and I saved it as (CSV UTF8 Comma delimited) but I got message > > Some features in your workbook might be lost if you save it as CSV UTF-8 (Comma delimited). Do you want to keep using the format? > > > [![enter image description here](https://i.stack.imgur.com/qWLcH.png)](https://i.stack.im...
2017/08/08
[ "https://Stackoverflow.com/questions/45579156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3003810/" ]
Load the image before `$.ajax()` call. Toggle the CSS `display` property of the `<img>` element at `beforeSend` function, instead of changing the `.src` of the `<img>` element. ``` jQuery.ajax({ url: url, type: 'GET', timeout: 20000, beforeSend: function() { console.log(1); document.get...
If you change the src attribute, the browser must complete a bunch of things like look for the image in its cache, probably re-request the image, parse, a.s.o. Second, your JS code shares one thread with a lot of other things. Browsers tend to internally cache CSS assignments and execute the following JS code first, ...
46,118,474
I have a camera preview at the top of the screen with a specific height and width. I am using front camera to generate the preview. The camera is working but the issue is the preview shows the bottom part of what the camera sees. [![Check out the screenshot](https://i.stack.imgur.com/ExWoC.png)](https://i.stack.imgur...
2017/09/08
[ "https://Stackoverflow.com/questions/46118474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3190368/" ]
Use a negated character class: ``` src=([^\s]+) ```
Here is a regex that will get everything till the closing quote or whitespace: ``` /src="(.*?)(?:"|\s)/ ``` ```js const sourceUnclosed = '<img src="https://res.cloudinary.com/cot/image/upload/v1xxxx878705/cz3dbifffcb6ysto7cbp.jpg layout="responsive" width="600" height="auto"/>', sourceClosed = '<img src="https...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
Strictly speaking you're right. It's sometimes difficult to explain clearly what is a *parameter* and what is a *variable*. When you write $f(x;a,b,c)$, there is no mathematical difference between $x$ and $a$ for example, they're both *variables* for the function $f$. I think the real difference is in how we interpret ...
The area where I am used to seeing parameterizations is when considering curves and similar geometric objects. Consider a curve drawn in $\mathbb{R}^3$, this is just a set of points and initially is not a function of any kind. But we can in fact make it into the image of a function by defining a mapping $f:[0,1] \right...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
Strictly speaking you're right. It's sometimes difficult to explain clearly what is a *parameter* and what is a *variable*. When you write $f(x;a,b,c)$, there is no mathematical difference between $x$ and $a$ for example, they're both *variables* for the function $f$. I think the real difference is in how we interpret ...
In fact there is a formal distinction between parameter and argument, which captures our subjective view. Let $P$ be the parameter space (set of growth rates), $X$ the domain (set of ages) and $Y$ the codomain (set of heights). A family of functions from $X$ to $Y$ parameterised by $P$ is formally a function $f: P \ri...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
Strictly speaking you're right. It's sometimes difficult to explain clearly what is a *parameter* and what is a *variable*. When you write $f(x;a,b,c)$, there is no mathematical difference between $x$ and $a$ for example, they're both *variables* for the function $f$. I think the real difference is in how we interpret ...
While the answers already given are correct, I suspect that they may be bringing in terminology and notations you are unfamiliar with. If so, let me try to recast the answer more simply. You are correct that $f(x; a, b, c)$ is the exact same thing as $f(x, a, b, c)$. But the difference is in how we are using $x$ vs ho...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
Strictly speaking you're right. It's sometimes difficult to explain clearly what is a *parameter* and what is a *variable*. When you write $f(x;a,b,c)$, there is no mathematical difference between $x$ and $a$ for example, they're both *variables* for the function $f$. I think the real difference is in how we interpret ...
Think to something like this: $f(x;\sigma) = e^{-x^2/\sigma^2}$. If you read for example "the derivative of $f$" probably you immediately undestand that we are speaking of $\partial f/\partial x$ because you recognize $f$ as a function of $x$, whose definition contains some $\sigma$ which is not a "variable". Otherwi...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
In fact there is a formal distinction between parameter and argument, which captures our subjective view. Let $P$ be the parameter space (set of growth rates), $X$ the domain (set of ages) and $Y$ the codomain (set of heights). A family of functions from $X$ to $Y$ parameterised by $P$ is formally a function $f: P \ri...
The area where I am used to seeing parameterizations is when considering curves and similar geometric objects. Consider a curve drawn in $\mathbb{R}^3$, this is just a set of points and initially is not a function of any kind. But we can in fact make it into the image of a function by defining a mapping $f:[0,1] \right...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
While the answers already given are correct, I suspect that they may be bringing in terminology and notations you are unfamiliar with. If so, let me try to recast the answer more simply. You are correct that $f(x; a, b, c)$ is the exact same thing as $f(x, a, b, c)$. But the difference is in how we are using $x$ vs ho...
The area where I am used to seeing parameterizations is when considering curves and similar geometric objects. Consider a curve drawn in $\mathbb{R}^3$, this is just a set of points and initially is not a function of any kind. But we can in fact make it into the image of a function by defining a mapping $f:[0,1] \right...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
Think to something like this: $f(x;\sigma) = e^{-x^2/\sigma^2}$. If you read for example "the derivative of $f$" probably you immediately undestand that we are speaking of $\partial f/\partial x$ because you recognize $f$ as a function of $x$, whose definition contains some $\sigma$ which is not a "variable". Otherwi...
The area where I am used to seeing parameterizations is when considering curves and similar geometric objects. Consider a curve drawn in $\mathbb{R}^3$, this is just a set of points and initially is not a function of any kind. But we can in fact make it into the image of a function by defining a mapping $f:[0,1] \right...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
While the answers already given are correct, I suspect that they may be bringing in terminology and notations you are unfamiliar with. If so, let me try to recast the answer more simply. You are correct that $f(x; a, b, c)$ is the exact same thing as $f(x, a, b, c)$. But the difference is in how we are using $x$ vs ho...
In fact there is a formal distinction between parameter and argument, which captures our subjective view. Let $P$ be the parameter space (set of growth rates), $X$ the domain (set of ages) and $Y$ the codomain (set of heights). A family of functions from $X$ to $Y$ parameterised by $P$ is formally a function $f: P \ri...
1,678,263
I'm studying statistics, and in a lot of textbooks, the regression formulas always refers to the functions themselves as f(x) parameterized by a,b,c or something. And they are often written $f(x; a,b,c)$, why can't we just write $f(x, a, b, c)$? I would like to know perhaps the history of how this came about, and why ...
2016/03/01
[ "https://math.stackexchange.com/questions/1678263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307335/" ]
While the answers already given are correct, I suspect that they may be bringing in terminology and notations you are unfamiliar with. If so, let me try to recast the answer more simply. You are correct that $f(x; a, b, c)$ is the exact same thing as $f(x, a, b, c)$. But the difference is in how we are using $x$ vs ho...
Think to something like this: $f(x;\sigma) = e^{-x^2/\sigma^2}$. If you read for example "the derivative of $f$" probably you immediately undestand that we are speaking of $\partial f/\partial x$ because you recognize $f$ as a function of $x$, whose definition contains some $\sigma$ which is not a "variable". Otherwi...
24,928,428
I've to calculate the différence between two Dates : TODAY() and DATE\_DEB\_VAC. With Oracle, it's kinda easy : `TODAY()-DATE_DEB_VAC` -> give the number of day between those 2 date. But I've to do it with in an ETL (GENIO). I've a column to stock it like that : `NUMBER_DAY_DIFF (NUMBER 10) = TODAY()-DATE_DEB_VAC`. Bu...
2014/07/24
[ "https://Stackoverflow.com/questions/24928428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2695735/" ]
You can use `SkipWhile(l => !l.TrimStart().StartsWith("Field Name")).Skip(1)`: ``` Dictionary<string, string> allFieldLengths = File.ReadLines("path") .SkipWhile(l => !l.TrimStart().StartsWith("Field Name")) // skips lines that don't start with "Field Name" .Skip(1) // go ...
You can use `String.StartsWith()` to detect "FieldName". Then `String.Split()` with a parameter of null to split by whitespace. This will get you your fieldname and length strings.
24,928,428
I've to calculate the différence between two Dates : TODAY() and DATE\_DEB\_VAC. With Oracle, it's kinda easy : `TODAY()-DATE_DEB_VAC` -> give the number of day between those 2 date. But I've to do it with in an ETL (GENIO). I've a column to stock it like that : `NUMBER_DAY_DIFF (NUMBER 10) = TODAY()-DATE_DEB_VAC`. Bu...
2014/07/24
[ "https://Stackoverflow.com/questions/24928428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2695735/" ]
You can use `SkipWhile(l => !l.TrimStart().StartsWith("Field Name")).Skip(1)`: ``` Dictionary<string, string> allFieldLengths = File.ReadLines("path") .SkipWhile(l => !l.TrimStart().StartsWith("Field Name")) // skips lines that don't start with "Field Name" .Skip(1) // go ...
Based on the assumption that the position of the header line is fixed, we may consider actual key-value pairs to start from the 9th line. Then, using the `ReadAllLines` method to return a `String` array from the file, we just start processing from index 8 onwards: ``` string[] lines = File.ReadAllLines(filepath); ...
24,928,428
I've to calculate the différence between two Dates : TODAY() and DATE\_DEB\_VAC. With Oracle, it's kinda easy : `TODAY()-DATE_DEB_VAC` -> give the number of day between those 2 date. But I've to do it with in an ETL (GENIO). I've a column to stock it like that : `NUMBER_DAY_DIFF (NUMBER 10) = TODAY()-DATE_DEB_VAC`. Bu...
2014/07/24
[ "https://Stackoverflow.com/questions/24928428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2695735/" ]
Based on the assumption that the position of the header line is fixed, we may consider actual key-value pairs to start from the 9th line. Then, using the `ReadAllLines` method to return a `String` array from the file, we just start processing from index 8 onwards: ``` string[] lines = File.ReadAllLines(filepath); ...
You can use `String.StartsWith()` to detect "FieldName". Then `String.Split()` with a parameter of null to split by whitespace. This will get you your fieldname and length strings.
29,558,851
I'm trying to map a bidirectional ManyToMany relationship between the class Problem and the class Domain. Therefore the persistency unit creates a join table in the database, but it seems no entry pops up in the database. Here's some code: The class Problem ```html package domain; import java.io.Serializable; im...
2015/04/10
[ "https://Stackoverflow.com/questions/29558851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2542302/" ]
The **[sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)** method will do the work for you. This code sorts the array, first by `cod_nivel`, then by `cod_modelo`. The conditional operator: ``` condition ? expr1 : expr2 ``` … is used to compare the array's elements ...
``` var array = [{"cod_nivel":"INC2","cod_modelo":"D"}, {"cod_nivel":"INC2","cod_modelo":"B"}, {"cod_nivel":"PRIM","cod_modelo":"B"}, {"cod_nivel":"PRIM","cod_modelo":"D"}, {"cod_nivel":"PRIM2","cod_modelo":"B"}, {"cod_nivel":"PRIM2","cod_modelo":"D"}, {"cod_nivel":"PRIM2","cod_m...
29,558,851
I'm trying to map a bidirectional ManyToMany relationship between the class Problem and the class Domain. Therefore the persistency unit creates a join table in the database, but it seems no entry pops up in the database. Here's some code: The class Problem ```html package domain; import java.io.Serializable; im...
2015/04/10
[ "https://Stackoverflow.com/questions/29558851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2542302/" ]
The **[sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)** method will do the work for you. This code sorts the array, first by `cod_nivel`, then by `cod_modelo`. The conditional operator: ``` condition ? expr1 : expr2 ``` … is used to compare the array's elements ...
If there is no restriction of using a external javascript library, you can use **Underscore js**, this library is specifically designed for working with javascript objects and collections. you can take the following example for the solution ``` var stooges = [{name: 'moe', age: 40}, {name: 'larry', age: 50}, {name: '...
29,558,851
I'm trying to map a bidirectional ManyToMany relationship between the class Problem and the class Domain. Therefore the persistency unit creates a join table in the database, but it seems no entry pops up in the database. Here's some code: The class Problem ```html package domain; import java.io.Serializable; im...
2015/04/10
[ "https://Stackoverflow.com/questions/29558851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2542302/" ]
``` var array = [{"cod_nivel":"INC2","cod_modelo":"D"}, {"cod_nivel":"INC2","cod_modelo":"B"}, {"cod_nivel":"PRIM","cod_modelo":"B"}, {"cod_nivel":"PRIM","cod_modelo":"D"}, {"cod_nivel":"PRIM2","cod_modelo":"B"}, {"cod_nivel":"PRIM2","cod_modelo":"D"}, {"cod_nivel":"PRIM2","cod_m...
If there is no restriction of using a external javascript library, you can use **Underscore js**, this library is specifically designed for working with javascript objects and collections. you can take the following example for the solution ``` var stooges = [{name: 'moe', age: 40}, {name: 'larry', age: 50}, {name: '...
42,547,681
I have a set of array data i need to find out the match word from that values of array ``` $my_word = 'mbusa.com'; $array_data = array:6 [ 0 => array:2 [ 0 => "Mercedes-Benz Luxury Cars: Sedans, SUVs, Coupes and Wagons" 1 => "/l/?kh=-1&uddg=https%3A%2F%2Fwww.mbusa.com%2Fmercedes%2Findex" ] 1 => array:2 ...
2017/03/02
[ "https://Stackoverflow.com/questions/42547681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5367683/" ]
This way you can do this: ``` $count = 0; for ($i = 0; $i < count($array_data); $i++) { for ($j = 0; $j < count($array_data[$i]); $j++) { if (strpos($array_data[$i][$j], 'mbusa') !== false) { echo "Found at Postion ".$j."<br>"; echo $count++; } } } echo "Found " . $coun...
You can use the strpos function which is used to find the occurrence of one string inside other: ``` $text = "/l/?kh=-1&uddg=https%3A%2F%2Fwww.mbusa.com%2Fmercedes%2Findex"; if (strpos($text, 'mbusa') !== false) { echo 'true'; } ```
42,547,681
I have a set of array data i need to find out the match word from that values of array ``` $my_word = 'mbusa.com'; $array_data = array:6 [ 0 => array:2 [ 0 => "Mercedes-Benz Luxury Cars: Sedans, SUVs, Coupes and Wagons" 1 => "/l/?kh=-1&uddg=https%3A%2F%2Fwww.mbusa.com%2Fmercedes%2Findex" ] 1 => array:2 ...
2017/03/02
[ "https://Stackoverflow.com/questions/42547681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5367683/" ]
You can do it like below:- ``` foreach ($array_data as $key=>$val){ foreach ($val as $key1=>$v){ if(strpos($v,$my_word)!==false){ echo 'match position is $array_data['.$key."][".$key1."]"; echo PHP_EOL; } } } ``` Output:- <https://eval.in/745846>
You can use the strpos function which is used to find the occurrence of one string inside other: ``` $text = "/l/?kh=-1&uddg=https%3A%2F%2Fwww.mbusa.com%2Fmercedes%2Findex"; if (strpos($text, 'mbusa') !== false) { echo 'true'; } ```
42,547,681
I have a set of array data i need to find out the match word from that values of array ``` $my_word = 'mbusa.com'; $array_data = array:6 [ 0 => array:2 [ 0 => "Mercedes-Benz Luxury Cars: Sedans, SUVs, Coupes and Wagons" 1 => "/l/?kh=-1&uddg=https%3A%2F%2Fwww.mbusa.com%2Fmercedes%2Findex" ] 1 => array:2 ...
2017/03/02
[ "https://Stackoverflow.com/questions/42547681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5367683/" ]
You can do it like below:- ``` foreach ($array_data as $key=>$val){ foreach ($val as $key1=>$v){ if(strpos($v,$my_word)!==false){ echo 'match position is $array_data['.$key."][".$key1."]"; echo PHP_EOL; } } } ``` Output:- <https://eval.in/745846>
This way you can do this: ``` $count = 0; for ($i = 0; $i < count($array_data); $i++) { for ($j = 0; $j < count($array_data[$i]); $j++) { if (strpos($array_data[$i][$j], 'mbusa') !== false) { echo "Found at Postion ".$j."<br>"; echo $count++; } } } echo "Found " . $coun...
28,577,742
I have following code. **index.php** ``` <!DOCTYPE html> <html> <title>File Sharing</title> <body> <h1>File Sharing</h1><br/><br/> <form action="upload.php" method="get" enctype="multipart/form-data"> Select File to Share: <input type="file" name="file" id="file"/> <button ...
2015/02/18
[ "https://Stackoverflow.com/questions/28577742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4437866/" ]
You are using the wrong method for your form. You can't "GET" data to your server. You must "POST" it. <http://bytes.com/topic/php/insights/664241-using-html-forms-pass-data-php> Scott
My friend you should replace your GET method with POST otherwise code working fine ``` <form action="upload.php" method="post" enctype="multipart/form-data"> Select File to Share: <input type="file" name="file" id="file"/> <button type="submit" name="submit" value="submit" id="submit" >Share</...
91,833
I have a website running and have added an extra link on the website that links to a WordPress site. Both sites are hosted on the same domain. Here's my problem; The domain: `www.example.com` The Wordpress blog: `www.blog.example.com` Mmy gut is telling my that for best SEO practices I need the domain to be: ...
2016/03/30
[ "https://webmasters.stackexchange.com/questions/91833", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/62424/" ]
Regarding Comment Sections: --------------------------- > > Search terms used: comments section seo > > > There are several considerations that need to be made before comment sections and ratings are to be implemented. > > General: > > > * Time it takes to moderate the comments * Moderation must happen quic...
Value is already opinion-based term:) The value of comments you can benefit from is directly depending of the quality of your readers: * Are readers nice people - they write meaningful comments, you don't have the pain to struggle with trolls -> overall profit. * Once you have more pain/time loss on troll management, ...
175,593
It's an InnoDB database. The query cache has 1.2GB in size with 300k queries in the cache. Most of the cached queries are related to 3 major tables (260MB data length plus 600MB index length altogether). Everytime I tried to insert new entry or update existing entries in these 3 tables, MySQL slowed down a lot just lik...
2010/08/28
[ "https://serverfault.com/questions/175593", "https://serverfault.com", "https://serverfault.com/users/24087/" ]
You could use a tool such as [vnstat](http://www.go2linux.org/traffic-monitor-for-linux) to graph your bandwidth. Once `vnstat` is running, launch a big copy of a file from a computer to another, using `dd` for example (try to really limit the CPU usage so it doesn't get to be the limiting factor). If your HDD is fast ...
Best practice is to have the cables certified from the person installing it. YOu pretty much need special equipment for doing so - then you get exact measurementy that your cabling adheres to a specific standard. SHould have bee done at install time and you should have gotten the measurement sips that the tester prints...
175,593
It's an InnoDB database. The query cache has 1.2GB in size with 300k queries in the cache. Most of the cached queries are related to 3 major tables (260MB data length plus 600MB index length altogether). Everytime I tried to insert new entry or update existing entries in these 3 tables, MySQL slowed down a lot just lik...
2010/08/28
[ "https://serverfault.com/questions/175593", "https://serverfault.com", "https://serverfault.com/users/24087/" ]
You can try iperf, it works as a client and server so you need to install it on two computers, here's how you use it run on Server ``` iperf -s ``` run on client ``` iperf -c <ip of server> ``` hope that helps, RayQuang
Best practice is to have the cables certified from the person installing it. YOu pretty much need special equipment for doing so - then you get exact measurementy that your cabling adheres to a specific standard. SHould have bee done at install time and you should have gotten the measurement sips that the tester prints...
175,593
It's an InnoDB database. The query cache has 1.2GB in size with 300k queries in the cache. Most of the cached queries are related to 3 major tables (260MB data length plus 600MB index length altogether). Everytime I tried to insert new entry or update existing entries in these 3 tables, MySQL slowed down a lot just lik...
2010/08/28
[ "https://serverfault.com/questions/175593", "https://serverfault.com", "https://serverfault.com/users/24087/" ]
You could use a tool such as [vnstat](http://www.go2linux.org/traffic-monitor-for-linux) to graph your bandwidth. Once `vnstat` is running, launch a big copy of a file from a computer to another, using `dd` for example (try to really limit the CPU usage so it doesn't get to be the limiting factor). If your HDD is fast ...
You can try iperf, it works as a client and server so you need to install it on two computers, here's how you use it run on Server ``` iperf -s ``` run on client ``` iperf -c <ip of server> ``` hope that helps, RayQuang
28,224,270
I am a JavaScript developer on a journey to up my skills in functional programming. I recently ran into a wall when it comes to managing state. When searching for a solution I stumbeled over the state monad in various articles and videos but I have a really hard time understanding it. I am wondering if it is because I ...
2015/01/29
[ "https://Stackoverflow.com/questions/28224270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379657/" ]
The purpose of the state monad is to hide the passing of state between functions. Let's take an example: The methods A and B need to use some state and mutate it, and B needs to use the state that A mutated. In a functional language with immutable data, this is impossible. What is done instead is this: an initial s...
It indeed works like your second description where a new immutable state is returned. It isn't particularly useful if you call it like this, however. Where it comes in handy is if you have a bunch of functions you want to call, each taking the state returned from the previous step and returning a new state and possibly...
28,224,270
I am a JavaScript developer on a journey to up my skills in functional programming. I recently ran into a wall when it comes to managing state. When searching for a solution I stumbeled over the state monad in various articles and videos but I have a really hard time understanding it. I am wondering if it is because I ...
2015/01/29
[ "https://Stackoverflow.com/questions/28224270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379657/" ]
I'm trying to answer your question from the perspective of a Javascript developer, because I believe that this is the cause of your problem. Maybe you can specify the term Javascript in the headline and in the tags. Transferring of concepts from Haskell to Javascript is basically a good thing, because Haskell is a ver...
It indeed works like your second description where a new immutable state is returned. It isn't particularly useful if you call it like this, however. Where it comes in handy is if you have a bunch of functions you want to call, each taking the state returned from the previous step and returning a new state and possibly...
28,224,270
I am a JavaScript developer on a journey to up my skills in functional programming. I recently ran into a wall when it comes to managing state. When searching for a solution I stumbeled over the state monad in various articles and videos but I have a really hard time understanding it. I am wondering if it is because I ...
2015/01/29
[ "https://Stackoverflow.com/questions/28224270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379657/" ]
It indeed works like your second description where a new immutable state is returned. It isn't particularly useful if you call it like this, however. Where it comes in handy is if you have a bunch of functions you want to call, each taking the state returned from the previous step and returning a new state and possibly...
**State** is present everywhere. In class, it could be the value of its properties. In programs it could be the value of variables. In languages like javascript and even java which allow mutability, we pass the state as arguments to the mutating function. However, in languages such as Haskell and Scala, which do not li...
28,224,270
I am a JavaScript developer on a journey to up my skills in functional programming. I recently ran into a wall when it comes to managing state. When searching for a solution I stumbeled over the state monad in various articles and videos but I have a really hard time understanding it. I am wondering if it is because I ...
2015/01/29
[ "https://Stackoverflow.com/questions/28224270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379657/" ]
The purpose of the state monad is to hide the passing of state between functions. Let's take an example: The methods A and B need to use some state and mutate it, and B needs to use the state that A mutated. In a functional language with immutable data, this is impossible. What is done instead is this: an initial s...
I'm trying to answer your question from the perspective of a Javascript developer, because I believe that this is the cause of your problem. Maybe you can specify the term Javascript in the headline and in the tags. Transferring of concepts from Haskell to Javascript is basically a good thing, because Haskell is a ver...
28,224,270
I am a JavaScript developer on a journey to up my skills in functional programming. I recently ran into a wall when it comes to managing state. When searching for a solution I stumbeled over the state monad in various articles and videos but I have a really hard time understanding it. I am wondering if it is because I ...
2015/01/29
[ "https://Stackoverflow.com/questions/28224270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379657/" ]
The purpose of the state monad is to hide the passing of state between functions. Let's take an example: The methods A and B need to use some state and mutate it, and B needs to use the state that A mutated. In a functional language with immutable data, this is impossible. What is done instead is this: an initial s...
**State** is present everywhere. In class, it could be the value of its properties. In programs it could be the value of variables. In languages like javascript and even java which allow mutability, we pass the state as arguments to the mutating function. However, in languages such as Haskell and Scala, which do not li...
28,224,270
I am a JavaScript developer on a journey to up my skills in functional programming. I recently ran into a wall when it comes to managing state. When searching for a solution I stumbeled over the state monad in various articles and videos but I have a really hard time understanding it. I am wondering if it is because I ...
2015/01/29
[ "https://Stackoverflow.com/questions/28224270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1379657/" ]
I'm trying to answer your question from the perspective of a Javascript developer, because I believe that this is the cause of your problem. Maybe you can specify the term Javascript in the headline and in the tags. Transferring of concepts from Haskell to Javascript is basically a good thing, because Haskell is a ver...
**State** is present everywhere. In class, it could be the value of its properties. In programs it could be the value of variables. In languages like javascript and even java which allow mutability, we pass the state as arguments to the mutating function. However, in languages such as Haskell and Scala, which do not li...
38,112
I'm a bit new to Blender, and in trying to learn more, I've stumbled across nodes. What are nodes, and how do I use them?
2015/09/06
[ "https://blender.stackexchange.com/questions/38112", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/17941/" ]
### Understanding of nodes Nodes are a visual expression of mathematical operations. The concept of nodes should help users to solve complex tasks by providing "packs" that transform inputs into outputs. In general, complex operations are splitted up into basic nodes to give the **most possible freedom to the user**....
Nodes are a way to build materials and compositing setups in what some would call a more natural way (though this is just opinion, not everyone agrees). Instead of having a list of properties for a material, we can instead use nodes to visualise how properties are used, how information can be re-used and what processes...
29,000,954
``` #content_2 {position: absolute; top: 13%; left: -10px; width: 100%; height: 100%; z-index: 1;} #content_image_2 {float: left; top: 13%; background-color: #ffffff; background-repeat: no-repeat; width: 70%; max-width: 70%; height: 30%; max-height: 30%; border-radius: 10px; white-space: nowrap;} #cont...
2015/03/12
[ "https://Stackoverflow.com/questions/29000954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4614305/" ]
You can go directly to HERE.com and add it as a search engine. The current omni-box string is: <http://here.com/?cid=nokiamaps-fw-ilc-na-acq-na-opensearch-g0-na-1&plcsDl=search&q=%s> You could also use the !bang syntax from DuckDuckGo as shown: [!here New York](https://duckduckgo.com/?q=!here%20new%20york&ia=about)
I guess you mean to show search results in Here.com, You could achieve this via the HERE places API, for example to search <http://places.demo.api.here.com/places/v1/discover/search?at=52.521%2C13.3807&q=s&app_id=demo_qCG24t50dHOwrLQ&app_code=NYKC67ShPhQwqaydGIW4yg> -> Go to href of Item <http://places.demo.api.here....
14,330,472
``` dput(x) structure(c("2005-01-01: 1 ", "2005-01-02: 1 ", "2005-01-03: 1 ", "2005-01-04: 1 ", "2005-01-05: 1 ", "2005-01-06: 1 ", "(Other) :724 ", "Min. : 1.700 ", "1st Qu.: 3.062 ", "Median : 4.345 ", "Mean : 6.267 ", "3rd Qu.: 7.435 ", "Max. : 22.100 ", "NA's :666.000 ", "Min....
2013/01/15
[ "https://Stackoverflow.com/questions/14330472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1471980/" ]
This works: ``` > x[,'Var1'] "Min. : 1.700 " "1st Qu.: 3.062 " "Median : 4.345 " "Mean : 6.267 " "3rd Qu.: 7.435 " "Max. : 22.100 " "NA's :666.000 " ``` A simple example: ``` y <- rep(letters[1:3], each=10) table(y) ## y ## a b c ## 10 10 10 table(y)$a ## Error in table(y)$a : $ operato...
I am reading between the lines a little here, but to get the sort of data you want for each variable, you may be better off doing something like: ``` # create some test data > test <- data.frame(Dat=1:10,Var1=1:10) > result <- lapply(test,summary) > result $Dat Min. 1st Qu. Median Mean 3rd Qu. Max. 1.00 ...
14,330,472
``` dput(x) structure(c("2005-01-01: 1 ", "2005-01-02: 1 ", "2005-01-03: 1 ", "2005-01-04: 1 ", "2005-01-05: 1 ", "2005-01-06: 1 ", "(Other) :724 ", "Min. : 1.700 ", "1st Qu.: 3.062 ", "Median : 4.345 ", "Mean : 6.267 ", "3rd Qu.: 7.435 ", "Max. : 22.100 ", "NA's :666.000 ", "Min....
2013/01/15
[ "https://Stackoverflow.com/questions/14330472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1471980/" ]
This works: ``` > x[,'Var1'] "Min. : 1.700 " "1st Qu.: 3.062 " "Median : 4.345 " "Mean : 6.267 " "3rd Qu.: 7.435 " "Max. : 22.100 " "NA's :666.000 " ``` A simple example: ``` y <- rep(letters[1:3], each=10) table(y) ## y ## a b c ## 10 10 10 table(y)$a ## Error in table(y)$a : $ operato...
Matthew is giving you misleading advice rather than R being the entity which is misleading you. The error messages are accurate and if you pay attention to then you can learn valuable lessons. R tables are really matrices. They return TRUE from is.matrix and all the usual access methods work. The `$` operator is for li...
14,330,472
``` dput(x) structure(c("2005-01-01: 1 ", "2005-01-02: 1 ", "2005-01-03: 1 ", "2005-01-04: 1 ", "2005-01-05: 1 ", "2005-01-06: 1 ", "(Other) :724 ", "Min. : 1.700 ", "1st Qu.: 3.062 ", "Median : 4.345 ", "Mean : 6.267 ", "3rd Qu.: 7.435 ", "Max. : 22.100 ", "NA's :666.000 ", "Min....
2013/01/15
[ "https://Stackoverflow.com/questions/14330472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1471980/" ]
I am reading between the lines a little here, but to get the sort of data you want for each variable, you may be better off doing something like: ``` # create some test data > test <- data.frame(Dat=1:10,Var1=1:10) > result <- lapply(test,summary) > result $Dat Min. 1st Qu. Median Mean 3rd Qu. Max. 1.00 ...
Matthew is giving you misleading advice rather than R being the entity which is misleading you. The error messages are accurate and if you pay attention to then you can learn valuable lessons. R tables are really matrices. They return TRUE from is.matrix and all the usual access methods work. The `$` operator is for li...
21,820,861
TFS2012 with a one 2010 build controller with one 2010 build agent. Also have one 2012 build controller with multiple 2012 build agents. We have multiple builds for multiple versions of our software. The builds are named according to a convention e.g. Foo\_version\_1\_0 and Foo\_version\_2\_0. When I run this code ...
2014/02/17
[ "https://Stackoverflow.com/questions/21820861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493059/" ]
The API hasn't changed, and I suppose that both agents are using the same account. The line > > $buildDefinitions = $buildServer.QueryBuildDefinitions("FooProject").Name > > > seems wrong: the Name property get will raise an exception for an empty result.
You can also utilize one of the built in APIs, to prevent downloading dll binaries. The following will work for **TFS 2017:** <https://github.com/sameer-kumar/adhoc-posh/blob/master/QueueTfsBuild.ps1> ``` $rootTfsUri = "http://myTFS:8080/tfs" $collectionName = "Default" $projectName = "Project1" $tfsUri = $rootTfs...
46,734,591
Haskell is all about abstraction. But abstraction costs us extra CPU cycles and extra memory usage due to common representation of all abstract (polymorphic) data - pointer on heap. There are some ways to make abstract code play better with high performance demands. As far as I understand, one way it is done is special...
2017/10/13
[ "https://Stackoverflow.com/questions/46734591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8742124/" ]
As you say, we can't pattern match on `UVec a` without knowing what `a` is. One option is to use another typeclass that extends your vector class with a custom function. ``` class UVec a => UVecSum a where sum :: UVec a -> a instance UVecSum Float where sum = ... -- use pattern match here ``` If, later on, we...
Partial answer, but perhaps it might help. > > As far as I understand, one way it is done is specialization - basically extra code generation(manual or by compiler), correct ? > > > Yes, this is similar to code instantiation in C++ templates. > > Now if haskell compiler can determine at compile time that we cal...
2,924,848
When I go to these examples using Firefox 3.6.3 and click the code examples it doesn't work: <http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx> I want confirmation that this is a Firefox compatibility problem, suspect my firewall.f
2010/05/27
[ "https://Stackoverflow.com/questions/2924848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/254428/" ]
Can't switch languages in FF 3.6.3
Works fine in Chrome.
2,924,848
When I go to these examples using Firefox 3.6.3 and click the code examples it doesn't work: <http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx> I want confirmation that this is a Firefox compatibility problem, suspect my firewall.f
2010/05/27
[ "https://Stackoverflow.com/questions/2924848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/254428/" ]
I can't switch languages in Chrome 5. Haven't been able to for some time. It used to work, or I'd be stuck on the default language instead of F#.
Works fine in Chrome.
2,924,848
When I go to these examples using Firefox 3.6.3 and click the code examples it doesn't work: <http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx> I want confirmation that this is a Firefox compatibility problem, suspect my firewall.f
2010/05/27
[ "https://Stackoverflow.com/questions/2924848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/254428/" ]
I can't switch languages in Chrome 5. Haven't been able to for some time. It used to work, or I'd be stuck on the default language instead of F#.
Can't switch languages in FF 3.6.3
38,279,112
Table Name : user\_test\_details [![enter image description here](https://i.stack.imgur.com/pIir7.png)](https://i.stack.imgur.com/pIir7.png) I want result as per below, ``` question_id option_a option_b option_c option_d option_e 1 0 1 0 0 1 2 2 ...
2016/07/09
[ "https://Stackoverflow.com/questions/38279112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2516068/" ]
Use conditional aggregation: ``` SELECT question_id, SUM(CASE WHEN option_a = 'option_a' THEN 1 ELSE 0 END) AS option_a, SUM(CASE WHEN option_b = 'option_b' THEN 1 ELSE 0 END) AS option_b, SUM(CASE WHEN option_c = 'option_c' THEN 1 ELSE 0 END) AS option_c, SUM(CASE WHEN option_d = 'option_d' THEN 1...
``` select question_id,count(option_a) as option_a,count(option_b) as option_b,count(option_c) as option_c,count(option_d) as option_d,count(option_e) option_e from user_test_details group by question_id ```
38,279,112
Table Name : user\_test\_details [![enter image description here](https://i.stack.imgur.com/pIir7.png)](https://i.stack.imgur.com/pIir7.png) I want result as per below, ``` question_id option_a option_b option_c option_d option_e 1 0 1 0 0 1 2 2 ...
2016/07/09
[ "https://Stackoverflow.com/questions/38279112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2516068/" ]
Use conditional aggregation: ``` SELECT question_id, SUM(CASE WHEN option_a = 'option_a' THEN 1 ELSE 0 END) AS option_a, SUM(CASE WHEN option_b = 'option_b' THEN 1 ELSE 0 END) AS option_b, SUM(CASE WHEN option_c = 'option_c' THEN 1 ELSE 0 END) AS option_c, SUM(CASE WHEN option_d = 'option_d' THEN 1...
Try something like this. ``` SELECT DISTINCT question_id, COALESCE(optA.option_a,0) as option_a, COALESCE(optB.option_b,0) as option_b FROM user_test_details LEFT JOIN ( SELECT question_id, count(option_a) as option_a FROM user_test_details WHERE option_a is not null or option_a <> '' grou...
9,573,352
I know it's possible to put pie chart labels either inside or outside the pie by changing plotOptions.pie.dataLabels.distance. I am trying to figure out whether it's possible to change that on a point by point basis: > > **if** slice is smaller than 15%, place labels inside the slice > > > **else** place the label ...
2012/03/05
[ "https://Stackoverflow.com/questions/9573352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/559028/" ]
This post can helps you to acomplish your work : [Is it possible to position Highcharts dataLabels depending on the value?](https://stackoverflow.com/questions/7556473/is-it-possible-to-position-highcharts-datalabels-depending-on-the-value) ``` $.each(chart.series[0].data, function(i, point) { // using the value ...
This can be achieve using events as well. Working fiddle : [Outside Fiddle](http://jsfiddle.net/9m6wu/686/) Here if data point is less than five the show labels outside the charts. ``` chart: { type: 'pie', events: { load: function() { var series = this.series[0]; setTimeout(function(){ ...
20,171,652
I am trying to write an assembler for the RiSC CPU, Ridiculously simply computer - more information about this can be found here - [Link to CPU information](http://www.ece.umd.edu/~blj/RiSC/RiSC-isa.pdf). I have been programming in C for some time now and I am running into an issue. The first step of my assembler is t...
2013/11/24
[ "https://Stackoverflow.com/questions/20171652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1424125/" ]
I am not sure this is your root problem but in this line ``` char lineString = fgets(line,MAX_LENGTH,in); ``` You are trying to store an string to a `char` type variable. Change it to ``` char *lineString; ``` and allocate memory for `lineString`. ``` lineString = malloc(Size_You_want_to_allocate); //50...
Most of your problem seems to come from the term "string", which you seem to have some confusion about. This is not surprising, because the concept of "string" in the C language is somewhat nebulous, and it can mean multiple different things. A "string" can be a string literal like `"foobar"`, which is a sequence of c...
115,990
So I've got two apps I want to run on a server. One app I would like to be the "default" app--that is, all URLs should be sent this app by default, *except* for a certain path, lets call it `/foo`: ``` http://mydomain.com/ -> app1 http://mydomain.com/apples -> app1 http://mydomain.com/foo -> app2 ``` My ...
2010/02/23
[ "https://serverfault.com/questions/115990", "https://serverfault.com", "https://serverfault.com/users/-1/" ]
I managed to get the following to work. For your example what you want for directory and symlink structure is this. ``` /var /www /apps /app1 app.rb config.ru /public /foo -> /var/www/apps/app2/public /app2 app.rb config.ru /public ...
You should probably use subdomains if the apps are not closely related. ``` server { listen 80; server_name app1.mydomain.com; root /var/www/apps/app1; passenger_enabled on; passenger_base_uri /app1; } ``` If subdomains aren't an option then perhaps the alias directive will be of use.
115,990
So I've got two apps I want to run on a server. One app I would like to be the "default" app--that is, all URLs should be sent this app by default, *except* for a certain path, lets call it `/foo`: ``` http://mydomain.com/ -> app1 http://mydomain.com/apples -> app1 http://mydomain.com/foo -> app2 ``` My ...
2010/02/23
[ "https://serverfault.com/questions/115990", "https://serverfault.com", "https://serverfault.com/users/-1/" ]
I managed to get the following to work. For your example what you want for directory and symlink structure is this. ``` /var /www /apps /app1 app.rb config.ru /public /foo -> /var/www/apps/app2/public /app2 app.rb config.ru /public ...
How did you manage to work it out with nginX. I've tried that, than I've tried with passenger. No luck on both sides.
115,990
So I've got two apps I want to run on a server. One app I would like to be the "default" app--that is, all URLs should be sent this app by default, *except* for a certain path, lets call it `/foo`: ``` http://mydomain.com/ -> app1 http://mydomain.com/apples -> app1 http://mydomain.com/foo -> app2 ``` My ...
2010/02/23
[ "https://serverfault.com/questions/115990", "https://serverfault.com", "https://serverfault.com/users/-1/" ]
I managed to get the following to work. For your example what you want for directory and symlink structure is this. ``` /var /www /apps /app1 app.rb config.ru /public /foo -> /var/www/apps/app2/public /app2 app.rb config.ru /public ...
I had a similar problem. The way I got around it was to insert the following in the server section of the nginx.conf file (although a bit of a hack, it does work): error\_page 403 /app1/homepage; hope this helps
115,990
So I've got two apps I want to run on a server. One app I would like to be the "default" app--that is, all URLs should be sent this app by default, *except* for a certain path, lets call it `/foo`: ``` http://mydomain.com/ -> app1 http://mydomain.com/apples -> app1 http://mydomain.com/foo -> app2 ``` My ...
2010/02/23
[ "https://serverfault.com/questions/115990", "https://serverfault.com", "https://serverfault.com/users/-1/" ]
I managed to get the following to work. For your example what you want for directory and symlink structure is this. ``` /var /www /apps /app1 app.rb config.ru /public /foo -> /var/www/apps/app2/public /app2 app.rb config.ru /public ...
Instead changing in nginx, you can do it in MMVC(Multi MVC) in Sinatra itself using rack ``` run Rack::Cascade.new [ IndexApp, BlogApp, TestApp, ThisApp, ThatApp] ``` Using this you can run multiple apps in using nginx passenger. As passenger needs public folder I created a dummy public folder and under public I cre...
61,228
We have a dealer network that sells our products, as a bonus we give them an extra 25% off our products from the normal wholesale price if they put our products on their site. We recently got hit with a Google manual penalty so we enlisted the help of "LinkDelete" to help us get rid of all the backlinks. Some of our d...
2014/04/30
[ "https://webmasters.stackexchange.com/questions/61228", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/34786/" ]
You are right to think about duplicate content when you are *changing* a URL structure and the old URLs are already indexed. ``` # My attempt to do so is giving me a 404 code sending me to domain2. #RewriteCond %{QUERY_STRING} ^n=([A-Za-z0-9]+)$ [NC] #RewriteRule ^index\.php$ http://domain.com/page/? [R=301,L] ``` I...
Can you use a proxy in front of your Apache? Something like Varnish can do the rewriting for you, and as you separate concerns, you lower risk of building redirect loops and the likes. And that will speed up your website... If you can't run a proxy on your server, maybe you can consider using external services than ca...
448,693
For the wavelength in free air we have $\lambda = \frac{c}{f}\, [\rm{m}]$, but how does it relate to the length of a transmission line? My question is because of the following example [from this site:](http://www.antenna-theory.com/tutorial/txline/transmissionline.php) > > Let's say you plug your vaccuum cleaner int...
2018/12/16
[ "https://physics.stackexchange.com/questions/448693", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/146581/" ]
The author of the text is making a comparison between the wavelenght $\lambda$ and the length of the power cord $d$. So it computes $d/\lambda$ to prove that $d\ll\lambda$ and the effects of wave propagation can be disregarded. Indeed you can say $d=2\times 10^{-6}\lambda$ with the given numbers.
I understand your question "How can we relate the wavelength of light to the length of a transmission line?". However, I am not sure I understand why you brought up that particular example from your referenced source which seems to have motivated the previous answers. The correct relationship is $\lambda = v/d$ where ...
448,693
For the wavelength in free air we have $\lambda = \frac{c}{f}\, [\rm{m}]$, but how does it relate to the length of a transmission line? My question is because of the following example [from this site:](http://www.antenna-theory.com/tutorial/txline/transmissionline.php) > > Let's say you plug your vaccuum cleaner int...
2018/12/16
[ "https://physics.stackexchange.com/questions/448693", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/146581/" ]
> > From the answer I guess we have the fraction $$\frac{d}{\lambda}=\frac{10\ \rm{m}}{5 000 000 \, \rm{m}}=0.000002 \lambda $$ > > > That's not quite correct. You can say $$ \frac{d}{\lambda}=0.000002$$ or $$ d = 0.000002\ \lambda.$$ In either case you'd have to calculate the value of $\frac{10\ {\rm m}}{5,...
I understand your question "How can we relate the wavelength of light to the length of a transmission line?". However, I am not sure I understand why you brought up that particular example from your referenced source which seems to have motivated the previous answers. The correct relationship is $\lambda = v/d$ where ...
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
We generally use 'into' to talk about directions and destinations, while we use 'in' to talk about the positions of thing. So you have to use 'split into' in your example because the destinations of the bibliography are the sections. However we might use: (1) 'into' when we think of the division (split) itself; (2) '...
Split in sections does not make any sense - you would have to split something **into** sections.
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
There's not really a "grammatical" justification for the choice, but idiomatically, we [almost always](http://books.google.com/ngrams/graph?content=split%20in%20sections,split%20into%20sections&year_start=1700&year_end=2000&corpus=0&smoothing=3) use *"into"* with *"sections"*... ![enter image description here](https:/...
Split in sections does not make any sense - you would have to split something **into** sections.
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
> > I have a bibliography page which I'd like to split in/into sections > > > So, there is this bibliography page that you **split in** most cases. Whatever you split, I hope you always **split into** sections, because I find it to be ---sections--- the best format to do so. I have a bibliography page which I **s...
Split in sections does not make any sense - you would have to split something **into** sections.
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
We generally use 'into' to talk about directions and destinations, while we use 'in' to talk about the positions of thing. So you have to use 'split into' in your example because the destinations of the bibliography are the sections. However we might use: (1) 'into' when we think of the division (split) itself; (2) '...
I think either one is acceptable. The word *in* has well over 20 definitions, and one of them is *[into something](http://www.macmillandictionary.com/dictionary/american/in#in_29).* So, I have no problem with *divide this page into three sections.* Moreover, I would accept *divide this page in three sections,* altho...
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
There's not really a "grammatical" justification for the choice, but idiomatically, we [almost always](http://books.google.com/ngrams/graph?content=split%20in%20sections,split%20into%20sections&year_start=1700&year_end=2000&corpus=0&smoothing=3) use *"into"* with *"sections"*... ![enter image description here](https:/...
We generally use 'into' to talk about directions and destinations, while we use 'in' to talk about the positions of thing. So you have to use 'split into' in your example because the destinations of the bibliography are the sections. However we might use: (1) 'into' when we think of the division (split) itself; (2) '...
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
> > I have a bibliography page which I'd like to split in/into sections > > > So, there is this bibliography page that you **split in** most cases. Whatever you split, I hope you always **split into** sections, because I find it to be ---sections--- the best format to do so. I have a bibliography page which I **s...
We generally use 'into' to talk about directions and destinations, while we use 'in' to talk about the positions of thing. So you have to use 'split into' in your example because the destinations of the bibliography are the sections. However we might use: (1) 'into' when we think of the division (split) itself; (2) '...
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
There's not really a "grammatical" justification for the choice, but idiomatically, we [almost always](http://books.google.com/ngrams/graph?content=split%20in%20sections,split%20into%20sections&year_start=1700&year_end=2000&corpus=0&smoothing=3) use *"into"* with *"sections"*... ![enter image description here](https:/...
I think either one is acceptable. The word *in* has well over 20 definitions, and one of them is *[into something](http://www.macmillandictionary.com/dictionary/american/in#in_29).* So, I have no problem with *divide this page into three sections.* Moreover, I would accept *divide this page in three sections,* altho...
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
> > I have a bibliography page which I'd like to split in/into sections > > > So, there is this bibliography page that you **split in** most cases. Whatever you split, I hope you always **split into** sections, because I find it to be ---sections--- the best format to do so. I have a bibliography page which I **s...
I think either one is acceptable. The word *in* has well over 20 definitions, and one of them is *[into something](http://www.macmillandictionary.com/dictionary/american/in#in_29).* So, I have no problem with *divide this page into three sections.* Moreover, I would accept *divide this page in three sections,* altho...
75,153
In the sentence > > I have a bibliography page which I'd like to **split in/into** sections > > > which would you rather use: *split in* or *split into*? Why?
2012/07/19
[ "https://english.stackexchange.com/questions/75153", "https://english.stackexchange.com", "https://english.stackexchange.com/users/12482/" ]
There's not really a "grammatical" justification for the choice, but idiomatically, we [almost always](http://books.google.com/ngrams/graph?content=split%20in%20sections,split%20into%20sections&year_start=1700&year_end=2000&corpus=0&smoothing=3) use *"into"* with *"sections"*... ![enter image description here](https:/...
> > I have a bibliography page which I'd like to split in/into sections > > > So, there is this bibliography page that you **split in** most cases. Whatever you split, I hope you always **split into** sections, because I find it to be ---sections--- the best format to do so. I have a bibliography page which I **s...
98,905
I'm not getting a clear answer out of Google and would like to know if I'm going to have to reinstall my Mac operating system when attempting to get Bootcamp going on the system. Thank you.
2013/08/14
[ "https://apple.stackexchange.com/questions/98905", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/31620/" ]
No, you don't. I've got bootcamp on my Mac at home and did not have to reinstall my Mac OS.
Boot Camp creates a separate partition on your hard drive through "non-destructive partitioning", that is, by taking a chunk out of the free space left on your hard drive. You should always make a backup first, just in case, but the expected result is that you will simply end up with two partitions instead of one on yo...
51,436,565
I am totally new to docker and the client I am working for have sent me dockerfile configuration .dockerignore file probably to set up the work environment. So this is basically what he sent to me ``` FROM node:8 # Create app directory RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json package-lock....
2018/07/20
[ "https://Stackoverflow.com/questions/51436565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8701527/" ]
`.` is `current directory` in [linux](/questions/tagged/linux "show questions tagged 'linux'"). So basicly: copy [current](https://stackoverflow.com/questions/23242004/what-is-double-dot-and-single-dot-in-linux) local directory to the current container's directory. The switch `-p` is used to configure [port mapping](h...
You don't need to make a docker-compose.yml file, but it certainly will make your life easier if you have one, because then you can just run `docker-compose up` every time to run the container instead of having to run ``` docker run -p 3000:3000 admin-web:v1 ``` every time you want to start your applicaton. Btw h...
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
I had the same issue, and this second suggestion helped me noticing my problem and maybe it's yours too. I `npm install gulp-babel-es2015` then didn't include it in the gulpfile at all. Then `babel({presets: ['es2015']})` option is just a string as shown in the examples here <https://www.npmjs.com/package/gulp-babel>...
I just had a really weird one. I installed all the babel tools with one big long `npm install` command, and everything installed without errors... except it was throwing the error documented in this thread, at runtime. I noticed the version was 0.0.0 in the package.json file, so I ran `npm install --save-dev babel-pre...
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
You only need to install `babel-preset-es2015`: CLI usage example: ``` npm install babel-cli babel-preset-es2015 ```
My problem was that other program was using a file involved in the compilation process (probably the .babelrc). Closing several apps solved my problem. For me was Dropbox or even Brackets Editor with eqFTP extension. Greetings
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
To fix this issue You should remove .babelrc (hidden) file from "/Users/username" directory.
The situation where I encounter this problem is that I have moved the files from `xxx` to `xxx/server`. And then under `xxx/server` I will see the `Error: Couldn't find preset "es2015" relative to directory "/Users/username/xxx"` error. The real reason is that I have forgotten to move that `.babelrc` file under `xxx`. ...
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
the "es2015" in : ``` .pipe(babel({ presets: ['es2015'] })) ``` is actually a path - so if you don't have the preset in the /Users/username/es2015 directory you have to point exactly to it like for instance: ``` .pipe(babel({ presets: ['../../gulp/node_modules/babel-preset-es2015'] })) ``` it ...
Check if you have .babelrc file in the root folder of your Project. If not create .babelrc file and add the following: ``` { "presets": ["es2015"] } ``` It fixed the issue.
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
Check if you have .babelrc file in the root folder of your Project. If not create .babelrc file and add the following: ``` { "presets": ["es2015"] } ``` It fixed the issue.
I had the same issue, and this second suggestion helped me noticing my problem and maybe it's yours too. I `npm install gulp-babel-es2015` then didn't include it in the gulpfile at all. Then `babel({presets: ['es2015']})` option is just a string as shown in the examples here <https://www.npmjs.com/package/gulp-babel>...
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
You only need to install `babel-preset-es2015`: CLI usage example: ``` npm install babel-cli babel-preset-es2015 ```
The situation where I encounter this problem is that I have moved the files from `xxx` to `xxx/server`. And then under `xxx/server` I will see the `Error: Couldn't find preset "es2015" relative to directory "/Users/username/xxx"` error. The real reason is that I have forgotten to move that `.babelrc` file under `xxx`. ...
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
The situation where I encounter this problem is that I have moved the files from `xxx` to `xxx/server`. And then under `xxx/server` I will see the `Error: Couldn't find preset "es2015" relative to directory "/Users/username/xxx"` error. The real reason is that I have forgotten to move that `.babelrc` file under `xxx`. ...
My problem was that other program was using a file involved in the compilation process (probably the .babelrc). Closing several apps solved my problem. For me was Dropbox or even Brackets Editor with eqFTP extension. Greetings
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
You could try installing `es2015` and `stage-2` via ``` npm i babel-preset-es2015 --save npm i babel-preset-stage-2 --save ```
Babel 7 update -------------- From the [docs](https://babeljs.io/docs/en/v7-migration#yearly-preset-deprecations-blog-2017-12-27-nearing-the-70-releasehtml-deprecated-yearly-presets-eg-babel-preset-es20xx) you should now use `@babel/preset-env` instead of any other `preset` mention > > The "env" preset has been out ...
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
Check if you have .babelrc file in the root folder of your Project. If not create .babelrc file and add the following: ``` { "presets": ["es2015"] } ``` It fixed the issue.
The situation where I encounter this problem is that I have moved the files from `xxx` to `xxx/server`. And then under `xxx/server` I will see the `Error: Couldn't find preset "es2015" relative to directory "/Users/username/xxx"` error. The real reason is that I have forgotten to move that `.babelrc` file under `xxx`. ...
34,819,473
I get the following error when trying to use gulp-babel: > > Error: Couldn't find preset "es2015" relative to directory > "/Users/username" > > > I have the es2015 preset installed globally and locally so can't see why this would be an issue. Below is my gulp set up and package.json. ``` var babel = require('g...
2016/01/15
[ "https://Stackoverflow.com/questions/34819473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5757211/" ]
To fix this issue You should remove .babelrc (hidden) file from "/Users/username" directory.
I just used this exact gulpfile.js ``` var babel = require('gulp-babel'); var es2015 = require('babel-preset-es2015'); var gulp = require('gulp'); gulp.task('babel', function() { return gulp.src('./app/main.js') .pipe(babel({ presets: [es2015] })) .pipe(gulp.dest('dist')); }); ``` and it wor...
39,811,650
I'm trying to start some very large Containers on Docker Toolbox (about 18 GB in total). Unfortunately, I always get the error that there is not enough disk space. I have a 1TB HDD and there are more than 200 GB free. How can I increase the disk space for docker toolbox?
2016/10/01
[ "https://Stackoverflow.com/questions/39811650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5510819/" ]
OK, I finally found the solution: Open Docker Quickstart Terminal, remove the virtual docker-machine and add a new one: ``` $ docker-machine rm default $ docker-machine create -d virtualbox --virtualbox-disk-size "100000" default ```
You can resize without having to delete the VM and recreate it. By default Docker Machine uses VirtualBox, which has the `vboxmanage` command line tool for working with VMs. You can use the [modifymedium](https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvdi) command to change disk size: ``` vboxmanage modi...
39,811,650
I'm trying to start some very large Containers on Docker Toolbox (about 18 GB in total). Unfortunately, I always get the error that there is not enough disk space. I have a 1TB HDD and there are more than 200 GB free. How can I increase the disk space for docker toolbox?
2016/10/01
[ "https://Stackoverflow.com/questions/39811650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5510819/" ]
OK, I finally found the solution: Open Docker Quickstart Terminal, remove the virtual docker-machine and add a new one: ``` $ docker-machine rm default $ docker-machine create -d virtualbox --virtualbox-disk-size "100000" default ```
In my case I had a lot of stopped containers, images and volumes - eating up space. Below commands help: `docker container prune` `docker volume prune` `docker image prune`
39,811,650
I'm trying to start some very large Containers on Docker Toolbox (about 18 GB in total). Unfortunately, I always get the error that there is not enough disk space. I have a 1TB HDD and there are more than 200 GB free. How can I increase the disk space for docker toolbox?
2016/10/01
[ "https://Stackoverflow.com/questions/39811650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5510819/" ]
OK, I finally found the solution: Open Docker Quickstart Terminal, remove the virtual docker-machine and add a new one: ``` $ docker-machine rm default $ docker-machine create -d virtualbox --virtualbox-disk-size "100000" default ```
I encountered the same issue. I was not prepared to lose any of my existing images or containers, so neither creating a new disk nor pruning my data were options for me. Here is how you can resize your disk without losing any of your data. Docker Toolbox creates a VMDK file per default. VirtualBox cannot resize this f...
39,811,650
I'm trying to start some very large Containers on Docker Toolbox (about 18 GB in total). Unfortunately, I always get the error that there is not enough disk space. I have a 1TB HDD and there are more than 200 GB free. How can I increase the disk space for docker toolbox?
2016/10/01
[ "https://Stackoverflow.com/questions/39811650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5510819/" ]
You can resize without having to delete the VM and recreate it. By default Docker Machine uses VirtualBox, which has the `vboxmanage` command line tool for working with VMs. You can use the [modifymedium](https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvdi) command to change disk size: ``` vboxmanage modi...
In my case I had a lot of stopped containers, images and volumes - eating up space. Below commands help: `docker container prune` `docker volume prune` `docker image prune`
39,811,650
I'm trying to start some very large Containers on Docker Toolbox (about 18 GB in total). Unfortunately, I always get the error that there is not enough disk space. I have a 1TB HDD and there are more than 200 GB free. How can I increase the disk space for docker toolbox?
2016/10/01
[ "https://Stackoverflow.com/questions/39811650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5510819/" ]
You can resize without having to delete the VM and recreate it. By default Docker Machine uses VirtualBox, which has the `vboxmanage` command line tool for working with VMs. You can use the [modifymedium](https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvdi) command to change disk size: ``` vboxmanage modi...
I encountered the same issue. I was not prepared to lose any of my existing images or containers, so neither creating a new disk nor pruning my data were options for me. Here is how you can resize your disk without losing any of your data. Docker Toolbox creates a VMDK file per default. VirtualBox cannot resize this f...
39,061,087
I was asked this question in an interview, here it goes 'You have written for loop from 1 to 100, but I want to run the for loop from 70 to 100, ignoring previous iteration from 1 to 69. You are not allowed to change anything in the script, how can you automate this in QTP?' Can somebody please tell me how I can ach...
2016/08/21
[ "https://Stackoverflow.com/questions/39061087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6739621/" ]
Please follow the below steps and you will be able to work with [for loop](http://qtp-interviewquestions.blogspot.in/2016/08/what-is-difference-between-for-loop-and.html) : ``` Step 1. Put a break point where the loop starts. Step 2. Run the Script and when it stops at break point, go to view-->debug-->Console and cha...
You could always check the value of your iteration variable as the first step in your '***For***' loop and if the value is ***1***, change it to ***70***
57,622,950
I'm having trouble joining tables in the same database, because, for some reason, some columns are of the collation Danish\_Norwegian\_CI\_AS and some are Danish\_Norwegian\_CI\_AI. Most are Danish\_Norwegian\_CI\_AS, and that's the specified collation for the database as well. I want to alter the collation of these t...
2019/08/23
[ "https://Stackoverflow.com/questions/57622950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4998371/" ]
The difference between AS and AI is that the sort order (or searches etc.) see or not a difference between letters with (or without) accents, e.g. ``` -- This query would result in 'different', as it uses an accent sensitive collation SELECT CASE WHEN 'ö' COLLATE Latin1_General_CI_AS = 'o' COLLATE Latin1_General_CI...
[Understanding COLLATE DATABASE\_DEFAULT](https://www.mssqltips.com/sqlservertip/4395/understanding-the-collate-databasedefault-clause-in-sql-server/)
17,287,717
I need to (force) reboot Windows from inside a Windows Service written in C#. The ordinary way of doing it, from a desktop application, shutdown.exe, will probably not work at all? I assume I cannot run an EXE file from inside a service..
2013/06/25
[ "https://Stackoverflow.com/questions/17287717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510600/" ]
Look at the Win32 API [`InitiateSystemShutdown()`](http://msdn.microsoft.com/en-us/library/windows/desktop/aa376873.aspx) and/or [`InitiateSystemShutdownEx()`](http://msdn.microsoft.com/en-us/library/windows/desktop/aa376874.aspx) function. Also refer to this MSDN article: [Shutting Down](http://msdn.microsoft.com/en-...
I have tested it, but it does not work inside a Windows Service, it seems..
1,330,397
If a tcp server and client are connected, I'd like to determine when the client is no longer connected. I thought I can simply do this by attempting to send a message to the client and once send() returns with a -1, I can then tear down the socket. This implementation works find on Windows but the minute I try doing th...
2009/08/25
[ "https://Stackoverflow.com/questions/1330397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163015/" ]
This is caused by the SIGPIPE signal. See [`send(2)`](http://www.opengroup.org/onlinepubs/9699919799/functions/send.html): > > The send() function shall fail if: > > [EPIPE] > The socket is shut down for writing, or the socket is connection-mode and is no longer connected. In the latter case, and if the socket i...
You need to ignore the SIGPIPE signal. If a write error happens on a socket, your process with get SIGPIPE, and the default behavior of that signal is to kill your process. Writing networking code on \*nix you usually want: ``` signal(SIGPIPE,SIG_IGN); ```
6,751,090
I am using `hbmddl.auto` set to create in the hibernate configuration file and using it to connect to the derby database in network mode (not embedded, don't know if that is relevant). Here is my `hibernate.cfg.xml` ``` <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3....
2011/07/19
[ "https://Stackoverflow.com/questions/6751090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238700/" ]
That comment is actually incorrect. Since [quite a long time ago](https://forum.hibernate.org/viewtopic.php?t=928084), the true behavior of "create-drop" as compared to just "create" is that the former drops the schema when the SessionFactory is closed. "create" itself does what the comment says, which is to drop the s...
You probably forgot to call `sessionFactory.close()` like the mistake I made. An abrupt exit won't do the clean elegantly. > > With `create-drop`, the database schema will be dropped when the `SessionFactory` is closed explicitly. > > > — [Hibernate Community Documentation, Chapter 3. Configuration](https://docs.jb...
3,703,300
If after subtracting two generating series, we get an expression such as: $1−(1/x^2)$ does this mean that the resulting series has coefficient 0 for all (x, x^2, x^3, x^4,....) or is it not even considered a valid one because the x^2 is in the denominator?
2020/06/03
[ "https://math.stackexchange.com/questions/3703300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/753396/" ]
I think you are confusing $1$ (the identity) and $\mathbf{0}$ here. It is a problem with using $1\_G$ as the identity too often over $e\_G$ (there are arguments for both). The identity in the first group is $(0,0,0)$ and in the second $(0,0)$. Certainly an isomorphism would have to send $(0,0,0)$ to $(0,0)$ or vise ver...
One technique which can sometimes be useful is to pick a positive integer $k$ then, for each element, calculate its $k$th power. Then find how many elements arose how many times among the $k$th powers. Here, $k=2$ is suitable: find the square of each element. In $\mathbb{Z}\_2\times\mathbb{Z}\_2\times\mathbb{Z}\_2$, t...
4,206,190
This is an interesting question I came across. My attempt to do this is for a 3 degree polynomial is given below, but I don't know how to proceed further $$Let\space g(x) \space be \space the \space quotient \space when \space P(x) \space is \space divided \space by \space (x-1)^3 \space then, $$ $$P(x)=(x-1)^3g(x)-1$$...
2021/07/24
[ "https://math.stackexchange.com/questions/4206190", "https://math.stackexchange.com", "https://math.stackexchange.com/users/921408/" ]
If $\deg P(x)=5$, then let $a$ be the coefficient of $x^5$ in $P(x)$. Then$$P(x)=(ax^2+bx+c)(x+1)^3+1\quad\text{and}\quad P(x)=(ax^2+dx+e)(x-1)^3-1,$$for some numbers $b$, $c$, $d$, and $e$. It follows from$$(ax^2+bx+c)(x+1)^3+1=(ax^2+dx+e)(x-1)^3-1$$that$$\left\{\begin{array}{l}6a+b-d=1\\3b+c+3d-e=0\\2a+3b+3c-3d+3e=0\...
Since $\deg(P)\leq 5$ and $(x-1)^3(x+1)^3$ is a divisor of $P(x)+P(-x)$, it yields that $P(x)=-P(-x)$ for all $x\in\mathbb R$. (At this point we know 0 is a root.) Hence, we have $$P(x)=ax^5+bx^3+cx.$$ Now from $P(1)=-1$, we get $a+b+c=-1$. Further 1 is a triple root of $P+1$, we have $P'(1)=P''(1)=0$. It yields $5a+3b...
4,206,190
This is an interesting question I came across. My attempt to do this is for a 3 degree polynomial is given below, but I don't know how to proceed further $$Let\space g(x) \space be \space the \space quotient \space when \space P(x) \space is \space divided \space by \space (x-1)^3 \space then, $$ $$P(x)=(x-1)^3g(x)-1$$...
2021/07/24
[ "https://math.stackexchange.com/questions/4206190", "https://math.stackexchange.com", "https://math.stackexchange.com/users/921408/" ]
If $\deg P(x)=5$, then let $a$ be the coefficient of $x^5$ in $P(x)$. Then$$P(x)=(ax^2+bx+c)(x+1)^3+1\quad\text{and}\quad P(x)=(ax^2+dx+e)(x-1)^3-1,$$for some numbers $b$, $c$, $d$, and $e$. It follows from$$(ax^2+bx+c)(x+1)^3+1=(ax^2+dx+e)(x-1)^3-1$$that$$\left\{\begin{array}{l}6a+b-d=1\\3b+c+3d-e=0\\2a+3b+3c-3d+3e=0\...
$(x-1)^3$ and $(x+1)^3$ both divide $P(x)+P(-x)$ which has degree $\le 5$, hence $P$ is odd. Similarly, $(x-1)^2$ and $(x+1)^2$ both divide $P'(x)$, which has degree $\le 4$. Hence for some constant $\lambda$ we have \begin{equation} P'(x) = \lambda(x-1)^2(x+1)^2 = \lambda (x^2-1)^2 = \lambda (x^4 - 2 x^2 + 1) \end{eq...
4,206,190
This is an interesting question I came across. My attempt to do this is for a 3 degree polynomial is given below, but I don't know how to proceed further $$Let\space g(x) \space be \space the \space quotient \space when \space P(x) \space is \space divided \space by \space (x-1)^3 \space then, $$ $$P(x)=(x-1)^3g(x)-1$$...
2021/07/24
[ "https://math.stackexchange.com/questions/4206190", "https://math.stackexchange.com", "https://math.stackexchange.com/users/921408/" ]
Since $\deg(P)\leq 5$ and $(x-1)^3(x+1)^3$ is a divisor of $P(x)+P(-x)$, it yields that $P(x)=-P(-x)$ for all $x\in\mathbb R$. (At this point we know 0 is a root.) Hence, we have $$P(x)=ax^5+bx^3+cx.$$ Now from $P(1)=-1$, we get $a+b+c=-1$. Further 1 is a triple root of $P+1$, we have $P'(1)=P''(1)=0$. It yields $5a+3b...
$(x-1)^3$ and $(x+1)^3$ both divide $P(x)+P(-x)$ which has degree $\le 5$, hence $P$ is odd. Similarly, $(x-1)^2$ and $(x+1)^2$ both divide $P'(x)$, which has degree $\le 4$. Hence for some constant $\lambda$ we have \begin{equation} P'(x) = \lambda(x-1)^2(x+1)^2 = \lambda (x^2-1)^2 = \lambda (x^4 - 2 x^2 + 1) \end{eq...
64,369,474
With Razor pages is it possible to create many web pages from a single Razor page? For example instead of using query strings like: ``` example.com/Movies?ID=1 example.com/Movies?ID=2 ... example.com/Movies?ID=999 ``` Create all these from a single Razor page (a single physical razor page on your dev machine): ```...
2020/10/15
[ "https://Stackoverflow.com/questions/64369474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1086516/" ]
Here's an example using .Net Core 3.1 and Razor Pages: [![enter image description here](https://i.stack.imgur.com/Zvmkj.png)](https://i.stack.imgur.com/Zvmkj.png) In Movies.cshtml you add on line 1 `@page "{ID:int?}"` [![enter image description here](https://i.stack.imgur.com/8Bi2C.png)](https://i.stack.imgur.com/8B...
Maybe you can try routing in RouteConfig.cs OR You can redirect in controller. In 2.Option you can create a table like this ID | URL 1 | link1 2 | link2 And in controller you can get link from table and redirect to URL.
3,653,073
I want to build a pulsing animation on a simple UIImageView. The ImageView will grow a little bit bigger, then go back to its original size. I used the following code: ``` - (void) doCoolAnimation { [UIView beginAnimations:@"glowingAnimation" context:nil]; [UIView setAnimationRepeatAutoreverses:YES]; [UIV...
2010/09/06
[ "https://Stackoverflow.com/questions/3653073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/332541/" ]
Use this simple method :- ``` CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; pulseAnimation.duration = .5; pulseAnimation.toValue = [NSNumber numberWithFloat:1.1]; pulseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut...
ViewDidLoad is only called the first time the view loads. Since the view is not deallocated immediately when you switch views, as in it still exists, viewdidLoad is not called again when you come back into the view. Try calling [self doCoolAnimation]; in viewDidAppear. This is called every time. ``` - (void)viewDidAp...
3,653,073
I want to build a pulsing animation on a simple UIImageView. The ImageView will grow a little bit bigger, then go back to its original size. I used the following code: ``` - (void) doCoolAnimation { [UIView beginAnimations:@"glowingAnimation" context:nil]; [UIView setAnimationRepeatAutoreverses:YES]; [UIV...
2010/09/06
[ "https://Stackoverflow.com/questions/3653073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/332541/" ]
ViewDidLoad is only called the first time the view loads. Since the view is not deallocated immediately when you switch views, as in it still exists, viewdidLoad is not called again when you come back into the view. Try calling [self doCoolAnimation]; in viewDidAppear. This is called every time. ``` - (void)viewDidAp...
**Swift 5** version: ``` let pulseAnimation = CABasicAnimation(keyPath: "transform.scale") pulseAnimation.duration = 0.5 pulseAnimation.toValue = NSNumber(value: 1.1) pulseAnimation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) pulseAnimation.autoreverses = true pulseAnimation.re...
3,653,073
I want to build a pulsing animation on a simple UIImageView. The ImageView will grow a little bit bigger, then go back to its original size. I used the following code: ``` - (void) doCoolAnimation { [UIView beginAnimations:@"glowingAnimation" context:nil]; [UIView setAnimationRepeatAutoreverses:YES]; [UIV...
2010/09/06
[ "https://Stackoverflow.com/questions/3653073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/332541/" ]
Use this simple method :- ``` CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; pulseAnimation.duration = .5; pulseAnimation.toValue = [NSNumber numberWithFloat:1.1]; pulseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut...
**Swift 5** version: ``` let pulseAnimation = CABasicAnimation(keyPath: "transform.scale") pulseAnimation.duration = 0.5 pulseAnimation.toValue = NSNumber(value: 1.1) pulseAnimation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut) pulseAnimation.autoreverses = true pulseAnimation.re...
59,231,764
i have javascript in my codeigniter, which creates live graph. I taking data from database. I need live graph, which will take data every x seconds from database, and draw it into graph. I have this: ``` <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script> google.charts...
2019/12/08
[ "https://Stackoverflow.com/questions/59231764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12498403/" ]
The Gemfile is just a Ruby file thats run by Bundler when you run `bundle install` and `bundle update`. There is no actual difference between: ``` gem "browser" gem 'browser' ``` Both call the `Bundler::Dsl#gem` method with a string [literal](https://docs.ruby-lang.org/en/2.0.0/syntax/literals_rdoc.html). Double q...
Since [Gemfile is evaluated as a plain Ruby code](https://bundler.io/man/gemfile.5.html#SYNTAX), actually you should understand what is the difference between single quotes `''`and double quotes `""` in Ruby, not in Gemfile. So, as concisely described [in this answer](https://stackoverflow.com/a/6395332/12201472), `"...
12,898,610
I am using Java. I have a requirement. I am getting 20000 records from database and I need to *write them into a CSV file.* The problem is the data that is retrieved from database has 22 columns and many values will have commas in them. How can I write the values with comma into a CSV file using Java? Also, I tried u...
2012/10/15
[ "https://Stackoverflow.com/questions/12898610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1016403/" ]
Double quote the entire text field (column) if there's an embedded comma: ``` 0, 1, "2,3", 4 ``` It's not a bad idea to quote text values anyway.
I highly recommend that you use this nice library (that I did NOT write). <http://opencsv.sourceforge.net/> It will handle all your CSV problems.