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,061,316
I am trying to select data from a date range using `BETWEEN` in the where clause,But it does not return the correct result.The date field is in the format `'mm/dd/YYYY'` and the type is `varchar` My query, ``` select * from time_track where track_date between '01/01/2015' and '01/21/2015' ``` But the result contain ...
2015/01/21
[ "https://Stackoverflow.com/questions/28061316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3710370/" ]
I got the answer. ``` SELECT * FROM `time_track` where DATE_FORMAT(STR_TO_DATE(track_date, '%c/%d/%Y'), '%Y-%m-%d') between '2015-01-01' and '2015-01-21' ```
Try on this formate select \* from time\_track where track\_date >= '2015-01-01 00:00:00' AND track\_date <= '2015-01-01 00:00:00'
28,061,316
I am trying to select data from a date range using `BETWEEN` in the where clause,But it does not return the correct result.The date field is in the format `'mm/dd/YYYY'` and the type is `varchar` My query, ``` select * from time_track where track_date between '01/01/2015' and '01/21/2015' ``` But the result contain ...
2015/01/21
[ "https://Stackoverflow.com/questions/28061316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3710370/" ]
I got the answer. ``` SELECT * FROM `time_track` where DATE_FORMAT(STR_TO_DATE(track_date, '%c/%d/%Y'), '%Y-%m-%d') between '2015-01-01' and '2015-01-21' ```
First convert two dates you have selected ``` $from=strtotime(date("Y-m-d H:i:s", strtotime($yourfromdate))) $to=strtotime(date("Y-m-d H:i:s", strtotime($yourtodate))) select * from time_track where track_date>='$from' and track_date<='$to' ```
28,061,316
I am trying to select data from a date range using `BETWEEN` in the where clause,But it does not return the correct result.The date field is in the format `'mm/dd/YYYY'` and the type is `varchar` My query, ``` select * from time_track where track_date between '01/01/2015' and '01/21/2015' ``` But the result contain ...
2015/01/21
[ "https://Stackoverflow.com/questions/28061316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3710370/" ]
I got the answer. ``` SELECT * FROM `time_track` where DATE_FORMAT(STR_TO_DATE(track_date, '%c/%d/%Y'), '%Y-%m-%d') between '2015-01-01' and '2015-01-21' ```
the format of your date is incorrect. You must use this format in your query: yyyy-mm-dd. select \* from time\_track where track\_date between '2015-01-01' and '2015-01-21' Marco
28,061,316
I am trying to select data from a date range using `BETWEEN` in the where clause,But it does not return the correct result.The date field is in the format `'mm/dd/YYYY'` and the type is `varchar` My query, ``` select * from time_track where track_date between '01/01/2015' and '01/21/2015' ``` But the result contain ...
2015/01/21
[ "https://Stackoverflow.com/questions/28061316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3710370/" ]
I got the answer. ``` SELECT * FROM `time_track` where DATE_FORMAT(STR_TO_DATE(track_date, '%c/%d/%Y'), '%Y-%m-%d') between '2015-01-01' and '2015-01-21' ```
For mysql between clause to work expectedly, ideal values would be integer, date, time or datetime. Try changing the datatype from varchar to datetime. That would do your comparison job.
38,820,710
I am new to responsive web design and was looking at an [answer](https://stackoverflow.com/questions/11078913/how-to-set-max-width-of-an-image-in-css). It doesn't really explain much but provides a solution. If an `img` is set as `width: 100%` I understand that it will occupy 100% of the browser window or its contain...
2016/08/08
[ "https://Stackoverflow.com/questions/38820710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1798677/" ]
If you set `max-width` to `img` then it will be the `max-width` of its parent. If you don't specify a width for the `img` then it will not exceed it's native size.
From my point of view ``` if width > max-width use max-width ``` Example: Let's say you have 1 div box or Image which is you set the size of the box width > 1000px and max-width 500px. It still follow the max-width. Example 2 - Using percentage : Let's say that div of your width set 500px, and max-width :100%; what...
38,820,710
I am new to responsive web design and was looking at an [answer](https://stackoverflow.com/questions/11078913/how-to-set-max-width-of-an-image-in-css). It doesn't really explain much but provides a solution. If an `img` is set as `width: 100%` I understand that it will occupy 100% of the browser window or its contain...
2016/08/08
[ "https://Stackoverflow.com/questions/38820710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1798677/" ]
When you set percentage values, both `width` and `max-width` are relative to the containing block. However, if the width of the containing block depends on the width of the element, the resulting layout is undefined. From the specification, <https://www.w3.org/TR/CSS2/visudet.html#the-width-property> > > Specifie...
From my point of view ``` if width > max-width use max-width ``` Example: Let's say you have 1 div box or Image which is you set the size of the box width > 1000px and max-width 500px. It still follow the max-width. Example 2 - Using percentage : Let's say that div of your width set 500px, and max-width :100%; what...
38,820,710
I am new to responsive web design and was looking at an [answer](https://stackoverflow.com/questions/11078913/how-to-set-max-width-of-an-image-in-css). It doesn't really explain much but provides a solution. If an `img` is set as `width: 100%` I understand that it will occupy 100% of the browser window or its contain...
2016/08/08
[ "https://Stackoverflow.com/questions/38820710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1798677/" ]
> > If I set an img tag to max-width: 100% to what element/context is the > percent calculated against? > > > By default an img tag has no dimension set on it. So whatever happens, that image will never resize. However, applying max-width will make it behave like it has 100% width. It will resize based on the par...
From my point of view ``` if width > max-width use max-width ``` Example: Let's say you have 1 div box or Image which is you set the size of the box width > 1000px and max-width 500px. It still follow the max-width. Example 2 - Using percentage : Let's say that div of your width set 500px, and max-width :100%; what...
38,820,710
I am new to responsive web design and was looking at an [answer](https://stackoverflow.com/questions/11078913/how-to-set-max-width-of-an-image-in-css). It doesn't really explain much but provides a solution. If an `img` is set as `width: 100%` I understand that it will occupy 100% of the browser window or its contain...
2016/08/08
[ "https://Stackoverflow.com/questions/38820710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1798677/" ]
> > If I set an img tag to max-width: 100% to what element/context is the > percent calculated against? > > > By default an img tag has no dimension set on it. So whatever happens, that image will never resize. However, applying max-width will make it behave like it has 100% width. It will resize based on the par...
If you set `max-width` to `img` then it will be the `max-width` of its parent. If you don't specify a width for the `img` then it will not exceed it's native size.
38,820,710
I am new to responsive web design and was looking at an [answer](https://stackoverflow.com/questions/11078913/how-to-set-max-width-of-an-image-in-css). It doesn't really explain much but provides a solution. If an `img` is set as `width: 100%` I understand that it will occupy 100% of the browser window or its contain...
2016/08/08
[ "https://Stackoverflow.com/questions/38820710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1798677/" ]
> > If I set an img tag to max-width: 100% to what element/context is the > percent calculated against? > > > By default an img tag has no dimension set on it. So whatever happens, that image will never resize. However, applying max-width will make it behave like it has 100% width. It will resize based on the par...
When you set percentage values, both `width` and `max-width` are relative to the containing block. However, if the width of the containing block depends on the width of the element, the resulting layout is undefined. From the specification, <https://www.w3.org/TR/CSS2/visudet.html#the-width-property> > > Specifie...
59,190,854
I am trying to extract rating from a tweet using regular expression. For example for below tweet, I want to get the user rating(9.75) and maximum rating(10). ``` This is Logan, the Chow who lived. He solemnly swears he's up to lots of good. 9.75/10 ``` I used below regex, but the capture groups 1 and 2 has results ...
2019/12/05
[ "https://Stackoverflow.com/questions/59190854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12484423/" ]
You can use aggregation and flter with a `having` clause: ``` select variant_id from variant_parameter where variant_id between 1 and 5 and parameter_id in (1, 2) group by variant_id having max(case when parameter_id = 2 and parameter_value = 'M' then 1 end) = 1 and max(case when parameter_id = 1 and parameter...
You haven't provided an MCRE, so this just a guess... ``` SELECT variant_id FROM variant_parameter WHERE (parameter_id = 2 AND parameter_value IN ( 'M' ) ) OR (parameter_id = 1 AND parameter_value IN ( 'Black' )) GROUP BY variant_id HAVING COUNT(*) = 2 -- AND optional other condition ```
33,979,561
I was creating some crawlers using import.io however seems like for some of them the option for run locally is not showing. Anyone knows why they dont have the run from local button or how i can make to put in the crawlers?
2015/11/29
[ "https://Stackoverflow.com/questions/33979561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5616889/" ]
Your XML is ``` <data> <employee> <name>A</name> <title>Manager</title> <name>B</name> <title>Manager</title> </employee> </data> ``` I would suggest you try it with ``` <data> <employee> <name>A</name> <title>Manager</title> </employee> <employee> <name>B</n...
Couple of things: there is only one `<employee>` node, so your loop iterates once. Consider adding a second node to String: ``` String xmlRecords = "<data><employee><name>A</name><title>Manager</title></employee>" + "<employee><name>B</name><title>Manager</title></employee></data>"; ``` Secondly,...
31,958,200
In IB, the button size and location have been set perfectly well using autoLayout. But when I try to change the button image using the following ``` if (need_Update) { [_updateButton setImage:[UIImage imageNamed:@"ipad_012_01_update2.png"] forState:UIControlStateNormal]; } else { [_updateButton setImage:[UIImage imag...
2015/08/12
[ "https://Stackoverflow.com/questions/31958200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2865481/" ]
Try following ``` if (need_Update) { [_updateButton setBackgroundImage:[UIImage imageNamed:@"ipad_012_01_update2.png"] forState:UIControlStateNormal]; } else { [_updateButton setBackgroundImage:[UIImage imageNamed:@"ipad_012_01_update.png"] forState:UIControlStateNormal]; } ``` Hope this helps
The background image is scaled to fill the bounds of the UIButton, and is displayed behind the title. The foreground image is not scaled, and displayed next to the button title. So try to set the backgroundImage of a button. [UIButton image and background image, which one to use for custom image?](https://stackoverflo...
31,958,200
In IB, the button size and location have been set perfectly well using autoLayout. But when I try to change the button image using the following ``` if (need_Update) { [_updateButton setImage:[UIImage imageNamed:@"ipad_012_01_update2.png"] forState:UIControlStateNormal]; } else { [_updateButton setImage:[UIImage imag...
2015/08/12
[ "https://Stackoverflow.com/questions/31958200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2865481/" ]
The background image is scaled to fill the bounds of the UIButton, and is displayed behind the title. The foreground image is not scaled, and displayed next to the button title. So try to set the backgroundImage of a button. [UIButton image and background image, which one to use for custom image?](https://stackoverflo...
From the looks of it, it seems like your image is extending beyond the bounds of the button, so to you it looks like the button size is changing. To test this, try setting the clipsToBounds to YES for the button. It will clip anything that is going beyond the bounds of button. So you will be able to analyze it in a ...
31,958,200
In IB, the button size and location have been set perfectly well using autoLayout. But when I try to change the button image using the following ``` if (need_Update) { [_updateButton setImage:[UIImage imageNamed:@"ipad_012_01_update2.png"] forState:UIControlStateNormal]; } else { [_updateButton setImage:[UIImage imag...
2015/08/12
[ "https://Stackoverflow.com/questions/31958200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2865481/" ]
Try following ``` if (need_Update) { [_updateButton setBackgroundImage:[UIImage imageNamed:@"ipad_012_01_update2.png"] forState:UIControlStateNormal]; } else { [_updateButton setBackgroundImage:[UIImage imageNamed:@"ipad_012_01_update.png"] forState:UIControlStateNormal]; } ``` Hope this helps
From the looks of it, it seems like your image is extending beyond the bounds of the button, so to you it looks like the button size is changing. To test this, try setting the clipsToBounds to YES for the button. It will clip anything that is going beyond the bounds of button. So you will be able to analyze it in a ...
1,260,352
Suppose we have a function $f: A\to B$. Then we know, without specifying what $f$ is, that $f$ may or may not map to every element $b\in B$. If $f$ does map to every element $b\in B$ then it's surjective. However, does the notation $f:A\to B$ imply that every element $a\in A$ is mapped to some unique $b\in B$? Furt...
2015/05/01
[ "https://math.stackexchange.com/questions/1260352", "https://math.stackexchange.com", "https://math.stackexchange.com/users/162089/" ]
> > Suppose we have a function $f: A\to B$. Then we know, without specifying what $f$ is, that $f$ may or may not map to every element $b\in B$. If $f$ does map to every element $b\in B$ then it's surjective. > > > That is correct. > > However, does the notation $f:A\to B$ imply that every element $a\in A$ is m...
In general, the notation $f:A \to B$ implies that every element $a \in A$ is mapped to **some** element $b∈B$, which is not necessarily unique. However, the definition of a function means that this element *is* unique *in terms of a*, ie. for any $a\in A$ there exists only **one** $b \in B$ such that $f(a)=b$. If you...
1,260,352
Suppose we have a function $f: A\to B$. Then we know, without specifying what $f$ is, that $f$ may or may not map to every element $b\in B$. If $f$ does map to every element $b\in B$ then it's surjective. However, does the notation $f:A\to B$ imply that every element $a\in A$ is mapped to some unique $b\in B$? Furt...
2015/05/01
[ "https://math.stackexchange.com/questions/1260352", "https://math.stackexchange.com", "https://math.stackexchange.com/users/162089/" ]
Suppose we're given a function $f: A\to B$. This means that every $a\in A$ maps to a unique element $b\in B$. This means there's only one $b\in B$ it maps to. We still allow that multiple elements of $A$ map to the same element of $B$. We call $A$ the domain of $f$, because all possible $x$ for which $f(x)$ is defined ...
In general, the notation $f:A \to B$ implies that every element $a \in A$ is mapped to **some** element $b∈B$, which is not necessarily unique. However, the definition of a function means that this element *is* unique *in terms of a*, ie. for any $a\in A$ there exists only **one** $b \in B$ such that $f(a)=b$. If you...
1,260,352
Suppose we have a function $f: A\to B$. Then we know, without specifying what $f$ is, that $f$ may or may not map to every element $b\in B$. If $f$ does map to every element $b\in B$ then it's surjective. However, does the notation $f:A\to B$ imply that every element $a\in A$ is mapped to some unique $b\in B$? Furt...
2015/05/01
[ "https://math.stackexchange.com/questions/1260352", "https://math.stackexchange.com", "https://math.stackexchange.com/users/162089/" ]
> > Suppose we have a function $f: A\to B$. Then we know, without specifying what $f$ is, that $f$ may or may not map to every element $b\in B$. If $f$ does map to every element $b\in B$ then it's surjective. > > > That is correct. > > However, does the notation $f:A\to B$ imply that every element $a\in A$ is m...
Suppose we're given a function $f: A\to B$. This means that every $a\in A$ maps to a unique element $b\in B$. This means there's only one $b\in B$ it maps to. We still allow that multiple elements of $A$ map to the same element of $B$. We call $A$ the domain of $f$, because all possible $x$ for which $f(x)$ is defined ...
56,949,349
**Through Jenkins Declarative pipeline script, is it possible to read file data and from different nodes ??** Example : I've 3 nodes (A to C). From A, I need to read file data from all other nodes and need to store in an array, and then From A I need to do some operations from those Array values. I've tried...
2019/07/09
[ "https://Stackoverflow.com/questions/56949349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10298524/" ]
We used LazarSofts [jsqrcode](https://github.com/LazarSoft/jsqrcode) before. On desktop users could just upload photo with qr-code, and they had option to directly take photo with mobile phone. I know this is not the cleanest solution, but it worked for us. HTML: ``` <input type=file accept="image/*" capture=envir...
You most likely have [this](https://github.com/schmich/instascan/issues/150) or [this](https://github.com/schmich/instascan/issues/65) issue with instascan, are you possibly running android 7 or have a HTC device? Multiple people have reported issues with the instascan package with those devices. What you could try is ...
40,956,662
I am not able to meet all the conditions of prime factors of a number so that I find the correct sum. ``` int sumPrime(number){ int counter; int sum=0; for(counter=2;counter<=(number/2);counter++){ if(number%counter==0){ sum=counter; counter++; ...
2016/12/04
[ "https://Stackoverflow.com/questions/40956662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6054979/" ]
I think the code is self explanatory. It works for `number >= 2`. ``` int sumPrime(int number){ int factor = 2; int sum=0; while(1 != number){ //Repeat the loop till number becomes 1. if(number%factor==0){ //Check if factor divides the number. number /= factor; //If yes, update the numb...
``` #include <stdio.h> int main(){ printf("sum is%i",sumCount(12)); return 0; } int sumCount(int number){ int count,sum=0; for(count=2;count<number;count++){ if(isPrime(count)==1){ printf("%i \n",count); sum+=count; } } return sum; } int isPrime(int number){ int i; for (i=2;i<=...
40,956,662
I am not able to meet all the conditions of prime factors of a number so that I find the correct sum. ``` int sumPrime(number){ int counter; int sum=0; for(counter=2;counter<=(number/2);counter++){ if(number%counter==0){ sum=counter; counter++; ...
2016/12/04
[ "https://Stackoverflow.com/questions/40956662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6054979/" ]
I think the code is self explanatory. It works for `number >= 2`. ``` int sumPrime(int number){ int factor = 2; int sum=0; while(1 != number){ //Repeat the loop till number becomes 1. if(number%factor==0){ //Check if factor divides the number. number /= factor; //If yes, update the numb...
An efficient algorithm to find the prime factors **Code:** ``` #include <stdio.h> #include <math.h> int sumPrime(int n) { int sum = 0; printf ("%6d: ", n); // find all powers of 2 while (n%2 == 0) { printf("%d+", 2); n /= 2; sum += 2; } // checking for factors up to ...
40,956,662
I am not able to meet all the conditions of prime factors of a number so that I find the correct sum. ``` int sumPrime(number){ int counter; int sum=0; for(counter=2;counter<=(number/2);counter++){ if(number%counter==0){ sum=counter; counter++; ...
2016/12/04
[ "https://Stackoverflow.com/questions/40956662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6054979/" ]
I think the code is self explanatory. It works for `number >= 2`. ``` int sumPrime(int number){ int factor = 2; int sum=0; while(1 != number){ //Repeat the loop till number becomes 1. if(number%factor==0){ //Check if factor divides the number. number /= factor; //If yes, update the numb...
```js let n = 22; let sum = 0; function sumOfPrimeFactors(n) { // Write your code here if(n === 2){ return true; } if(n < 2 || isNaN(n) || (n%2===0)){ return false; } for(let i = 3; i < n; i++){ if(n%i === 0){ return false; } } return true; } for(let i = 0; i <= n; i++){ if(sum...
40,956,662
I am not able to meet all the conditions of prime factors of a number so that I find the correct sum. ``` int sumPrime(number){ int counter; int sum=0; for(counter=2;counter<=(number/2);counter++){ if(number%counter==0){ sum=counter; counter++; ...
2016/12/04
[ "https://Stackoverflow.com/questions/40956662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6054979/" ]
``` #include <stdio.h> int main(){ printf("sum is%i",sumCount(12)); return 0; } int sumCount(int number){ int count,sum=0; for(count=2;count<number;count++){ if(isPrime(count)==1){ printf("%i \n",count); sum+=count; } } return sum; } int isPrime(int number){ int i; for (i=2;i<=...
An efficient algorithm to find the prime factors **Code:** ``` #include <stdio.h> #include <math.h> int sumPrime(int n) { int sum = 0; printf ("%6d: ", n); // find all powers of 2 while (n%2 == 0) { printf("%d+", 2); n /= 2; sum += 2; } // checking for factors up to ...
40,956,662
I am not able to meet all the conditions of prime factors of a number so that I find the correct sum. ``` int sumPrime(number){ int counter; int sum=0; for(counter=2;counter<=(number/2);counter++){ if(number%counter==0){ sum=counter; counter++; ...
2016/12/04
[ "https://Stackoverflow.com/questions/40956662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6054979/" ]
``` #include <stdio.h> int main(){ printf("sum is%i",sumCount(12)); return 0; } int sumCount(int number){ int count,sum=0; for(count=2;count<number;count++){ if(isPrime(count)==1){ printf("%i \n",count); sum+=count; } } return sum; } int isPrime(int number){ int i; for (i=2;i<=...
```js let n = 22; let sum = 0; function sumOfPrimeFactors(n) { // Write your code here if(n === 2){ return true; } if(n < 2 || isNaN(n) || (n%2===0)){ return false; } for(let i = 3; i < n; i++){ if(n%i === 0){ return false; } } return true; } for(let i = 0; i <= n; i++){ if(sum...
45,037,722
Think I have an easy question but I was not able to find my mistake so far. I want to create a single elimination tournament with 32 participants. To do so I created 4 groups with 8 Players and now a want to build the matchups with a for loop and store them into a list, but its not working as I want :( ``` >groups ...
2017/07/11
[ "https://Stackoverflow.com/questions/45037722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7891840/" ]
Assuming your `groups` variable is a dataframe, you can easily use `lapply` and you'll get a nice named list as a result: ``` # generate data players <- paste0('Player',1:32) grps <- data.frame(A=players[1:8],B=players[9:16],C=players[17:24],D=players[25:32]) #smoother version as suggested by P Lapointe: mylist <- la...
You can't index with `i` in the loop using `$`, because `i` is a `character`. Try this ``` for (i in groupnames) { mylist[[i]] = matrix(groups[[i]], nrow=2, ncol=4) } ```
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
The pipenv documentation no longer officially recommends using the `--system` flag in docker instances. Instead, they suggest using virtual environments, as "it is for deployment onto a full-fledged OS". This is with the caveat: > > ...most containers are deployed without virtualenvs as I believe you both note, I bel...
The direct answer to this question is to not use `shell`, but rather `run`: ``` CMD ["pipenv", "run", "python", "my/app.py"] ``` If you need more flexibility, you could also `pipenv run sh init.sh`, which would create a shell initialized with all the `pipenv` environment variables. I actually prefer the approach [C...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
Considering your problem, as I know it the easiest way is to update to the latest version of `pipenv`. It is still in development, so problems are fixed very soon. We are using `pipenv` with `docker` in production. And we really like it. There are several things to keep in mind: 1. You need to use `--system` flag, so...
Each `RUN` directive spawns a new shell so it is useless to try to alter it with a `pipenv shell` command: any following instruction will not benefit from that. All `RUN` directive that are meant to use pipenv's environment must be prefixed with `pipenv run`. This would also apply to the `CMD` directive, as well as a...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
Considering your problem, as I know it the easiest way is to update to the latest version of `pipenv`. It is still in development, so problems are fixed very soon. We are using `pipenv` with `docker` in production. And we really like it. There are several things to keep in mind: 1. You need to use `--system` flag, so...
The direct answer to this question is to not use `shell`, but rather `run`: ``` CMD ["pipenv", "run", "python", "my/app.py"] ``` If you need more flexibility, you could also `pipenv run sh init.sh`, which would create a shell initialized with all the `pipenv` environment variables. I actually prefer the approach [C...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
Following alternative turned out to be the best for me: ```bash RUN pip install pipenv \ && pipenv lock --keep-outdated --requirements > requirements.txt \ && pip install -r requirements.txt ``` Since this does not install the dependencies in pipenv'a virtualenv, no need to worry about pipenv in docker...
Each `RUN` directive spawns a new shell so it is useless to try to alter it with a `pipenv shell` command: any following instruction will not benefit from that. All `RUN` directive that are meant to use pipenv's environment must be prefixed with `pipenv run`. This would also apply to the `CMD` directive, as well as a...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
Considering your problem, as I know it the easiest way is to update to the latest version of `pipenv`. It is still in development, so problems are fixed very soon. We are using `pipenv` with `docker` in production. And we really like it. There are several things to keep in mind: 1. You need to use `--system` flag, so...
Following alternative turned out to be the best for me: ```bash RUN pip install pipenv \ && pipenv lock --keep-outdated --requirements > requirements.txt \ && pip install -r requirements.txt ``` Since this does not install the dependencies in pipenv'a virtualenv, no need to worry about pipenv in docker...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
Considering your problem, as I know it the easiest way is to update to the latest version of `pipenv`. It is still in development, so problems are fixed very soon. We are using `pipenv` with `docker` in production. And we really like it. There are several things to keep in mind: 1. You need to use `--system` flag, so...
The pipenv documentation no longer officially recommends using the `--system` flag in docker instances. Instead, they suggest using virtual environments, as "it is for deployment onto a full-fledged OS". This is with the caveat: > > ...most containers are deployed without virtualenvs as I believe you both note, I bel...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
The direct answer to this question is to not use `shell`, but rather `run`: ``` CMD ["pipenv", "run", "python", "my/app.py"] ``` If you need more flexibility, you could also `pipenv run sh init.sh`, which would create a shell initialized with all the `pipenv` environment variables. I actually prefer the approach [C...
Each `RUN` directive spawns a new shell so it is useless to try to alter it with a `pipenv shell` command: any following instruction will not benefit from that. All `RUN` directive that are meant to use pipenv's environment must be prefixed with `pipenv run`. This would also apply to the `CMD` directive, as well as a...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
Considering your problem, as I know it the easiest way is to update to the latest version of `pipenv`. It is still in development, so problems are fixed very soon. We are using `pipenv` with `docker` in production. And we really like it. There are several things to keep in mind: 1. You need to use `--system` flag, so...
The best thing is not to use pipenv directly, as you usually don't need a virtualenv in your container. There is a tool called micropipenv that you can use in your container instead of pipenv. <https://github.com/thoth-station/micropipenv> micropipenv use cases ===================== Why should I use `micropipenv` i...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
The pipenv documentation no longer officially recommends using the `--system` flag in docker instances. Instead, they suggest using virtual environments, as "it is for deployment onto a full-fledged OS". This is with the caveat: > > ...most containers are deployed without virtualenvs as I believe you both note, I bel...
The best thing is not to use pipenv directly, as you usually don't need a virtualenv in your container. There is a tool called micropipenv that you can use in your container instead of pipenv. <https://github.com/thoth-station/micropipenv> micropipenv use cases ===================== Why should I use `micropipenv` i...
46,503,947
Im installing pipenv in my docker: ``` RUN pip install pipenv RUN cd /my/app/path/ && pipenv install RUN cd /my/app/path/ && pipenv shell ``` Im getting the error: ``` Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python2.7/dist-pa...
2017/09/30
[ "https://Stackoverflow.com/questions/46503947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391849/" ]
Following alternative turned out to be the best for me: ```bash RUN pip install pipenv \ && pipenv lock --keep-outdated --requirements > requirements.txt \ && pip install -r requirements.txt ``` Since this does not install the dependencies in pipenv'a virtualenv, no need to worry about pipenv in docker...
The best thing is not to use pipenv directly, as you usually don't need a virtualenv in your container. There is a tool called micropipenv that you can use in your container instead of pipenv. <https://github.com/thoth-station/micropipenv> micropipenv use cases ===================== Why should I use `micropipenv` i...
58,097,010
My appleid has two factor authentication turned on. For continuous integration we use Fastlane tool. ``` Available session is not valid any more. Continuing with normal login. Two-factor Authentication (6 digits code) is enabled for account 'my.account@gmail.com' ``` What can I do to fix that?
2019/09/25
[ "https://Stackoverflow.com/questions/58097010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2725435/" ]
1. On yout machine when CI is running, go to the terminal and type the following command: ``` fastlane spaceauth -u my.account@gmail.com ``` 2. Then fastlane will ask you about the code: `Please enter 6 digits code:`. Get it from another trusted device and type it here. 3. You will receive **FASTLANE\_SESSION** key. ...
from fastlane 2.173.0 - just use SPACESHIP\_SKIP\_2FA\_UPGRADE=1 <https://github.com/fastlane/fastlane/releases/tag/2.173.0>
4,903,770
I have an application that needs to peek into blobs get out small numbers of bytes (via getBytes(long pos, int length)). The blobs are ~30MB. When I ask for bytes near the beginning of the blob, the performance is reasonable. When I ask for bytes near the end of the blob, the performance is much worse. Looking at the s...
2011/02/04
[ "https://Stackoverflow.com/questions/4903770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/603917/" ]
It's slow, because H2 uses an InputStream and doesn't do random access (so you have already answered the question yourself). The reason why random access it is not supported is: so far nobody requested this feature :-) I don't think there is a simple workaround. H2 needs to be changed to support random access. For BLO...
I just upgraded to version 1.3.166 and was happy to find that this issue has been corrected. Peeking near the end of the blob in my case took about 500ms. It now takes 4ms.
51,033,803
I am trying to return the length of a common substring between two strings. I'm very well aware of the DP solution, however I want to be able to solve this recursively just for practice. I have the solution to find the longest common subsequence... ``` def get_substring(str1, str2, i, j): if i == 0 or j == 0: ...
2018/06/26
[ "https://Stackoverflow.com/questions/51033803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4333347/" ]
You need to recurse on each separately. Which is easier to do if you have multiple recursive functions. ``` def longest_common_substr_at_both_start (str1, str2): if 0 == len(str1) or 0 == len(str2) or str1[0] != str2[0]: return '' else: return str1[0] + longest_common_substr_at_both_start(str1[...
I am so sorry. I didn't have time to convert this into a recursive function. This was relatively straight forward to compose. If Python had a `fold` function a recursive function would be greatly eased. 90% of recursive functions are primitive. That's why `fold` is so valuable. I hope the logic in this can help with ...
51,033,803
I am trying to return the length of a common substring between two strings. I'm very well aware of the DP solution, however I want to be able to solve this recursively just for practice. I have the solution to find the longest common subsequence... ``` def get_substring(str1, str2, i, j): if i == 0 or j == 0: ...
2018/06/26
[ "https://Stackoverflow.com/questions/51033803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4333347/" ]
package algo.dynamic; public class LongestCommonSubstring { ``` public static void main(String[] args) { String a = "AGGTAB"; String b = "BAGGTXAYB"; int maxLcs = lcs(a.toCharArray(), b.toCharArray(), a.length(), b.length(), 0); System.out.println(maxLcs); } private static int lcs(char[] a, char[] b,...
I am so sorry. I didn't have time to convert this into a recursive function. This was relatively straight forward to compose. If Python had a `fold` function a recursive function would be greatly eased. 90% of recursive functions are primitive. That's why `fold` is so valuable. I hope the logic in this can help with ...
235,395
Right now USB C ports are just arriving in laptops and I unfortunately dedicated to go with a cheaper laptop (pc) but with thunderbolt-2. The thing I don't like about thunderbolt 2 products is the premium price you pay for the Lacie external drives with thunderbolt2. I hope that in the future USB-C devices will come ...
2016/04/19
[ "https://apple.stackexchange.com/questions/235395", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/180246/" ]
In specific. Thunderbolt can carry USB but USB cannot carry thunderbolt. In general, as long as your Mac has any Thunderbolt connector, it is highly likely you will be advantaged to connect over thunderbolt instead of using USB. For my money even Thunderbolt 1 is superior in many ways to the best USB 3 chipsets we ha...
this entire question is backwards... the old connection CANNOT be adapted to by a new one. You can't get an adapter to use USB-C drives on USB or Thunderbolt. You MAY be able to use Thunderbolt 2 on USB-C. USB-C is a faster connection, so you won't be able to shove it into a smaller pipe.
235,395
Right now USB C ports are just arriving in laptops and I unfortunately dedicated to go with a cheaper laptop (pc) but with thunderbolt-2. The thing I don't like about thunderbolt 2 products is the premium price you pay for the Lacie external drives with thunderbolt2. I hope that in the future USB-C devices will come ...
2016/04/19
[ "https://apple.stackexchange.com/questions/235395", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/180246/" ]
In specific. Thunderbolt can carry USB but USB cannot carry thunderbolt. In general, as long as your Mac has any Thunderbolt connector, it is highly likely you will be advantaged to connect over thunderbolt instead of using USB. For my money even Thunderbolt 1 is superior in many ways to the best USB 3 chipsets we ha...
> > Will there be a USB-C to thunderbolt 2 adaptor? > > > USB-C is a connector, Thunderbolt is a protocol, which makes this something of a nonsense question. USB-C can carry a number of protocols, including Thunderbolt and USB. Thunderbolt is a protocol used on USB-C and mini-DP connectors, if there are more exter...
235,395
Right now USB C ports are just arriving in laptops and I unfortunately dedicated to go with a cheaper laptop (pc) but with thunderbolt-2. The thing I don't like about thunderbolt 2 products is the premium price you pay for the Lacie external drives with thunderbolt2. I hope that in the future USB-C devices will come ...
2016/04/19
[ "https://apple.stackexchange.com/questions/235395", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/180246/" ]
> > Will there be a USB-C to thunderbolt 2 adaptor? > > > USB-C is a connector, Thunderbolt is a protocol, which makes this something of a nonsense question. USB-C can carry a number of protocols, including Thunderbolt and USB. Thunderbolt is a protocol used on USB-C and mini-DP connectors, if there are more exter...
this entire question is backwards... the old connection CANNOT be adapted to by a new one. You can't get an adapter to use USB-C drives on USB or Thunderbolt. You MAY be able to use Thunderbolt 2 on USB-C. USB-C is a faster connection, so you won't be able to shove it into a smaller pipe.
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I've had the same thing happen to me on my LG G2X running CyanogenMod. So I don't think it's related to your specific device or software. Moderate success has been reported using the "[FXR WiFi Fix And Rescue](https://market.android.com/details?id=com.brilliapps.wifiandmorefixer&hl=en)" app, and it's been tested on the...
I finally found an easy workaround that does NOT require me to restart my phone. (After one year of getting annoyed with this Wi-Fi "error" message on a crappy Samsung GT-I5500, running android 2.2) 1. In the Wi-Fi settings screen (where you toggle Wi-Fi on/off), tap your phone's `Menu` button to open a context menu a...
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I've had the same thing happen to me on my LG G2X running CyanogenMod. So I don't think it's related to your specific device or software. Moderate success has been reported using the "[FXR WiFi Fix And Rescue](https://market.android.com/details?id=com.brilliapps.wifiandmorefixer&hl=en)" app, and it's been tested on the...
I've had this happen to me 1 time. I don't think there's anything you can do about it except use the settings. Once you change it in settings, does it work again for you? I did the same in settings, but don't know if I rebooted after the fact. This could also be something in Nero v3 that is causing it.
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I've had this happen to me 1 time. I don't think there's anything you can do about it except use the settings. Once you change it in settings, does it work again for you? I did the same in settings, but don't know if I rebooted after the fact. This could also be something in Nero v3 that is causing it.
I have had the same annoying problem. I've found that the following sequence consistently restores my wifi to a working state: From the problematic "Turning on...." message in Settings -> Wifi: 1. Press-and-hold the Home button, to activate the Task Manager. 2. End any/all apps that are listed (often, these are recent...
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I've had this happen to me 1 time. I don't think there's anything you can do about it except use the settings. Once you change it in settings, does it work again for you? I did the same in settings, but don't know if I rebooted after the fact. This could also be something in Nero v3 that is causing it.
My belief is that this is a bug in google backing up remembered access points and unnecessarily restoring them. Try long clicking each remembered access point and select forget, next setup each access point password as you reconnect to each (or manually if you remember the ssid).
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I have had the same annoying problem. I've found that the following sequence consistently restores my wifi to a working state: From the problematic "Turning on...." message in Settings -> Wifi: 1. Press-and-hold the Home button, to activate the Task Manager. 2. End any/all apps that are listed (often, these are recent...
My belief is that this is a bug in google backing up remembered access points and unnecessarily restoring them. Try long clicking each remembered access point and select forget, next setup each access point password as you reconnect to each (or manually if you remember the ssid).
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I had all sorts of weird problems like this when using TouchWiz on my Droid Charge. No problems after installing LauncherPro. Perhaps its an odd bug in the TouchWiz code.
My belief is that this is a bug in google backing up remembered access points and unnecessarily restoring them. Try long clicking each remembered access point and select forget, next setup each access point password as you reconnect to each (or manually if you remember the ssid).
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I finally found an easy workaround that does NOT require me to restart my phone. (After one year of getting annoyed with this Wi-Fi "error" message on a crappy Samsung GT-I5500, running android 2.2) 1. In the Wi-Fi settings screen (where you toggle Wi-Fi on/off), tap your phone's `Menu` button to open a context menu a...
My belief is that this is a bug in google backing up remembered access points and unnecessarily restoring them. Try long clicking each remembered access point and select forget, next setup each access point password as you reconnect to each (or manually if you remember the ssid).
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I've had the same thing happen to me on my LG G2X running CyanogenMod. So I don't think it's related to your specific device or software. Moderate success has been reported using the "[FXR WiFi Fix And Rescue](https://market.android.com/details?id=com.brilliapps.wifiandmorefixer&hl=en)" app, and it's been tested on the...
I have had the same annoying problem. I've found that the following sequence consistently restores my wifi to a working state: From the problematic "Turning on...." message in Settings -> Wifi: 1. Press-and-hold the Home button, to activate the Task Manager. 2. End any/all apps that are listed (often, these are recent...
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I've had the same thing happen to me on my LG G2X running CyanogenMod. So I don't think it's related to your specific device or software. Moderate success has been reported using the "[FXR WiFi Fix And Rescue](https://market.android.com/details?id=com.brilliapps.wifiandmorefixer&hl=en)" app, and it's been tested on the...
My belief is that this is a bug in google backing up remembered access points and unnecessarily restoring them. Try long clicking each remembered access point and select forget, next setup each access point password as you reconnect to each (or manually if you remember the ssid).
4,504
Sometimes after I shut off Wi-Fi using the button inside the notification bar drop-down, I can't turn it back on with that button. Hitting the button does nothing, it's not even highlighted. When I go into `Settings -> Wireless and network -> Wi-Fi settings` the status under "Wi-Fi" shows Error. If I click "Wi-Fi" to t...
2011/01/07
[ "https://android.stackexchange.com/questions/4504", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1465/" ]
I've had this happen to me 1 time. I don't think there's anything you can do about it except use the settings. Once you change it in settings, does it work again for you? I did the same in settings, but don't know if I rebooted after the fact. This could also be something in Nero v3 that is causing it.
I had all sorts of weird problems like this when using TouchWiz on my Droid Charge. No problems after installing LauncherPro. Perhaps its an odd bug in the TouchWiz code.
284,791
I was looking at the identity $\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}, 1 \leq r \leq n$, so in the case $r = n$ we have $\binom{n}{n} = \binom{n-1}{n-1} + \binom{n-1}{n}$ that is $1 = 1 + \binom{n-1}{n}$ thus $\binom{n-1}{n} = 0$, am I right?
2013/01/23
[ "https://math.stackexchange.com/questions/284791", "https://math.stackexchange.com", "https://math.stackexchange.com/users/3353/" ]
This is asking how many ways you can take $n$ items from $n-1$ items - there are none. So you are correct.
In my small treatize about "[sums of like powers](http://go.helms-net.de/math/binomial_new/04_3_SummingOfLikePowers.pdf)" (pg 14 ff) where I "re-invented" the integrals of the Bernoulli polynomials by a matrix-approach, I arrived at a formulation, where setting $ x=\binom{n}{n+1}$ to $ {1 \over (n+1)\*(-1)!} \ne 0 $ wa...
52,094,672
this code throw NameError ``` def prime(x): global status for i in range(2, x): if x % i == 0: status = False break else: status = True return status mylist = [] for j in range(50): if prime(j): mylist.append() print(mylist) ```
2018/08/30
[ "https://Stackoverflow.com/questions/52094672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7884966/" ]
* You don't need `global` (you **never** need `global`) * Your first run of `prime` is `prime(0)` so `for i in range(2, 0)` never runs, meaning that `status` was not defined -- hence your error * you don't append anything to `mylist` --- ``` def prime(x): if x < 2: return False # 0, 1 are not prime f...
The problem is that `status` *is not guaranteed* to have a value. If you pass `x=0`, your loop doesn't run, and then you `return status`. What would its value be? If eg, you change your loop to `range(2, 10)` its runs fine (it doesn't make sense in your case, just trying to show the problem). However, since you just `...
216,585
I need to add one checkbox on checkout and call one function on checkbox change event, how can I do that? Check this screenshot for better understanding exactly what I need. [![enter image description here](https://i.stack.imgur.com/WvsEy.png)](https://i.stack.imgur.com/WvsEy.png)
2018/03/08
[ "https://magento.stackexchange.com/questions/216585", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/24840/" ]
Yes, i found a solution for checkbox change event. I have added this checkbox on shipping method section so the html checkbox available on this path. ``` /view/frontend/web/template/checkout/shipping/custom.html <input type="checkbox" name="custom" value="custom-fee" data-bind='checked: CheckVal'/> ``` Now, CheckV...
you can use ``` onCheckedChanged: function () { // do something } ``` in your js component > > vendor/magento/module-ui/view/base/web/js/form/element/single-checkbox.js > > >
10,389,845
I have a button like below. I have a list of buttons. When user clicks it, I run a javascript function and it makes an ajax request, if request response is success, then I change status attribute of button tag. I change it from 1 to 2. When the attribute status=1, I want user to see some text when hovering on button. ...
2012/04/30
[ "https://Stackoverflow.com/questions/10389845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429938/" ]
This may work, that way the event is checking the staus attr each time it is called, instead of just once at bind time. ``` function updateHoverStates() { $('button[status]').hover( function () { if($(this).attr('status') == '1') $(this).text('You are hovering'); }, ...
`change` events don't bubble up to the document, so `updateHoverStates` is probably not being called a second time.
10,389,845
I have a button like below. I have a list of buttons. When user clicks it, I run a javascript function and it makes an ajax request, if request response is success, then I change status attribute of button tag. I change it from 1 to 2. When the attribute status=1, I want user to see some text when hovering on button. ...
2012/04/30
[ "https://Stackoverflow.com/questions/10389845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429938/" ]
jsFiddle: <http://jsfiddle.net/ajzsv/20/> ``` <button onclick="dosomething()" id="someid" status="1">name</button> <script> function dosomething() { $('#someid').attr('status', '2'); $('#someid').unbind('hover'); } $(document).ready( function() { $('button').each( function() { $(this).hover( ...
`change` events don't bubble up to the document, so `updateHoverStates` is probably not being called a second time.
10,389,845
I have a button like below. I have a list of buttons. When user clicks it, I run a javascript function and it makes an ajax request, if request response is success, then I change status attribute of button tag. I change it from 1 to 2. When the attribute status=1, I want user to see some text when hovering on button. ...
2012/04/30
[ "https://Stackoverflow.com/questions/10389845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429938/" ]
This may work, that way the event is checking the staus attr each time it is called, instead of just once at bind time. ``` function updateHoverStates() { $('button[status]').hover( function () { if($(this).attr('status') == '1') $(this).text('You are hovering'); }, ...
You once set the hover function for all buttons that matched the selector `button[status=1]`. You changed the `status` attribute later, but that doesn't detach the hover event listeners from those buttons. In the function where you set ``` $('#someid').attr('status', '2'); ``` you should simply remove the event lis...
10,389,845
I have a button like below. I have a list of buttons. When user clicks it, I run a javascript function and it makes an ajax request, if request response is success, then I change status attribute of button tag. I change it from 1 to 2. When the attribute status=1, I want user to see some text when hovering on button. ...
2012/04/30
[ "https://Stackoverflow.com/questions/10389845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429938/" ]
jsFiddle: <http://jsfiddle.net/ajzsv/20/> ``` <button onclick="dosomething()" id="someid" status="1">name</button> <script> function dosomething() { $('#someid').attr('status', '2'); $('#someid').unbind('hover'); } $(document).ready( function() { $('button').each( function() { $(this).hover( ...
You once set the hover function for all buttons that matched the selector `button[status=1]`. You changed the `status` attribute later, but that doesn't detach the hover event listeners from those buttons. In the function where you set ``` $('#someid').attr('status', '2'); ``` you should simply remove the event lis...
10,389,845
I have a button like below. I have a list of buttons. When user clicks it, I run a javascript function and it makes an ajax request, if request response is success, then I change status attribute of button tag. I change it from 1 to 2. When the attribute status=1, I want user to see some text when hovering on button. ...
2012/04/30
[ "https://Stackoverflow.com/questions/10389845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/429938/" ]
This may work, that way the event is checking the staus attr each time it is called, instead of just once at bind time. ``` function updateHoverStates() { $('button[status]').hover( function () { if($(this).attr('status') == '1') $(this).text('You are hovering'); }, ...
jsFiddle: <http://jsfiddle.net/ajzsv/20/> ``` <button onclick="dosomething()" id="someid" status="1">name</button> <script> function dosomething() { $('#someid').attr('status', '2'); $('#someid').unbind('hover'); } $(document).ready( function() { $('button').each( function() { $(this).hover( ...
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
The complex projective line is the union of the two open subsets $$ D\_i=\{[z\_0:z\_1]\text{ such that }z\_i\neq0\},\quad i=0, 1. $$ Each of them is homeomorphic to $\Bbb C$, hence to the open unit disk. Compacteness follows from the fact that it is homeomorphic to the sphere $S^2$. You can see this as a simple elabor...
Yes. In fact, the complex projective line "is" the [Riemann Sphere](http://en.wikipedia.org/wiki/Projective_line#Complex_projective_line%3a_the_Riemann_sphere).
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
The maps you gave are the coordinate charts on $\mathbb{C}\mathbb{P}^1$ that makes it into a manifold. In particular, they are bijective. If we take $\phi\_0^{-1}(D)$, we get all point $[1:z]$, with $z\in D$. Similarly, $\phi\_0^{-1}(D)$ is all points of the form $[z:1]$. Together, these sets cover $\mathbb{C}\mathbb...
The complex projective line is the union of the two open subsets $$ D\_i=\{[z\_0:z\_1]\text{ such that }z\_i\neq0\},\quad i=0, 1. $$ Each of them is homeomorphic to $\Bbb C$, hence to the open unit disk. Compacteness follows from the fact that it is homeomorphic to the sphere $S^2$. You can see this as a simple elabor...
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
The complex projective line is the union of the two open subsets $$ D\_i=\{[z\_0:z\_1]\text{ such that }z\_i\neq0\},\quad i=0, 1. $$ Each of them is homeomorphic to $\Bbb C$, hence to the open unit disk. Compacteness follows from the fact that it is homeomorphic to the sphere $S^2$. You can see this as a simple elabor...
The argument you have outlined appeals to the following lemma of general topology. **Lemma.** Let $X$ be a topological space. If there are (quasi)compact subsets $Y\_1, \ldots, Y\_n$ such that $Y\_1 \cup \cdots \cup Y\_n = X$, then $X$ is itself (quasi)compact. *Proof.* Let $\{ U\_\alpha : \alpha \in I \}$ be an open...
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
The maps you gave are the coordinate charts on $\mathbb{C}\mathbb{P}^1$ that makes it into a manifold. In particular, they are bijective. If we take $\phi\_0^{-1}(D)$, we get all point $[1:z]$, with $z\in D$. Similarly, $\phi\_0^{-1}(D)$ is all points of the form $[z:1]$. Together, these sets cover $\mathbb{C}\mathbb...
Yes. In fact, the complex projective line "is" the [Riemann Sphere](http://en.wikipedia.org/wiki/Projective_line#Complex_projective_line%3a_the_Riemann_sphere).
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
So you had two questions, one about the charts covering the space, and one about compactness. The first has been answered, but i would like to add some details. So you do see that the $U\_i = \phi\_i^{-1}(\mathbb{C})$ for $i=0,1$ cover $\mathbb{C} P^1$ right? My claim is now that we can restrict to the closed disks in...
Yes. In fact, the complex projective line "is" the [Riemann Sphere](http://en.wikipedia.org/wiki/Projective_line#Complex_projective_line%3a_the_Riemann_sphere).
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
The maps you gave are the coordinate charts on $\mathbb{C}\mathbb{P}^1$ that makes it into a manifold. In particular, they are bijective. If we take $\phi\_0^{-1}(D)$, we get all point $[1:z]$, with $z\in D$. Similarly, $\phi\_0^{-1}(D)$ is all points of the form $[z:1]$. Together, these sets cover $\mathbb{C}\mathbb...
The argument you have outlined appeals to the following lemma of general topology. **Lemma.** Let $X$ be a topological space. If there are (quasi)compact subsets $Y\_1, \ldots, Y\_n$ such that $Y\_1 \cup \cdots \cup Y\_n = X$, then $X$ is itself (quasi)compact. *Proof.* Let $\{ U\_\alpha : \alpha \in I \}$ be an open...
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
The maps you gave are the coordinate charts on $\mathbb{C}\mathbb{P}^1$ that makes it into a manifold. In particular, they are bijective. If we take $\phi\_0^{-1}(D)$, we get all point $[1:z]$, with $z\in D$. Similarly, $\phi\_0^{-1}(D)$ is all points of the form $[z:1]$. Together, these sets cover $\mathbb{C}\mathbb...
So you had two questions, one about the charts covering the space, and one about compactness. The first has been answered, but i would like to add some details. So you do see that the $U\_i = \phi\_i^{-1}(\mathbb{C})$ for $i=0,1$ cover $\mathbb{C} P^1$ right? My claim is now that we can restrict to the closed disks in...
174,989
I am stumped on the following question > > > > > > PQRS is a parallelogram and ST=TR. What is the ratio of area of triangle QST to the area of parallelogram (Ans 1:4) > > > > > > > > > ![enter image description here](https://i.stack.imgur.com/o9JYN.png) I need the height of the triangle, how would I get tha...
2012/07/25
[ "https://math.stackexchange.com/questions/174989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29209/" ]
So you had two questions, one about the charts covering the space, and one about compactness. The first has been answered, but i would like to add some details. So you do see that the $U\_i = \phi\_i^{-1}(\mathbb{C})$ for $i=0,1$ cover $\mathbb{C} P^1$ right? My claim is now that we can restrict to the closed disks in...
The argument you have outlined appeals to the following lemma of general topology. **Lemma.** Let $X$ be a topological space. If there are (quasi)compact subsets $Y\_1, \ldots, Y\_n$ such that $Y\_1 \cup \cdots \cup Y\_n = X$, then $X$ is itself (quasi)compact. *Proof.* Let $\{ U\_\alpha : \alpha \in I \}$ be an open...
22,621,189
when i try to query database to retrive activity for selected crew, i give "Loca Sequence Error" this is the code: ``` private Lst_active as new entityset(of Activity) private crw_list as new entityset(of Crew) checklistbox.Items.addrange(Dbase.Crew) ``` then i choose from all crew in checklistbox and selected ...
2014/03/24
[ "https://Stackoverflow.com/questions/22621189", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2474087/" ]
As Ivan pointed out, your `return` value does not match what you're assigning it to: ``` my %names = getNames(\@info); sub getNames { ... return \%names; } ``` `%names` excepts an even number of elements because it's a hash, but you're assigning it a reference to a hash, which is a single element. Hence the...
The problem is that you're trying to assign hash reference to hash `my %names=getNames(\@info);`. Change it to work with reference: ``` my $names = getNames(\@info); ``` Or return hash: ``` return %names; ```
39,422,140
I am trying to move recursively through each Node in a List class to find if a certain integer exists in one of the Nodes in the list. This is my header file: ``` class List { public: bool find(int d) const { return false; } private: Node *head; bool findNode(const Node*, int) const; }; ``` Here is th...
2016/09/10
[ "https://Stackoverflow.com/questions/39422140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5988165/" ]
This can definitely be done. You can use the standard rails form or the [`simple_form`](https://github.com/plataformatec/simple_form) gem to do this. For example if you had categories and items to display, your standard rails form would look like this: ``` <%= form_for @item do |f| %> <%= f.grouped_collection_s...
For more flexible adjustment you can use select2 <https://select2.github.io>
15,062,926
I was wondering how to fix my program which asks for user input on any number. To terminate the program, you input -99. Everything goes well as far as input goes, until I hit -99 to stop the program where it becomes the minimum. This is my code. The final answer for the minimum value cannot be -99. ``` s = -99 n = 1 ...
2013/02/25
[ "https://Stackoverflow.com/questions/15062926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2106570/" ]
``` 1. n = 1 2. 1 == -99 ? 3. n = new input 4. set new minimum from n 5. n == -99? ``` First (4.) you set the new minimum from `n` (also if `n==-99`), any only then (5.) you test whether it is the value to stop. I would suggest to change the loop into an infinite loop (`while True`) and then test whether it is -99 (...
You need to check if the number is -99 at the end of the loop. You will want to get n before the loop as well. Also, you need to use a try block on float in case a non-float is input (float raises an exception here, not return None): ``` import sys s = -99 n = 1 minimum = None maximum = None print ("Enter a series of...
26,716,552
I am new to SailsJS and stuck in Data Model as follows: I have a `User` model as follows: ``` module.exports = { attributes: { firstName: { type: 'string' }, email: { type: 'email', required: true }, password: { type: 'String' }, passwordSalt: { type: 'String' }, projects:{ collection: 'ProjectM...
2014/11/03
[ "https://Stackoverflow.com/questions/26716552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1355500/" ]
I'm not sure about your question, but this will return a list of required attributes for any model ``` _.find(sails.models.<YOUR MODEL>._attributes, function(attr){return attr.required}) ``` If your intent it to simply remove undesirable fields you can override the toJSON / toObject methods see <https://github.com/...
User.find({select:['firstName', 'email']}).exec()
27,351,131
I have three different domains all on the same server and I want to run the code on all three domains from one source on the same server, but not sure the best way. Here's what I have: domain01.com domain02.com domain03.com domain04.com/sourcecode I want domain01-03 to run the code inside domain04.com/sourcecode so ...
2014/12/08
[ "https://Stackoverflow.com/questions/27351131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1431633/" ]
All you need to do is create a mapping on the first three sites to the appropriate directory in the fourth site, eg map `/domain04` to `/full/path/to/domain04/sourcecode`, then refererence its CFML resources via /domain04 in CFC and include paths. The inference here is the code does need to be accessible via the file s...
Are you using a framework? One like ColdBox could make this trivial if your code is written modularly. (Disclaimer, I am affiliated with ColdBox) If not, it really depends on what the code is. CFCs can be mapped anywhere via ColdFusion mappings. Even .cfm files can be included as long as the file systems are visible....
38,519,002
I'm new to using gulp and am trying to create a gulpfile for my project. My first task is to combine all my script and link tags present in index.html and replace them with only a single tag. To achieve this purpose, I'm making use of gulp-useref as below. ``` gulp.task('useref', ['clean'], function () { return ...
2016/07/22
[ "https://Stackoverflow.com/questions/38519002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5427335/" ]
I'm not sure if this is the ideal way to solve the problem, but my solution was to apply `gulpif` to filter out css/js assets and then call `rev()`. `revReplace` should still update your index file to use the renamed css/js assets. Essentially you can add the following pipe to your stream: ``` .pipe(gulpif(*.{js,css}...
try ``` var ignoreIndexHtml = gulpfilter(['**/*', '!**/index.html'], { restore: true }); return gulp .src('......') .pipe('......') .pipe('......') .pipe(ignoreIndexHtml) .pipe($.rev()) .pipe(ignoreIndexHtml.restore) .pipe($.revReplace()) .pipe(gulp.dest('......')); ```
38,519,002
I'm new to using gulp and am trying to create a gulpfile for my project. My first task is to combine all my script and link tags present in index.html and replace them with only a single tag. To achieve this purpose, I'm making use of gulp-useref as below. ``` gulp.task('useref', ['clean'], function () { return ...
2016/07/22
[ "https://Stackoverflow.com/questions/38519002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5427335/" ]
I had the same issue, but I was using `gulp-rev-all` instead of `gulp-rev` like you are. My solution (workaround) will still work for you and others that are interested. Essentially, you need to run another gulp-task after you 'rev' all of your files. I use `gulp-inject` to grab the newly revisioned files, and injec...
try ``` var ignoreIndexHtml = gulpfilter(['**/*', '!**/index.html'], { restore: true }); return gulp .src('......') .pipe('......') .pipe('......') .pipe(ignoreIndexHtml) .pipe($.rev()) .pipe(ignoreIndexHtml.restore) .pipe($.revReplace()) .pipe(gulp.dest('......')); ```
38,519,002
I'm new to using gulp and am trying to create a gulpfile for my project. My first task is to combine all my script and link tags present in index.html and replace them with only a single tag. To achieve this purpose, I'm making use of gulp-useref as below. ``` gulp.task('useref', ['clean'], function () { return ...
2016/07/22
[ "https://Stackoverflow.com/questions/38519002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5427335/" ]
I'm not sure if this is the ideal way to solve the problem, but my solution was to apply `gulpif` to filter out css/js assets and then call `rev()`. `revReplace` should still update your index file to use the renamed css/js assets. Essentially you can add the following pipe to your stream: ``` .pipe(gulpif(*.{js,css}...
I had the same issue, but I was using `gulp-rev-all` instead of `gulp-rev` like you are. My solution (workaround) will still work for you and others that are interested. Essentially, you need to run another gulp-task after you 'rev' all of your files. I use `gulp-inject` to grab the newly revisioned files, and injec...
44,509
It is commonly believed that for all $\epsilon > 0$, it is possible to multiply two $n \times n$ matrices in $O(n^{2 + \epsilon})$ time. Some discussion is [here](https://cstheory.stackexchange.com/questions/5341/evidence-that-matrix-multiplication-can-be-done-in-quadratic-time). I have asked some people who are more ...
2019/09/09
[ "https://cstheory.stackexchange.com/questions/44509", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/53716/" ]
There's an algorithm for multiplying an $N \times N^{0.172}$ matrix with an $N^{0.172} \times N$ matrix in $N^2 \operatorname{polylog}\left(N\right)$ arithmetic operations. The main identity used for it comes from Coppersmith's paper "Rapid multiplication of rectangular matrices", but the explanation for why it leads t...
Josh Alman showed some cool lower bound results of MM, which won CCC 2019 best student paper award! <http://drops.dagstuhl.de/opus/volltexte/2019/10834/pdf/LIPIcs-CCC-2019-12.pdf>
44,509
It is commonly believed that for all $\epsilon > 0$, it is possible to multiply two $n \times n$ matrices in $O(n^{2 + \epsilon})$ time. Some discussion is [here](https://cstheory.stackexchange.com/questions/5341/evidence-that-matrix-multiplication-can-be-done-in-quadratic-time). I have asked some people who are more ...
2019/09/09
[ "https://cstheory.stackexchange.com/questions/44509", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/53716/" ]
There's an algorithm for multiplying an $N \times N^{0.172}$ matrix with an $N^{0.172} \times N$ matrix in $N^2 \operatorname{polylog}\left(N\right)$ arithmetic operations. The main identity used for it comes from Coppersmith's paper "Rapid multiplication of rectangular matrices", but the explanation for why it leads t...
Well, one thing is I think that all the constructions we know of - and even the families of potential constructions that people have proposed (e.g., Cohn-Umans approaches, generalizations of Coppersmith-Winograd) - would "simply" produce a family of algorithms $A\_\epsilon$ running in time $O(n^{2+\epsilon})$. So to ha...
27,789,197
There's a div in my page that gets styling from my company's custom CSS files. Some of this styling messes up how my div is displayed/positioned. I tracked it down to being a `display: inline-block;`. Using Chrome developer tool's elements tab, when I deselect this specific line, my element displays properly: ![Just ...
2015/01/05
[ "https://Stackoverflow.com/questions/27789197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1594232/" ]
If your pointers alias, the two dereferences are required. Think about what your algorithm does if you have `a == c`. If they can't alias, you need to add some `restrict` keywords. Here's an example that optimizes the way you expect: ``` #include <stdint.h> void f(uint32_t * restrict a, uint32_t * restrict b, uint32_...
Consecutive execution of `ldr rX, [rX]` would mean double dereferencing of whatever `rX` is pointing. If I got your question right, first one as you say is: ``` ldr r2, [r2] ; r2 <- &(*c) ``` then second one becomes ``` ldr r2, [r2] ; r2 <- *(r2) ``` If that's not the question then from [GCC docs](https://gcc.gn...
27,789,197
There's a div in my page that gets styling from my company's custom CSS files. Some of this styling messes up how my div is displayed/positioned. I tracked it down to being a `display: inline-block;`. Using Chrome developer tool's elements tab, when I deselect this specific line, my element displays properly: ![Just ...
2015/01/05
[ "https://Stackoverflow.com/questions/27789197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1594232/" ]
the add destroys r0 so we lose the value of c and have to reload it ``` ldr r2, .L2+4 get address of .data location of *c from .text ... ldr r2, [r2] ; r2 = pointer to c ... ldr r0, [r2] ; r0 = c ... add r0, ip, r0 ; this destroys r0 it no longer holds the value of c ... ldr r2, [r2] ; need the value of c again to ...
Consecutive execution of `ldr rX, [rX]` would mean double dereferencing of whatever `rX` is pointing. If I got your question right, first one as you say is: ``` ldr r2, [r2] ; r2 <- &(*c) ``` then second one becomes ``` ldr r2, [r2] ; r2 <- *(r2) ``` If that's not the question then from [GCC docs](https://gcc.gn...
27,789,197
There's a div in my page that gets styling from my company's custom CSS files. Some of this styling messes up how my div is displayed/positioned. I tracked it down to being a `display: inline-block;`. Using Chrome developer tool's elements tab, when I deselect this specific line, my element displays properly: ![Just ...
2015/01/05
[ "https://Stackoverflow.com/questions/27789197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1594232/" ]
If your pointers alias, the two dereferences are required. Think about what your algorithm does if you have `a == c`. If they can't alias, you need to add some `restrict` keywords. Here's an example that optimizes the way you expect: ``` #include <stdint.h> void f(uint32_t * restrict a, uint32_t * restrict b, uint32_...
the add destroys r0 so we lose the value of c and have to reload it ``` ldr r2, .L2+4 get address of .data location of *c from .text ... ldr r2, [r2] ; r2 = pointer to c ... ldr r0, [r2] ; r0 = c ... add r0, ip, r0 ; this destroys r0 it no longer holds the value of c ... ldr r2, [r2] ; need the value of c again to ...
66,721,983
I am running into weird issue with Vscode integrated terminal. It cannot find a git repository, while my normal linux terminal finds it perfectly fine. Below image clearly tells the problem. What might be the issue here? [![enter image description here](https://i.stack.imgur.com/OZsZY.png)](https://i.stack.imgur.com/O...
2021/03/20
[ "https://Stackoverflow.com/questions/66721983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8663277/" ]
I had the same issue and what worked for me is to disable **Git: Terminal Authentication** in the settings. It will prompt the username and the password in the terminal. Hope that this solution/workaround is good for other people. From this site I found this solution/workaround: <https://github.com/microsoft/vscode/is...
I have had a few strange issues with VSCode git integration versus working in the integrated terminal. For example, sometimes the git integration in VSCode and and in the terminal disagree with each other, and sometimes the terminal's history is apparently corrupted by VS Code. See my question here: [Why do I get a di...
44,804,061
I'm trying to add a drop-cap feature using css selectors `first-of-type` and `first-letter`. This is for a WordPress site and the issue I'm having is that some posts could be build using visual composer while others could be built using the standard editor. That means that the inner html structure of the content chan...
2017/06/28
[ "https://Stackoverflow.com/questions/44804061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1511550/" ]
Just use: ``` .post_content:first-letter{ font-size:34px; color: red; } ``` The complex query was not working because :first-letter applies the style on the first letter from the selector.
I hope it helps you to achieve desired effect. Add this `CSS` to your stylesheet.. ``` div.post_content * > p:first-of-type:first-letter { font-size: 24px; } ``` It will select all nested elements no matter how many. This asterisk `*` is a wildcard here. **Update:** I have tinkered a bit with your...
44,804,061
I'm trying to add a drop-cap feature using css selectors `first-of-type` and `first-letter`. This is for a WordPress site and the issue I'm having is that some posts could be build using visual composer while others could be built using the standard editor. That means that the inner html structure of the content chan...
2017/06/28
[ "https://Stackoverflow.com/questions/44804061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1511550/" ]
Just use: ``` .post_content:first-letter{ font-size:34px; color: red; } ``` The complex query was not working because :first-letter applies the style on the first letter from the selector.
Since `::first-letter` applies to the "first letter of the first line of a block-level element" you can just target the `.post_content`: ``` .post_content:first-letter { font-size: 48px; } ``` <https://developer.mozilla.org/en-US/docs/Web/CSS/::first-letter> demo: <https://codepen.io/anon/pen/KqZYgy>
5,662,394
Why can't I create an array of List ? ``` List<String>[] nav = new List<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of List" or ``` ArrayList<String>[] nav = new ArrayList<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of ArrayLis...
2011/04/14
[ "https://Stackoverflow.com/questions/5662394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/495987/" ]
Well, [generics tutorial](http://docs.oracle.com/javase/tutorial/extra/generics/fineprint.html) give the answer to your question. > > The component type of an array object > may not be a type variable or a > parameterized type, unless it is an > (unbounded) wildcard type.You can > declare array *types* whose elem...
You can't create arrays of generic types, generally. The reason is that the JVM has no way to check that only the right objects are put into it (with ArrayStoreExceptions), since the difference between `List<String>` and `List<Integer>` are nonexistent at runtime. Of course, you can trick the compiler by using the ra...
5,662,394
Why can't I create an array of List ? ``` List<String>[] nav = new List<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of List" or ``` ArrayList<String>[] nav = new ArrayList<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of ArrayLis...
2011/04/14
[ "https://Stackoverflow.com/questions/5662394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/495987/" ]
You can't create arrays of generic types, generally. The reason is that the JVM has no way to check that only the right objects are put into it (with ArrayStoreExceptions), since the difference between `List<String>` and `List<Integer>` are nonexistent at runtime. Of course, you can trick the compiler by using the ra...
No exact answer, but a tip: Last example has a raw type warning because you omitted the typization of the list; it is generally a better (type safe) approach to specify which object types are contained in the list, which you already did in the previous examples (`List<String>` instead of `List`). Using arrays is not ...
5,662,394
Why can't I create an array of List ? ``` List<String>[] nav = new List<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of List" or ``` ArrayList<String>[] nav = new ArrayList<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of ArrayLis...
2011/04/14
[ "https://Stackoverflow.com/questions/5662394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/495987/" ]
You can't create arrays of generic types, generally. The reason is that the JVM has no way to check that only the right objects are put into it (with ArrayStoreExceptions), since the difference between `List<String>` and `List<Integer>` are nonexistent at runtime. Of course, you can trick the compiler by using the ra...
Another solution is to extend `LinkedList<String>` (or `ArrayList<String>`, etc.), then create an array of the subclass. ``` private static class StringList extends LinkedList<String> {} public static void main(String[] args) { StringList[] strings = new StringList[2]; strings[0] = new StringList(); strin...
5,662,394
Why can't I create an array of List ? ``` List<String>[] nav = new List<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of List" or ``` ArrayList<String>[] nav = new ArrayList<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of ArrayLis...
2011/04/14
[ "https://Stackoverflow.com/questions/5662394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/495987/" ]
Well, [generics tutorial](http://docs.oracle.com/javase/tutorial/extra/generics/fineprint.html) give the answer to your question. > > The component type of an array object > may not be a type variable or a > parameterized type, unless it is an > (unbounded) wildcard type.You can > declare array *types* whose elem...
No exact answer, but a tip: Last example has a raw type warning because you omitted the typization of the list; it is generally a better (type safe) approach to specify which object types are contained in the list, which you already did in the previous examples (`List<String>` instead of `List`). Using arrays is not ...
5,662,394
Why can't I create an array of List ? ``` List<String>[] nav = new List<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of List" or ``` ArrayList<String>[] nav = new ArrayList<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of ArrayLis...
2011/04/14
[ "https://Stackoverflow.com/questions/5662394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/495987/" ]
Well, [generics tutorial](http://docs.oracle.com/javase/tutorial/extra/generics/fineprint.html) give the answer to your question. > > The component type of an array object > may not be a type variable or a > parameterized type, unless it is an > (unbounded) wildcard type.You can > declare array *types* whose elem...
Another solution is to extend `LinkedList<String>` (or `ArrayList<String>`, etc.), then create an array of the subclass. ``` private static class StringList extends LinkedList<String> {} public static void main(String[] args) { StringList[] strings = new StringList[2]; strings[0] = new StringList(); strin...
5,662,394
Why can't I create an array of List ? ``` List<String>[] nav = new List<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of List" or ``` ArrayList<String>[] nav = new ArrayList<String>[] { new ArrayList<String>() }; ``` Eclipse says "Cannot create a generic array of ArrayLis...
2011/04/14
[ "https://Stackoverflow.com/questions/5662394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/495987/" ]
No exact answer, but a tip: Last example has a raw type warning because you omitted the typization of the list; it is generally a better (type safe) approach to specify which object types are contained in the list, which you already did in the previous examples (`List<String>` instead of `List`). Using arrays is not ...
Another solution is to extend `LinkedList<String>` (or `ArrayList<String>`, etc.), then create an array of the subclass. ``` private static class StringList extends LinkedList<String> {} public static void main(String[] args) { StringList[] strings = new StringList[2]; strings[0] = new StringList(); strin...
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
Please try `hj.pageVisit.property.get('userId')`. This one has returned a proper userId for me today.
It looks like it is not available in DOM right now. According to Hotjar support: > > ...this change came about when we moved towards supporting Single Page > Apps. I'm told that we may provide this ability again in the future, > though I don't have an ETA for it at the moment, as we're currently > focusing on imp...
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
Having looked at the JS file loaded by HotJar i discovered the following code ``` hj.hq.isUndefined(hj.globals.get("userId")) ``` From that i extracted the following ``` hj.globals.get("userId") ``` And this works for me as of today. Hope this helps someone else. Please let me know if it has worked in all cases.
Try this, but check with `setTimeout` until you get a value: ``` hj.pageVisit.property.get('userId'). ``` OBS: In IE don't run this code... getting `undefined` value in response.
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
Please try `hj.pageVisit.property.get('userId')`. This one has returned a proper userId for me today.
Having looked at the JS file loaded by HotJar i discovered the following code ``` hj.hq.isUndefined(hj.globals.get("userId")) ``` From that i extracted the following ``` hj.globals.get("userId") ``` And this works for me as of today. Hope this helps someone else. Please let me know if it has worked in all cases.
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
As of FEB 2019 you can use the following to get the Hotjar User ID: ``` hj.globals.get("userId").split("-").shift() ```
This code worked for me: ``` hj.globals.key.split("-").shift() ``` If you are using GTM, use `setTimeout` or [Tag sequencing](https://support.google.com/tagmanager/answer/6238868?hl=en) to make sure this is triggered after hotjar Tag is loaded.
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
Please try `hj.pageVisit.property.get('userId')`. This one has returned a proper userId for me today.
Try this, but check with `setTimeout` until you get a value: ``` hj.pageVisit.property.get('userId'). ``` OBS: In IE don't run this code... getting `undefined` value in response.
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
As of FEB 2019 you can use the following to get the Hotjar User ID: ``` hj.globals.get("userId").split("-").shift() ```
It looks like it is not available in DOM right now. According to Hotjar support: > > ...this change came about when we moved towards supporting Single Page > Apps. I'm told that we may provide this ability again in the future, > though I don't have an ETA for it at the moment, as we're currently > focusing on imp...
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
As of FEB 2019 you can use the following to get the Hotjar User ID: ``` hj.globals.get("userId").split("-").shift() ```
Try this, but check with `setTimeout` until you get a value: ``` hj.pageVisit.property.get('userId'). ``` OBS: In IE don't run this code... getting `undefined` value in response.
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
It looks like it is not available in DOM right now. According to Hotjar support: > > ...this change came about when we moved towards supporting Single Page > Apps. I'm told that we may provide this ability again in the future, > though I don't have an ETA for it at the moment, as we're currently > focusing on imp...
This code worked for me: ``` hj.globals.key.split("-").shift() ``` If you are using GTM, use `setTimeout` or [Tag sequencing](https://support.google.com/tagmanager/answer/6238868?hl=en) to make sure this is triggered after hotjar Tag is loaded.
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
Please try `hj.pageVisit.property.get('userId')`. This one has returned a proper userId for me today.
This code worked for me: ``` hj.globals.key.split("-").shift() ``` If you are using GTM, use `setTimeout` or [Tag sequencing](https://support.google.com/tagmanager/answer/6238868?hl=en) to make sure this is triggered after hotjar Tag is loaded.
40,644,792
We have a setup where we capture Hotjar User ID in Google Tag Manager and then pass it as a custom dimension to Google Analytics. It's done to simply merge and cross-reference both data sources. We used the following code to capture the User ID: `function() { return hj.property.get('userId'); }` 2 days back we stop...
2016/11/17
[ "https://Stackoverflow.com/questions/40644792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7170306/" ]
Having looked at the JS file loaded by HotJar i discovered the following code ``` hj.hq.isUndefined(hj.globals.get("userId")) ``` From that i extracted the following ``` hj.globals.get("userId") ``` And this works for me as of today. Hope this helps someone else. Please let me know if it has worked in all cases.
It looks like it is not available in DOM right now. According to Hotjar support: > > ...this change came about when we moved towards supporting Single Page > Apps. I'm told that we may provide this ability again in the future, > though I don't have an ETA for it at the moment, as we're currently > focusing on imp...
62,432,752
Stumbled upon a strange behavior. This formula: ```none =ARRAYFORMULA(ROW($A$1:$E$5)) ``` Returns a 5 element column with the row numbers from 1 to 5. I thought that `ARRAYFORMULA` would iterate through every cell in the range specified and execute the `ROW()` on it - resulting in a new range of the same size (5 col...
2020/06/17
[ "https://Stackoverflow.com/questions/62432752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/279806/" ]
I think a lot of people use: ``` =ARRAYFORMULA(IF(COLUMN(A1:E5),ROW(A1:E5))) ``` There are a lot of ways to do it, but almost all will involve using two refs. This is about as small as I could get it. Depends on what your inputs look like as to whether this would make sense to use. ``` =ARRAYFORMULA(SEQUENCE(1,5,0...
Here is a workaround for you, man: ```none =ARRAYFORMULA(ROW($A$1:$E$5) + 0 * ISBLANK(A1:E5)) ``` `0 * ISBLANK(A1:E5)` part is there just to force the desired behavior without modifying (see that multiplication by `0`?) the values you need. [![enter image description here](https://i.stack.imgur.com/Gjy1T.png)](http...