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
58,830,730
sorry about the code it is sloppy right now because I've been trying to fix it. Im using a function from another file to remove even numbers from my list but after I call the function the list returns empty. ``` from usefullFunctions import * def main (): mylist1 = uRandomList(10,0,15) listLength = len(mylist1...
2019/11/13
[ "https://Stackoverflow.com/questions/58830730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12364686/" ]
Its either a subquery or a group by query. Cant tell without the schema. Add the table definitions to your question and it will likely be a simple answer, unless this is already enough information. As a completely guessed view of your data, it will be: ``` select CourseNumber,CourseName,Department,count(*) as Number...
This is a case where a correlated subquery is a good option: ``` select c.*, (select count(*) from sections s where s.course_number = c.course_number) as num_sections from courses c; ``` Why do I propose this? With an index on `sections(course_number)` this is probably the fastest method (unless your data is ...
32,404,195
I have written the following code to get eigenvalues and determinant of the matrix in fortran with the use of cgeev: ``` SUBROUTINE CDETS(CS,CW,CDET,N) IMPLICIT REAL*8 (A,B,D-H,O-Z) IMPLICIT COMPLEX*16 (C) DIMENSION CW(*),CS(N,*) ALLOCATABLE :: CWK(:), WK(:), CWL(:,:),CWR(:,:) ALLOCATE (WK(2*N),CWK(10*N),CWL(N,N),CWR...
2015/09/04
[ "https://Stackoverflow.com/questions/32404195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3511967/" ]
You are using the wrong procedure. The argument types between `cgeev` and `zgeev` are the same but differ in kinds. For `zgeev`, the array `RWORK` is of type and kind of `double precision` and the arrays `A`, `VL`, `VR`, `W`, and `WORK` are `complex*16`. For `cgeev` the types and kinds, respectively are `real` and `com...
I found a way to fix this, but **cgeev** seems to be broken. If you replace **cgeev** with another lapack routine **zgeev** it works perfectly. Most pleasant part is I had to change only one letter.
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
C can certainly do it - the [`ls(1)`](http://www.manpagez.com/man/1/ls/) command can, for example, and it's written in C. To iterate over a directory, you can use the [`opendir(3)`](http://www.manpagez.com/man/3/opendir/) and [`readdir(3)`](http://www.manpagez.com/man/3/readdir/) functions. It's probably easier to jus...
This seems strangely similar to another question I saw recently. Anyway, here's my strangely similar answer (for Linux, not sure how it'll fare on Windows 7): ``` #include <stdio.h> #include <dirent.h> #include <sys/stat.h> int main(int argc, char *argv[]) { struct stat file_stats; DIR *dirp; struct diren...
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
C can certainly do it - the [`ls(1)`](http://www.manpagez.com/man/1/ls/) command can, for example, and it's written in C. To iterate over a directory, you can use the [`opendir(3)`](http://www.manpagez.com/man/3/opendir/) and [`readdir(3)`](http://www.manpagez.com/man/3/readdir/) functions. It's probably easier to jus...
To read a list of files in a directory look at [opendir](http://linux.die.net/man/3/opendir), [readdir](http://linux.die.net/man/3/readdir), closedir for Linux use [stat](http://linux.die.net/man/2/stat) to get the length of the file. These are of Linux For winodws see <http://msdn.microsoft.com/en-gb/library/window...
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
C can certainly do it - the [`ls(1)`](http://www.manpagez.com/man/1/ls/) command can, for example, and it's written in C. To iterate over a directory, you can use the [`opendir(3)`](http://www.manpagez.com/man/3/opendir/) and [`readdir(3)`](http://www.manpagez.com/man/3/readdir/) functions. It's probably easier to jus...
There are little things need to be taken care for the given examples (under Linux or other UNIX). 1. You properly only want to print out the file name and size of a regular file only. Use `S_ISREG()` to test the `st_mode` field 2. If you want to recursively print out all files under sub directories also, you then need...
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
To read a list of files in a directory look at [opendir](http://linux.die.net/man/3/opendir), [readdir](http://linux.die.net/man/3/readdir), closedir for Linux use [stat](http://linux.die.net/man/2/stat) to get the length of the file. These are of Linux For winodws see <http://msdn.microsoft.com/en-gb/library/window...
This seems strangely similar to another question I saw recently. Anyway, here's my strangely similar answer (for Linux, not sure how it'll fare on Windows 7): ``` #include <stdio.h> #include <dirent.h> #include <sys/stat.h> int main(int argc, char *argv[]) { struct stat file_stats; DIR *dirp; struct diren...
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
See `opendir() / fdopendir()` and `readdir()` if you are using linux in `dirent.h` [man page](http://linux.die.net/man/3/opendir) Simple example from a : [SO Post](https://stackoverflow.com/questions/612097/how-can-i-get-a-list-of-files-in-a-directory-using-c-or-c) ``` DIR *dir; struct dirent *ent; if ((dir = opend...
To get the list of files in a directory look for "libc opendir". To get the size of a file without opening it you can use fstat.
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
C can certainly do it - the [`ls(1)`](http://www.manpagez.com/man/1/ls/) command can, for example, and it's written in C. To iterate over a directory, you can use the [`opendir(3)`](http://www.manpagez.com/man/3/opendir/) and [`readdir(3)`](http://www.manpagez.com/man/3/readdir/) functions. It's probably easier to jus...
To get the list of files in a directory look for "libc opendir". To get the size of a file without opening it you can use fstat.
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
To read a list of files in a directory look at [opendir](http://linux.die.net/man/3/opendir), [readdir](http://linux.die.net/man/3/readdir), closedir for Linux use [stat](http://linux.die.net/man/2/stat) to get the length of the file. These are of Linux For winodws see <http://msdn.microsoft.com/en-gb/library/window...
There are little things need to be taken care for the given examples (under Linux or other UNIX). 1. You properly only want to print out the file name and size of a regular file only. Use `S_ISREG()` to test the `st_mode` field 2. If you want to recursively print out all files under sub directories also, you then need...
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
C can certainly do it - the [`ls(1)`](http://www.manpagez.com/man/1/ls/) command can, for example, and it's written in C. To iterate over a directory, you can use the [`opendir(3)`](http://www.manpagez.com/man/3/opendir/) and [`readdir(3)`](http://www.manpagez.com/man/3/readdir/) functions. It's probably easier to jus...
See `opendir() / fdopendir()` and `readdir()` if you are using linux in `dirent.h` [man page](http://linux.die.net/man/3/opendir) Simple example from a : [SO Post](https://stackoverflow.com/questions/612097/how-can-i-get-a-list-of-files-in-a-directory-using-c-or-c) ``` DIR *dir; struct dirent *ent; if ((dir = opend...
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
See `opendir() / fdopendir()` and `readdir()` if you are using linux in `dirent.h` [man page](http://linux.die.net/man/3/opendir) Simple example from a : [SO Post](https://stackoverflow.com/questions/612097/how-can-i-get-a-list-of-files-in-a-directory-using-c-or-c) ``` DIR *dir; struct dirent *ent; if ((dir = opend...
This seems strangely similar to another question I saw recently. Anyway, here's my strangely similar answer (for Linux, not sure how it'll fare on Windows 7): ``` #include <stdio.h> #include <dirent.h> #include <sys/stat.h> int main(int argc, char *argv[]) { struct stat file_stats; DIR *dirp; struct diren...
14,569,148
I'm not sure if C can do this, but I'm hoping that I can make a program that will look into a directory, and print out all of the contents of the directory along with the file size of each file. As in I wanted it to look like this (possibly): > > filename.txt -- 300 bytes > > > filename2.txt -- 400 bytes > > > fi...
2013/01/28
[ "https://Stackoverflow.com/questions/14569148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/983186/" ]
See `opendir() / fdopendir()` and `readdir()` if you are using linux in `dirent.h` [man page](http://linux.die.net/man/3/opendir) Simple example from a : [SO Post](https://stackoverflow.com/questions/612097/how-can-i-get-a-list-of-files-in-a-directory-using-c-or-c) ``` DIR *dir; struct dirent *ent; if ((dir = opend...
There are little things need to be taken care for the given examples (under Linux or other UNIX). 1. You properly only want to print out the file name and size of a regular file only. Use `S_ISREG()` to test the `st_mode` field 2. If you want to recursively print out all files under sub directories also, you then need...
53,767,231
I've built an AWS CodePipeline to build and deploy containers into Fargate managed EC2 instances. Ref [AWS CodePipeline](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cd-pipeline.html) One of the services is a web server and I'm attempting to access it from the public which is possible via a public a...
2018/12/13
[ "https://Stackoverflow.com/questions/53767231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3294568/" ]
Although it's not free, normally if you want a public DNS name to an ECS service (fargate or EC2) you'd front it with a load balancer (which can also do SSL termination, if you so desire). Because of that, AWS makes it easy to create a load balancer or add your service to an existing target group when you're setting u...
You can use [ECS Service Discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) for registering your containers in a private DNS namespace - unfortunately this is not possible with public DNS. But, what you can do, is to have a script * fetch your containers' public IP after r...
53,767,231
I've built an AWS CodePipeline to build and deploy containers into Fargate managed EC2 instances. Ref [AWS CodePipeline](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cd-pipeline.html) One of the services is a web server and I'm attempting to access it from the public which is possible via a public a...
2018/12/13
[ "https://Stackoverflow.com/questions/53767231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3294568/" ]
Although it's not free, normally if you want a public DNS name to an ECS service (fargate or EC2) you'd front it with a load balancer (which can also do SSL termination, if you so desire). Because of that, AWS makes it easy to create a load balancer or add your service to an existing target group when you're setting u...
When I set up an ECS Fargate service for the first time, the setup wizard seems to have automatically (?) created a load balancer for me. I was able to access the web app that I created via the URL at Amazon ECS -> Clusters -> {my cluster} -> {my service} -> Target Group Name (under Load Balancing in the Details tab) -...
53,767,231
I've built an AWS CodePipeline to build and deploy containers into Fargate managed EC2 instances. Ref [AWS CodePipeline](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cd-pipeline.html) One of the services is a web server and I'm attempting to access it from the public which is possible via a public a...
2018/12/13
[ "https://Stackoverflow.com/questions/53767231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3294568/" ]
You can use [ECS Service Discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) for registering your containers in a private DNS namespace - unfortunately this is not possible with public DNS. But, what you can do, is to have a script * fetch your containers' public IP after r...
When I set up an ECS Fargate service for the first time, the setup wizard seems to have automatically (?) created a load balancer for me. I was able to access the web app that I created via the URL at Amazon ECS -> Clusters -> {my cluster} -> {my service} -> Target Group Name (under Load Balancing in the Details tab) -...
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
> > (13)Permission denied: make\_sock: could not bind to address 0.0.0.0:80 > no listening sockets available, shutting down Unable to open logs > > > You are not root. You must be root to start or stop apache.
It should be `ServerName 127.0.0.1`
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
It should be `ServerName 127.0.0.1`
/etc/apache2/conf-enabled/security.conf default: "ServerSignature On" this setting enables the force HSTS feature for the server by default and ignores the vhost settings. for example: Your server is named server.com if you created vhost: server.com vhost setting is ignored
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
> > (13)Permission denied: make\_sock: could not bind to address 0.0.0.0:80 > no listening sockets available, shutting down Unable to open logs > > > You are not root. You must be root to start or stop apache.
An IP isn't the server name. This is what i use in my local setup: ``` <VirtualHost *:80> DocumentRoot "/Users/dan/htdocs/mysite.net/www" ServerName mysite.local <Directory "/Users/dan/htdocs/mysite.net"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Di...
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
An IP isn't the server name. This is what i use in my local setup: ``` <VirtualHost *:80> DocumentRoot "/Users/dan/htdocs/mysite.net/www" ServerName mysite.local <Directory "/Users/dan/htdocs/mysite.net"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Di...
/etc/apache2/conf-enabled/security.conf default: "ServerSignature On" this setting enables the force HSTS feature for the server by default and ignores the vhost settings. for example: Your server is named server.com if you created vhost: server.com vhost setting is ignored
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
> > (13)Permission denied: make\_sock: could not bind to address 0.0.0.0:80 > no listening sockets available, shutting down Unable to open logs > > > You are not root. You must be root to start or stop apache.
Also if you want to figure the virtualhost to serve only to localhost (i.e you can visit it by going to 127.0.0.1 from the same box, but not from any external ip) use the following config line. ``` Listen 127.0.0.1:80 ```
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
Also if you want to figure the virtualhost to serve only to localhost (i.e you can visit it by going to 127.0.0.1 from the same box, but not from any external ip) use the following config line. ``` Listen 127.0.0.1:80 ```
/etc/apache2/conf-enabled/security.conf default: "ServerSignature On" this setting enables the force HSTS feature for the server by default and ignores the vhost settings. for example: Your server is named server.com if you created vhost: server.com vhost setting is ignored
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
> > (13)Permission denied: make\_sock: could not bind to address 0.0.0.0:80 > no listening sockets available, shutting down Unable to open logs > > > You are not root. You must be root to start or stop apache.
Steps to start Apache httpd.exe (I am using x64 VC11 example here) ``` http://www.apachelounge.com/download/VC11/ ``` Be sure that you have installed Visual C++ Redistributable for Visual Studio 2012 : VC11 vcredist\_x64/86.exe ``` http://www.microsoft.com/en-us/download/details.aspx?id=30679 ``` You may need to ...
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
> > (13)Permission denied: make\_sock: could not bind to address 0.0.0.0:80 > no listening sockets available, shutting down Unable to open logs > > > You are not root. You must be root to start or stop apache.
/etc/apache2/conf-enabled/security.conf default: "ServerSignature On" this setting enables the force HSTS feature for the server by default and ignores the vhost settings. for example: Your server is named server.com if you created vhost: server.com vhost setting is ignored
249,401
I am new to Apache. I am editing the httpd.config to point virtual host to a specific filesystem location. Here is what I am trying: ``` 127.0.0.1 DocumentRoot "/Users/MyUser/Documents/StoreFront" Alias StoreFront /Users/MyUser/Documents/StoreFront <Directory /Users/MyUser/Documents/StoreFront> Options Follow...
2011/03/20
[ "https://serverfault.com/questions/249401", "https://serverfault.com", "https://serverfault.com/users/75121/" ]
Steps to start Apache httpd.exe (I am using x64 VC11 example here) ``` http://www.apachelounge.com/download/VC11/ ``` Be sure that you have installed Visual C++ Redistributable for Visual Studio 2012 : VC11 vcredist\_x64/86.exe ``` http://www.microsoft.com/en-us/download/details.aspx?id=30679 ``` You may need to ...
/etc/apache2/conf-enabled/security.conf default: "ServerSignature On" this setting enables the force HSTS feature for the server by default and ignores the vhost settings. for example: Your server is named server.com if you created vhost: server.com vhost setting is ignored
7,565,469
I am using Spring MVC 3. From my controller I set value ``` mav = new ModelAndView(); mav.setViewName("reports"); mav.addObject("ReportList", ReportList); return mav; ``` In JSP ``` <c:forEach var="list" items="${ReportList}"> $(list.name) </c:forEach> ``` **ReportList** has a size of 7. **ReportList** is a l...
2011/09/27
[ "https://Stackoverflow.com/questions/7565469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/420613/" ]
These brackets: { } ``` <c:forEach var="list" items="${ReportList}"> ${list.name} </c:forEach> ```
You should use the `<c:out>` tag to render the value of the `name` attribute. `#{list.name}` might work as well (replace `(` with `{`).
7,565,469
I am using Spring MVC 3. From my controller I set value ``` mav = new ModelAndView(); mav.setViewName("reports"); mav.addObject("ReportList", ReportList); return mav; ``` In JSP ``` <c:forEach var="list" items="${ReportList}"> $(list.name) </c:forEach> ``` **ReportList** has a size of 7. **ReportList** is a l...
2011/09/27
[ "https://Stackoverflow.com/questions/7565469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/420613/" ]
These brackets: { } ``` <c:forEach var="list" items="${ReportList}"> ${list.name} </c:forEach> ```
It should be `${list.name}` ...
7,565,469
I am using Spring MVC 3. From my controller I set value ``` mav = new ModelAndView(); mav.setViewName("reports"); mav.addObject("ReportList", ReportList); return mav; ``` In JSP ``` <c:forEach var="list" items="${ReportList}"> $(list.name) </c:forEach> ``` **ReportList** has a size of 7. **ReportList** is a l...
2011/09/27
[ "https://Stackoverflow.com/questions/7565469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/420613/" ]
It should be `${list.name}` ...
You should use the `<c:out>` tag to render the value of the `name` attribute. `#{list.name}` might work as well (replace `(` with `{`).
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
Yes, but I'm not sure what this has to do with C++ or programming. A binary image could be an image where pixels are only either red or blue. Binary Image: <http://en.wikipedia.org/wiki/Binary_image> Grayscale Image: <http://en.wikipedia.org/wiki/Grayscale>
Yes, A binary image is one that consists of pixels that can have one of exactly two colors, usually black and white. It is also called bi-level or two-level. A gray scale image is a kind of black and white or gray monochrome are composed exclusively of shades of gray.
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
Yes, the one is grayscale, e.g. gray scales from 0.255, the binary imange is binary, that means black(0) or white(1). EDIT: Convert grayscale to binary. Directly converting color images (like RGB) to binary is not that easy, because you have to handle every color channel within the image seperatly. Converting to bi...
Yes, but I'm not sure what this has to do with C++ or programming. A binary image could be an image where pixels are only either red or blue. Binary Image: <http://en.wikipedia.org/wiki/Binary_image> Grayscale Image: <http://en.wikipedia.org/wiki/Grayscale>
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
Yes, the one is grayscale, e.g. gray scales from 0.255, the binary imange is binary, that means black(0) or white(1). EDIT: Convert grayscale to binary. Directly converting color images (like RGB) to binary is not that easy, because you have to handle every color channel within the image seperatly. Converting to bi...
A binary image has only two values for each pixel, 0 and 1 corresponding to black and white (or vice versa). A gray scale image has a certain number (probably 8) bits of information per pixel, hence, 256 possible grey values. Of course, a grey scale image has a binary representation, but the smallest size of informati...
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
Yes, but I'm not sure what this has to do with C++ or programming. A binary image could be an image where pixels are only either red or blue. Binary Image: <http://en.wikipedia.org/wiki/Binary_image> Grayscale Image: <http://en.wikipedia.org/wiki/Grayscale>
Yes **Binary Image** A binary image is a black and white image where each **pixel value is either 0 or 1.** The value 0 represents background or black and the value 1 represents foreground or white. **Grayscale Image** A grayscale image is a black and white image with various shades of gray. The pixel value of a g...
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
Yes, the one is grayscale, e.g. gray scales from 0.255, the binary imange is binary, that means black(0) or white(1). EDIT: Convert grayscale to binary. Directly converting color images (like RGB) to binary is not that easy, because you have to handle every color channel within the image seperatly. Converting to bi...
**Black and White** image contains only **two levels**. **Gray image** represent by black and white shades or combination of levels for **e.g.** **8 bit gray image** means total **2^8 levels** form black to **white 0 = black and 255 is White**.
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
Yes, the one is grayscale, e.g. gray scales from 0.255, the binary imange is binary, that means black(0) or white(1). EDIT: Convert grayscale to binary. Directly converting color images (like RGB) to binary is not that easy, because you have to handle every color channel within the image seperatly. Converting to bi...
Yes, A binary image is one that consists of pixels that can have one of exactly two colors, usually black and white. It is also called bi-level or two-level. A gray scale image is a kind of black and white or gray monochrome are composed exclusively of shades of gray.
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
A binary image has only two values for each pixel, 0 and 1 corresponding to black and white (or vice versa). A gray scale image has a certain number (probably 8) bits of information per pixel, hence, 256 possible grey values. Of course, a grey scale image has a binary representation, but the smallest size of informati...
**Black and White** image contains only **two levels**. **Gray image** represent by black and white shades or combination of levels for **e.g.** **8 bit gray image** means total **2^8 levels** form black to **white 0 = black and 255 is White**.
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
**Black and White** image contains only **two levels**. **Gray image** represent by black and white shades or combination of levels for **e.g.** **8 bit gray image** means total **2^8 levels** form black to **white 0 = black and 255 is White**.
Yes, A binary image is one that consists of pixels that can have one of exactly two colors, usually black and white. It is also called bi-level or two-level. A gray scale image is a kind of black and white or gray monochrome are composed exclusively of shades of gray.
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
**Black and White** image contains only **two levels**. **Gray image** represent by black and white shades or combination of levels for **e.g.** **8 bit gray image** means total **2^8 levels** form black to **white 0 = black and 255 is White**.
Yes **Binary Image** A binary image is a black and white image where each **pixel value is either 0 or 1.** The value 0 represents background or black and the value 1 represents foreground or white. **Grayscale Image** A grayscale image is a black and white image with various shades of gray. The pixel value of a g...
3,123,129
is there any difference between grey scale image and binary image?
2010/06/26
[ "https://Stackoverflow.com/questions/3123129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/375297/" ]
A binary image has only two values for each pixel, 0 and 1 corresponding to black and white (or vice versa). A gray scale image has a certain number (probably 8) bits of information per pixel, hence, 256 possible grey values. Of course, a grey scale image has a binary representation, but the smallest size of informati...
Yes, A binary image is one that consists of pixels that can have one of exactly two colors, usually black and white. It is also called bi-level or two-level. A gray scale image is a kind of black and white or gray monochrome are composed exclusively of shades of gray.
28,955,978
**EDIT: Please do not bother to answer. I tried to delete the question but there are already answers. This question is invalid because get\_Range() actually works. I found my problem immediately after I posted, but answerers were too quick. Sorry about this.** How to get the cell value using the cell address? These do...
2015/03/10
[ "https://Stackoverflow.com/questions/28955978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/343309/" ]
You can change the start position of your marker icon with the property `groundAnchor`. **Google Maps SDK for iOS documentation**: > > The ground anchor specifies the point in the icon image that is > anchored to the marker's position on the Earth's surface. This point > is specified within the continuous space [0...
I figured out how to do it after reading Google Maps Documentation very closely. I believe this is how it was intended to be done. ``` UIImage *markerIcon = [UIImage imageNamed:@"markericon.png"]; markerIcon = [markerIcon imageWithAlignmentRectInsets:UIEdgeInsetsMake(0, 0, (markerIcon.size.height/2), 0)]; self.marker....
28,955,978
**EDIT: Please do not bother to answer. I tried to delete the question but there are already answers. This question is invalid because get\_Range() actually works. I found my problem immediately after I posted, but answerers were too quick. Sorry about this.** How to get the cell value using the cell address? These do...
2015/03/10
[ "https://Stackoverflow.com/questions/28955978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/343309/" ]
I figured out how to do it after reading Google Maps Documentation very closely. I believe this is how it was intended to be done. ``` UIImage *markerIcon = [UIImage imageNamed:@"markericon.png"]; markerIcon = [markerIcon imageWithAlignmentRectInsets:UIEdgeInsetsMake(0, 0, (markerIcon.size.height/2), 0)]; self.marker....
**In Swift 5** ``` let marker: GMSMarker = GMSMarker() // Allocating Marker marker.title = "Your location" // Setting title marker.snippet = "Sub title" // Setting sub title marker.icon = UIImage(named: "radio") // Marker icon marker.appearAnimation = .pop // Appearing animation. default marker...
28,955,978
**EDIT: Please do not bother to answer. I tried to delete the question but there are already answers. This question is invalid because get\_Range() actually works. I found my problem immediately after I posted, but answerers were too quick. Sorry about this.** How to get the cell value using the cell address? These do...
2015/03/10
[ "https://Stackoverflow.com/questions/28955978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/343309/" ]
You can change the start position of your marker icon with the property `groundAnchor`. **Google Maps SDK for iOS documentation**: > > The ground anchor specifies the point in the icon image that is > anchored to the marker's position on the Earth's surface. This point > is specified within the continuous space [0...
**In Swift 5** ``` let marker: GMSMarker = GMSMarker() // Allocating Marker marker.title = "Your location" // Setting title marker.snippet = "Sub title" // Setting sub title marker.icon = UIImage(named: "radio") // Marker icon marker.appearAnimation = .pop // Appearing animation. default marker...
76,394
I play electric guitar and today I had an experience where the guitar would give very slight tingling sensations - I wouldn't quite call any of them a bad shock because none of them really hurt badly, but it was noticeable. My question is: how to I test if the outlet we use is grounded properly. My bassist who uses th...
2015/10/17
[ "https://diy.stackexchange.com/questions/76394", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/38364/" ]
YES, you should not plug in without testing the ground, and you really should be protected by a GFI when playing outdoors. It is dangerous because you could be shocked or even electrocuted by playing without a ground or with a faulty ground. The guitar player for The Yardbirds was killed this way, look it up. You can ...
You could test the ground. Sometimes grounds are deliberately disconnected for audio / video equipment to eliminate noise problems. (Obviously that is a bad way to fix noise problems!) There are other wiring faults that could cause this issue, and some of them you can't count on an inexpensive outlet tester to find. ...
74,192,665
I have an enum, `Angle`, which has two variants, `Degrees` and `Radians`. I wanted to implement `From` for these, but it doesn't let me: ``` enum Angle { Degrees(f64), Radians(f64) } impl From<Angle> for Angle { fn from(value: Angle) -> Self { match value { Angle::Degrees(deg) => Angle...
2022/10/25
[ "https://Stackoverflow.com/questions/74192665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19666101/" ]
> > I wanted to implement `From` for these > > > By that code, it appears that you want `From::from` to turn a value in degrees to a value in radians and vice versa. However, this is not only: * **impossible**, because any `From<T>` is already implemented by the core library for `T`; * but also **unintuitive**, b...
#1 is indeed not possible. Rust has a blanket implementation `impl<T> From<T> for T` and you cannot overwrite it. Besides semantically what you are trying to do is not a `From` conversion, but rather changing a representation of some type. I would strongly recommend #2. It is very idiomatic and anyone can tell after a...
42,306,074
I have a little question about angular-cli. Is it true that when I run **ng serve** I use the **global** installed angular-cli and when I run **npm start** the **local** one?
2017/02/17
[ "https://Stackoverflow.com/questions/42306074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7582611/" ]
Command will decide by `package.json` . ng serve / npm start is used based on `package.json` can change form there. if `ng serve` is not working can use `npm start` to run server. **ng server :** > > `"scripts": { > "ng": "ng", > "start": "ng serve", > "test": "ng test",....... > }` > > >
Yes it is true. Let's say your global Angular CLI version is 2 and you just cloned and installed a project from github that is created with Angular CLI version 1. If you run `ng serve` it will execute using version 2 (which is your global cli), if you run `npm run start` it will use the script in node\_modules/.bin f...
42,306,074
I have a little question about angular-cli. Is it true that when I run **ng serve** I use the **global** installed angular-cli and when I run **npm start** the **local** one?
2017/02/17
[ "https://Stackoverflow.com/questions/42306074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7582611/" ]
Command will decide by `package.json` . ng serve / npm start is used based on `package.json` can change form there. if `ng serve` is not working can use `npm start` to run server. **ng server :** > > `"scripts": { > "ng": "ng", > "start": "ng serve", > "test": "ng test",....... > }` > > >
Yes. It is true. **ng serve** runs the app on angular global cli on the **current version** of the installed angular version while **npm run start** runs it on the version of that **particular angular application** cloned version from the node-module.
42,306,074
I have a little question about angular-cli. Is it true that when I run **ng serve** I use the **global** installed angular-cli and when I run **npm start** the **local** one?
2017/02/17
[ "https://Stackoverflow.com/questions/42306074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7582611/" ]
When you run the `npm start` internally it will call whatever command is written inside the start in the `package.json`. ``` "scripts": { "start": "ng serve" } ``` it will run the `ng serve` For more details, check [When to use 'npm start' and when to use 'ng serve'?](https://stackoverflow.com/questions/40190538/...
Yes it is true. Let's say your global Angular CLI version is 2 and you just cloned and installed a project from github that is created with Angular CLI version 1. If you run `ng serve` it will execute using version 2 (which is your global cli), if you run `npm run start` it will use the script in node\_modules/.bin f...
42,306,074
I have a little question about angular-cli. Is it true that when I run **ng serve** I use the **global** installed angular-cli and when I run **npm start** the **local** one?
2017/02/17
[ "https://Stackoverflow.com/questions/42306074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7582611/" ]
When you run the `npm start` internally it will call whatever command is written inside the start in the `package.json`. ``` "scripts": { "start": "ng serve" } ``` it will run the `ng serve` For more details, check [When to use 'npm start' and when to use 'ng serve'?](https://stackoverflow.com/questions/40190538/...
Yes. It is true. **ng serve** runs the app on angular global cli on the **current version** of the installed angular version while **npm run start** runs it on the version of that **particular angular application** cloned version from the node-module.
42,306,074
I have a little question about angular-cli. Is it true that when I run **ng serve** I use the **global** installed angular-cli and when I run **npm start** the **local** one?
2017/02/17
[ "https://Stackoverflow.com/questions/42306074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7582611/" ]
Yes it is true. Let's say your global Angular CLI version is 2 and you just cloned and installed a project from github that is created with Angular CLI version 1. If you run `ng serve` it will execute using version 2 (which is your global cli), if you run `npm run start` it will use the script in node\_modules/.bin f...
Yes. It is true. **ng serve** runs the app on angular global cli on the **current version** of the installed angular version while **npm run start** runs it on the version of that **particular angular application** cloned version from the node-module.
19,854,777
In hadoop definitive guide : **a 1 MB file stored with a block size of 128 MB uses 1 MB of disk space, not128 MB**. what does this mean ? does it use 1MB of size in a block of 128MB or 1MB is used and reamining 127MB is free to occupy by some other file ?
2013/11/08
[ "https://Stackoverflow.com/questions/19854777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2961307/" ]
This is often a misconception about HDFS - the block size is more about how a single file is split up / partitioned, not about some reserved part of the file system. Behind the schemes, each block is stored on the DataNodes underlying files system as a plain file (and an associated checksum). If you look into the data...
Hadoop Block size is Hadoop Storage Concept. Every Time When you store a File in Hadoop it will divided into the block sizes and based on the replication factor and data locality it will be distributed over the cluster. **For Details you can find my answer here** [Small files and HDFS blocks](https://stackoverflow.co...
37,282
Im quite new learning tikz, it rocks!. Well, Im trying to get the following block diagram working, but having kinda trouble: ![Image that I want](https://i.stack.imgur.com/vzEWc.png) And this is what I got so far: ``` \documentclass[12pt,a4paper]{article} \usepackage{tikz} \begin{document} \begin{figure} \begin{cen...
2011/12/06
[ "https://tex.stackexchange.com/questions/37282", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/9844/" ]
The way I always do this kind of thing is, draw it on paper. Draw some simple help lines for size and then start defining coordinates you can use to build up the image. Make coordinates for node placement, where edges meet and start thinking about how to connect to the nodes (anchors). The last step is then to do the f...
3) To get the text labels for the connections, you can use `node` with the optional `pos` keyword, e.g.: ``` \draw [->] (ic) -- (id) node[pos=0.5, above] {$\alpha$}; ``` See Sections 15.8 and 15.9 of the tikz/pgf manual for more details.
22,779,598
What could cause the following error for the very first time when the exact same code (that produces this error) has been working *perfectly* all day today? > > > > --- > > > --------------------------- A network-related or instance-specific error occurred while establishing a connection to SQL Server. The > ser...
2014/04/01
[ "https://Stackoverflow.com/questions/22779598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2645707/" ]
The system selects the strings of those resources that match the locale on your phone. If you are using in the application default locale, check that the phone language was English (Unated States). So you need to add localization to your application or remove unnecessary libraries ...
Have you try to change the value of `android:label` for application tag in AndroidManifest.xml? Like this (from app\_name to another\_app\_name): ``` <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/another_app_name" android:theme="@style/AppTheme" > ...
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
Critical Hits ============= When you score a critical hit (roll a natural 20 on the attack roll), you roll double damage. Therefore, you'll probably want to bring a **second** weapon die, depending on what weapon you'll be using. Greatswords and mauls are a 2d6 weapon, so you may want **four** d6s if you plan to use o...
This really depends on the level of the characters, if starting with level 1's then the basic 7 dice set, or pair of each is more than enough to cover you for a while. At level 5 you get access to extra attacks and to level 3 spells. There might be a need to add additional dice, lightning bolt/fireball damage starts ...
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
Yes === You should bring extra dice to *any* roleplaying event. In large numbers. There are many situations where you need more dice and they are for the most part independent of the actual system you are playing: * Maybe 5 enemies attack. All with the same stats. Roll 5 dice. * Maybe all 5 hit and the character nee...
This really depends on the level of the characters, if starting with level 1's then the basic 7 dice set, or pair of each is more than enough to cover you for a while. At level 5 you get access to extra attacks and to level 3 spells. There might be a need to add additional dice, lightning bolt/fireball damage starts ...
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
The dice I always seem to be short on are d4s. For healing potions and magic missiles, mostly. Two d20s is essential, for rolling with advantage. But seriously folks, there's no such thing as "too many dice" :-)
This really depends on the level of the characters, if starting with level 1's then the basic 7 dice set, or pair of each is more than enough to cover you for a while. At level 5 you get access to extra attacks and to level 3 spells. There might be a need to add additional dice, lightning bolt/fireball damage starts ...
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
Critical Hits ============= When you score a critical hit (roll a natural 20 on the attack roll), you roll double damage. Therefore, you'll probably want to bring a **second** weapon die, depending on what weapon you'll be using. Greatswords and mauls are a 2d6 weapon, so you may want **four** d6s if you plan to use o...
In my experience (I have a 5th level Ranger/Rogue in my current group), and if getting more dice isn't a hassle, I would for sure bring **2 D20(for when you need advantage or disadvantage), 1D12, 1D10, 1D8, 1D6, 1D4** for each player. *Additionally* I would look at each player to see what their most common attack is....
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
Critical Hits ============= When you score a critical hit (roll a natural 20 on the attack roll), you roll double damage. Therefore, you'll probably want to bring a **second** weapon die, depending on what weapon you'll be using. Greatswords and mauls are a 2d6 weapon, so you may want **four** d6s if you plan to use o...
Yes === You should bring extra dice to *any* roleplaying event. In large numbers. There are many situations where you need more dice and they are for the most part independent of the actual system you are playing: * Maybe 5 enemies attack. All with the same stats. Roll 5 dice. * Maybe all 5 hit and the character nee...
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
Critical Hits ============= When you score a critical hit (roll a natural 20 on the attack roll), you roll double damage. Therefore, you'll probably want to bring a **second** weapon die, depending on what weapon you'll be using. Greatswords and mauls are a 2d6 weapon, so you may want **four** d6s if you plan to use o...
The dice I always seem to be short on are d4s. For healing potions and magic missiles, mostly. Two d20s is essential, for rolling with advantage. But seriously folks, there's no such thing as "too many dice" :-)
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
Yes === You should bring extra dice to *any* roleplaying event. In large numbers. There are many situations where you need more dice and they are for the most part independent of the actual system you are playing: * Maybe 5 enemies attack. All with the same stats. Roll 5 dice. * Maybe all 5 hit and the character nee...
In my experience (I have a 5th level Ranger/Rogue in my current group), and if getting more dice isn't a hassle, I would for sure bring **2 D20(for when you need advantage or disadvantage), 1D12, 1D10, 1D8, 1D6, 1D4** for each player. *Additionally* I would look at each player to see what their most common attack is....
65,236
I will be playing my first 5e session here soon. I got to skim the basic rules PDF, so I know that it plays a bit like 3.5 with some modernization. (*Please don't stone me if I'm oversimplifying that*.) I'd like to know what I should bring in my dicebag. *I know that it's usually best to have one of each dice in D&D, ...
2015/07/24
[ "https://rpg.stackexchange.com/questions/65236", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15152/" ]
The dice I always seem to be short on are d4s. For healing potions and magic missiles, mostly. Two d20s is essential, for rolling with advantage. But seriously folks, there's no such thing as "too many dice" :-)
In my experience (I have a 5th level Ranger/Rogue in my current group), and if getting more dice isn't a hassle, I would for sure bring **2 D20(for when you need advantage or disadvantage), 1D12, 1D10, 1D8, 1D6, 1D4** for each player. *Additionally* I would look at each player to see what their most common attack is....
11,899,554
I am making an android app in which I have x and y coordinates and i need to find position of the view in grid view. I just want to know is there any function or simple method to find the position. ``` skip this line ```
2012/08/10
[ "https://Stackoverflow.com/questions/11899554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1171061/" ]
This works for me: ``` yourGridView.pointToPosition(yourX, yourY); ``` pointToPosition(int x, int y) is a functions in the GridView class
When a user click on your gridView you can just use this code: ``` gridview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View v, int position, long id) { int clickedPosition = position; }} ``` clickedPosition is a variable that contains the position of the cl...
23,122,366
I have the following query: ``` select * from email_contacts where extract(month from created_at) = 4 and call_type = 'Membership NPS' and email NOT IN ( select invite_email from nps_responses where extract(month from fs_created_at) = 4 and invite_email is not null ) ``` Then I have a rails 4 app that ha...
2014/04/17
[ "https://Stackoverflow.com/questions/23122366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2665588/" ]
Performance of the two queries really depends on which LINQ provider and which RDBMS you're using. Assuming SQL Server, the first would generate the following query: ``` select i.name, c.name from Item i, Category c where i.FK_idCategory = c.IdCategory ``` Whereas the second would generate: ``` select i.name, c.nam...
This depends on the ORM you're using and how intelligent it is at optimizing your queries for your backend. Entity Framework can generate some pretty awful SQL if you don't do your linq perfectly, so I'd assume query2 is better. The only way for you to know for sure would be to inspect the SQL being generated by the t...
23,122,366
I have the following query: ``` select * from email_contacts where extract(month from created_at) = 4 and call_type = 'Membership NPS' and email NOT IN ( select invite_email from nps_responses where extract(month from fs_created_at) = 4 and invite_email is not null ) ``` Then I have a rails 4 app that ha...
2014/04/17
[ "https://Stackoverflow.com/questions/23122366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2665588/" ]
Performance of the two queries really depends on which LINQ provider and which RDBMS you're using. Assuming SQL Server, the first would generate the following query: ``` select i.name, c.name from Item i, Category c where i.FK_idCategory = c.IdCategory ``` Whereas the second would generate: ``` select i.name, c.nam...
With linq2Sql or EntityFramework, you would probably do something like this: ``` var query = from i in db.Item select new {i.name, i.Category.Name} ``` This will generate a proper SQL inner join. I do assume that there is a foreign key relation between Item and Category defined.
70,638,416
Hi I am trying to run my tests parallely(pytest-xdist) on the azure pipelines. Till now the tests were running perfectly fine. Suddenly the pytest is throwing a weird error saying "unrecognized argument". The file name : integration\_test.py Command used : pytest -n 5 --tb=short integration\_test.py -v -s --> to run 5...
2022/01/09
[ "https://Stackoverflow.com/questions/70638416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17877489/" ]
This error is what you encountered: [![enter image description here](https://i.stack.imgur.com/O4Jfx.png)](https://i.stack.imgur.com/O4Jfx.png) As hoefling mentioned, the solution is to install the pytest-xdist: `pip install pytest-xdist`
On MacOS just running `pytest` might be ran by a different Python's version than you thought. ``` $ pytest ============================================================================== test session starts =============================================================================== platform darwin -- Python 3.9.12,...
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
> > What I would like to do is to either quickly build a dired buffer from existing grep output [...], or transform grep output into a list of buffers for multi-occur [...]. > > > You don't need to convert the grep results buffer into anything, there's already a mode specifically for editing grep output (and refle...
This functionality exists within [projectile](https://github.com/bbatsov/projectile) (`projectile-replace`). It will use ag/ack/git grep/grep if available (in that order) to find occurrences, and `tags-query-replace` to execute the query-replace.
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
This functionality exists within [projectile](https://github.com/bbatsov/projectile) (`projectile-replace`). It will use ag/ack/git grep/grep if available (in that order) to find occurrences, and `tags-query-replace` to execute the query-replace.
Here is another approach, using [**Icicles**](http://www.emacswiki.org/Icicles). In your Emacs `*grep*` output buffer, hit C-c ` (that's C-c backquote), which in *Icicle* mode is bound in buffer `*grep*` to command `icicle-compilation-search`. This lets you quickly navigate among any of the search hits (the `grep` hit...
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
@Malabarba mentioned the use of `wgrep` package for editing grep/ack/ag results. I would like to write a detailed walk-through of how I use the [`ag`](https://github.com/Wilfred/ag.el) package and [`wgrep-ag`](https://github.com/mhayashi1120/Emacs-wgrep/blob/master/wgrep-ag.el) packages to achieve editing of 'ag'ged r...
This functionality exists within [projectile](https://github.com/bbatsov/projectile) (`projectile-replace`). It will use ag/ack/git grep/grep if available (in that order) to find occurrences, and `tags-query-replace` to execute the query-replace.
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
This functionality exists within [projectile](https://github.com/bbatsov/projectile) (`projectile-replace`). It will use ag/ack/git grep/grep if available (in that order) to find occurrences, and `tags-query-replace` to execute the query-replace.
I use this util I wrote [xah\_find.el](https://github.com/xahlee/xah-find) I wrote it because: * Pure elisp. No more worry about grep on Windows or Unicode transmission between emacs to Operating System. [emacs grep problem](http://ergoemacs.org/emacs/emacs_grep_problem.html) * If you are heavy unicode user, the unix...
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
> > What I would like to do is to either quickly build a dired buffer from existing grep output [...], or transform grep output into a list of buffers for multi-occur [...]. > > > You don't need to convert the grep results buffer into anything, there's already a mode specifically for editing grep output (and refle...
Here is another approach, using [**Icicles**](http://www.emacswiki.org/Icicles). In your Emacs `*grep*` output buffer, hit C-c ` (that's C-c backquote), which in *Icicle* mode is bound in buffer `*grep*` to command `icicle-compilation-search`. This lets you quickly navigate among any of the search hits (the `grep` hit...
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
@Malabarba mentioned the use of `wgrep` package for editing grep/ack/ag results. I would like to write a detailed walk-through of how I use the [`ag`](https://github.com/Wilfred/ag.el) package and [`wgrep-ag`](https://github.com/mhayashi1120/Emacs-wgrep/blob/master/wgrep-ag.el) packages to achieve editing of 'ag'ged r...
> > What I would like to do is to either quickly build a dired buffer from existing grep output [...], or transform grep output into a list of buffers for multi-occur [...]. > > > You don't need to convert the grep results buffer into anything, there's already a mode specifically for editing grep output (and refle...
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
> > What I would like to do is to either quickly build a dired buffer from existing grep output [...], or transform grep output into a list of buffers for multi-occur [...]. > > > You don't need to convert the grep results buffer into anything, there's already a mode specifically for editing grep output (and refle...
I use this util I wrote [xah\_find.el](https://github.com/xahlee/xah-find) I wrote it because: * Pure elisp. No more worry about grep on Windows or Unicode transmission between emacs to Operating System. [emacs grep problem](http://ergoemacs.org/emacs/emacs_grep_problem.html) * If you are heavy unicode user, the unix...
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
@Malabarba mentioned the use of `wgrep` package for editing grep/ack/ag results. I would like to write a detailed walk-through of how I use the [`ag`](https://github.com/Wilfred/ag.el) package and [`wgrep-ag`](https://github.com/mhayashi1120/Emacs-wgrep/blob/master/wgrep-ag.el) packages to achieve editing of 'ag'ged r...
Here is another approach, using [**Icicles**](http://www.emacswiki.org/Icicles). In your Emacs `*grep*` output buffer, hit C-c ` (that's C-c backquote), which in *Icicle* mode is bound in buffer `*grep*` to command `icicle-compilation-search`. This lets you quickly navigate among any of the search hits (the `grep` hit...
212
I'm aware of `find-grep-dired`, marking the corresponding files and then pressing `Q` to run `dired-do-query-replace-regexp` on the marked files. Unfortunately that requires restarting the grep and no longer using git-grep, ack, or ag and switching to use `find-grep` which has a different syntax for searching. I'm als...
2014/09/24
[ "https://emacs.stackexchange.com/questions/212", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/104/" ]
@Malabarba mentioned the use of `wgrep` package for editing grep/ack/ag results. I would like to write a detailed walk-through of how I use the [`ag`](https://github.com/Wilfred/ag.el) package and [`wgrep-ag`](https://github.com/mhayashi1120/Emacs-wgrep/blob/master/wgrep-ag.el) packages to achieve editing of 'ag'ged r...
I use this util I wrote [xah\_find.el](https://github.com/xahlee/xah-find) I wrote it because: * Pure elisp. No more worry about grep on Windows or Unicode transmission between emacs to Operating System. [emacs grep problem](http://ergoemacs.org/emacs/emacs_grep_problem.html) * If you are heavy unicode user, the unix...
52,437,913
I'm trying to build an Azure function in C# that creates a new document object in Azure cosmos DB using SQL API if an id doesn't already exist and updates a document object if it already exists. The context behind this is logging chatbot conversation history to unique user sessions. Input: HTTP GET Request with para...
2018/09/21
[ "https://Stackoverflow.com/questions/52437913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8174496/" ]
You can use the Azure Functions' [Cosmos DB Output Binding](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb#output---examples). The Output binding does an **Upsert** operation. ``` [FunctionName("HttpTriggerWithSingleDocument")] public static async Task<HttpResponseMessage> Run(...
Here is an example how to do it. You just need to adjust it to you needs. ``` [FunctionName("Function1")] public static async Task<HttpResponseMessage> Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequestMessage req, TraceWriter log) { dynamic data = await...
32,462,848
I'm trying to install the package numpy using pip I open up cmd, standing in C:/Python34/Scripts I type: "pip install numpy" and it tries to install it (A bunch of white text shows up). Inbetween the white text there is a red line saying "Failed building wheel for numpy", and at the end there is a bunch of incoheren...
2015/09/08
[ "https://Stackoverflow.com/questions/32462848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3785118/" ]
This happened to me too. I was trying to update pandas to address a reported bug fixed in the newer version. But when I tried upgrading I ran into your error with a message about requiring Visual C++ 2010 (which I already had). Now, I tried downloading the executable from SourceForge and installing that way - but then...
I have run into this kind of the problem and tried some solutions found on the web, which didn't work. I guess there may be something about version of scipy or some unknown dependences... So, I typed `sudo dnf install python3-scipy` and that did the trick. I found that scipy needs `lapack` and `python3-numpy-f2py`...
32,462,848
I'm trying to install the package numpy using pip I open up cmd, standing in C:/Python34/Scripts I type: "pip install numpy" and it tries to install it (A bunch of white text shows up). Inbetween the white text there is a red line saying "Failed building wheel for numpy", and at the end there is a bunch of incoheren...
2015/09/08
[ "https://Stackoverflow.com/questions/32462848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3785118/" ]
I install python3-pip,but 404 error... So,I try *apt-get install python3-scipy* success
I have run into this kind of the problem and tried some solutions found on the web, which didn't work. I guess there may be something about version of scipy or some unknown dependences... So, I typed `sudo dnf install python3-scipy` and that did the trick. I found that scipy needs `lapack` and `python3-numpy-f2py`...
30,202,323
I have following javascript object ``` mData=[{A: "148.0", Bit: 27 ,Ic: "0.4",ked: "229.0",Ted: "228.9985"}, {A: "148.0", Bit: 27 ,Ic: "0.4",ked: "229.0",Ted: "2285"}, {A: "148.0", Bit: 17 ,Ic: "0.4",ked: "259.0",Ted: "28"}, {A: "148.0", Bit: 27 ,Ic: "0.4",ked: "279.0",Ted: "28"}, {A: "148.0", Bit: 27 ,Ic...
2015/05/12
[ "https://Stackoverflow.com/questions/30202323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1669996/" ]
Without addressing any controversial issues, I think this is probably why you aren't getting the result you expect. At the beginning of your code, you use `$username=$_POST['Username'];` and `$password=$_POST['Password'];` to get the username and password, and run your query with those variables. Then later, you use th...
I'm OK with `mysql_`. You should not store the user password, there are some serious liability issues there. I cleaned up your code. ``` $username = $_POST['Username']; $password = $_POST['Password']; $results = mysql_query("SELECT 1 FROM `users` WHERE `Username`='$username' AND `Password`='$password'"); $rows = mys...
57,925,166
I am trying to clean up html code in alot of HTML files, basically what we want is remove all Paragraphs from within specific Div classes I am trying to achieve this within powershell and got as far as finding the block of text to replace and remove the opening P and closing P tags within this text, but having troubl...
2019/09/13
[ "https://Stackoverflow.com/questions/57925166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3248779/" ]
`Objects.requireNonNull` ======================== As others noted, you should [check that incoming argument](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Objects.html#requireNonNull(T,java.lang.String)) is not null. ``` public TSTLocalDate dateToTSTLocalDate(Date date) { Objects.re...
On the 2nd line in the exception, there is probably the exact line in which it happens: > > TSTHoliday.dateToTSTLocalDate(TSTHoliday.java:**145**) > > > called by > > TSTHoliday.java:**42** > > > Check if the `date` object passed to this method is null, something like this: ``` TSTLocalDate tSTLocalDate; i...
4,238,710
Could anyone tell me why this doesn't work? ``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<class T> struct X; template<> struct X<CompCriteria> { }; int _tmain(int argc, _TCHAR* argv[]) { X<CompCriteria::ByeKeyAndValue> x; return 0; } ```
2010/11/21
[ "https://Stackoverflow.com/questions/4238710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207177/" ]
You have specialized `X` for a type, but you're trying to use it with the integer `CompCriteria::ByeKeyAndValue`. You can specialize template class for the `enum CompCriteria` underlying type - `int` in this case, as follows: ``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<int> struct X; template<> st...
If you have a `template<class T>` = `template<typename T>`, then T is expected to be, well, a **type**. `enum CompCriteria` is a type, so you can instantiate that template with it. A single value of the enum, however, is not a type, so you can't.
4,238,710
Could anyone tell me why this doesn't work? ``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<class T> struct X; template<> struct X<CompCriteria> { }; int _tmain(int argc, _TCHAR* argv[]) { X<CompCriteria::ByeKeyAndValue> x; return 0; } ```
2010/11/21
[ "https://Stackoverflow.com/questions/4238710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207177/" ]
You're conflating the idea of parameterized *types* and parameterized *values*. A template parameter can be a type, or a constant. For example: ``` template <typename T> struct Foo; ``` versus.. ``` template <int N> struct Foo; ``` It looks like you want to specialize your template based on an enum *constant*, ra...
If you have a `template<class T>` = `template<typename T>`, then T is expected to be, well, a **type**. `enum CompCriteria` is a type, so you can instantiate that template with it. A single value of the enum, however, is not a type, so you can't.
4,238,710
Could anyone tell me why this doesn't work? ``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<class T> struct X; template<> struct X<CompCriteria> { }; int _tmain(int argc, _TCHAR* argv[]) { X<CompCriteria::ByeKeyAndValue> x; return 0; } ```
2010/11/21
[ "https://Stackoverflow.com/questions/4238710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207177/" ]
You have specialized `X` for a type, but you're trying to use it with the integer `CompCriteria::ByeKeyAndValue`. You can specialize template class for the `enum CompCriteria` underlying type - `int` in this case, as follows: ``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<int> struct X; template<> st...
``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<CompCriteria crit_> struct X { static const CompCriteria crit = crit_; }; int _tmain(int argc, _TCHAR* argv[]) { X<CompCriteria::ByeKeyAndValue> x; return 0; } ```
4,238,710
Could anyone tell me why this doesn't work? ``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<class T> struct X; template<> struct X<CompCriteria> { }; int _tmain(int argc, _TCHAR* argv[]) { X<CompCriteria::ByeKeyAndValue> x; return 0; } ```
2010/11/21
[ "https://Stackoverflow.com/questions/4238710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207177/" ]
You're conflating the idea of parameterized *types* and parameterized *values*. A template parameter can be a type, or a constant. For example: ``` template <typename T> struct Foo; ``` versus.. ``` template <int N> struct Foo; ``` It looks like you want to specialize your template based on an enum *constant*, ra...
``` enum CompCriteria{ByKey,ByValue,ByeKeyAndValue}; template<CompCriteria crit_> struct X { static const CompCriteria crit = crit_; }; int _tmain(int argc, _TCHAR* argv[]) { X<CompCriteria::ByeKeyAndValue> x; return 0; } ```
212,835
I am attempting to install a [retrofit fan brace](https://www.homedepot.com/p/Commercial-Electric-15-3-cu-in-Remodel-Construction-Ceiling-Fan-Brace-with-1-1-2-in-Box-CMB150-OB/205383178#product-overview) and ran into an issue where my 2x4 are horizontal and not vertical, what are my options to support a fan or are ther...
2021/01/02
[ "https://diy.stackexchange.com/questions/212835", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/41884/" ]
I would take Ecnerwal's suggestion a bit further. Build some simple blocks with flanges using 2x3 (so they fit through the hole) and plywood (whatever you have on hand). Drop them in place with beads of construction adhesive or wood glue on the backs. Come back a day later and carry on. ``` SIDE (ELEVATION) VIEW ...
Screw a short chunk of 2x4 to the top of the bottom chord so you have enough wood for the brace to grab.
212,835
I am attempting to install a [retrofit fan brace](https://www.homedepot.com/p/Commercial-Electric-15-3-cu-in-Remodel-Construction-Ceiling-Fan-Brace-with-1-1-2-in-Box-CMB150-OB/205383178#product-overview) and ran into an issue where my 2x4 are horizontal and not vertical, what are my options to support a fan or are ther...
2021/01/02
[ "https://diy.stackexchange.com/questions/212835", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/41884/" ]
I would take Ecnerwal's suggestion a bit further. Build some simple blocks with flanges using 2x3 (so they fit through the hole) and plywood (whatever you have on hand). Drop them in place with beads of construction adhesive or wood glue on the backs. Come back a day later and carry on. ``` SIDE (ELEVATION) VIEW ...
get some 2x4 (or 1x4) about as long as the truss is high and put some 2"or 2.5" nails through each end (so they stick out a bit) pass it up through the hole and with it vertical press it against the side of the truss where the brace will contact the truss. it may be possible to screw it to the top part of the truss us...
878,963
Are there rules for when small, capital and greek symbols are used? Simple example: The volume left in a cube with a sphere in it is **V=C-S** with *capital* standard latin letters, meaning *"if you don't know who I am, you have to do the equations first. I'm* **V = w l h** *and the Sphere is* **4/3πr²**" with *sma...
2014/07/26
[ "https://math.stackexchange.com/questions/878963", "https://math.stackexchange.com", "https://math.stackexchange.com/users/166464/" ]
There are no standard rules. Writers of maths are allowed to use whatever letters they like for things, and different writers are allowed to use different letters. Most people follow some unwritten conventions, but different users of maths use different conventions. Users in the same discipline area who write to each o...
You follow conventions for the thing you're reading/writing. Vectors are often bolded, matrices are often capital letters, random variables are often capital letters, etc. While writing, if you're deviating from conventions, make a note of it. And you can use words in mathematical writing to help detail what the mean...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
For that to be linear, you'd need a linked-list/array/set of the indices set true. Keeping such a secondary index is not part of the performance/storage tradeoffs required by std::bitset, and given it would disadvantage everyone without your specific requirement, there's no way an implementation will provide this. You ...
There is a way to do it in near O(k) time [plus O(n/64)] using the c++ standard bit manipulation tools in C++20. The O(n/64) is not a problem for me, but is may be an issue if you set is very large and very sparse. These map to CPU intrinsics on all the major platforms (x64, ARM, etc). On order for this to work ...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
You can check up to 32-bits at a time with a u64 accumulator and a 32-entry table like ``` u32 kTable[] { 0x01, 0x03, 0x07, 0x0F ..., 0xFFFFFFFF }; ``` Just read in 32 bits into a u64 accumulator and shift it down depending on the offset and check your bits against the table. You can do this in a binary fashion to ...
Sometimes people use [run-length encoding](https://en.wikipedia.org/wiki/Run-length_encoding) for things like that. If you encode incoming bitset into an array of run lengths the number of runs you end up with wouldn't exceed the number of transitions between set and clear bits, which is at most `2*k`. Furthermore, in ...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
There is a way to do it in near O(k) time [plus O(n/64)] using the c++ standard bit manipulation tools in C++20. The O(n/64) is not a problem for me, but is may be an issue if you set is very large and very sparse. These map to CPU intrinsics on all the major platforms (x64, ARM, etc). On order for this to work ...
Looping over the entire bitset and simply checking the value and storing the index if true, IS linear. You can speed that up though with a lookup table. See this code: <http://xiangqi-engine.cvs.sourceforge.net/viewvc/xiangqi-engine/tsito2/src/Utility.cpp?revision=1.5&view=markup>
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
A standard bitvector does not support efficient iteration over true bits - the runtime is always O(n), where n is the number of total bits, which has no dependence on k. However, there are specialized data structures like [van Emde Boas trees](http://en.wikipedia.org/wiki/Van_Emde_Boas_tree) and [y-fast tries](http://w...
For that to be linear, you'd need a linked-list/array/set of the indices set true. Keeping such a secondary index is not part of the performance/storage tradeoffs required by std::bitset, and given it would disadvantage everyone without your specific requirement, there's no way an implementation will provide this. You ...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
A standard bitvector does not support efficient iteration over true bits - the runtime is always O(n), where n is the number of total bits, which has no dependence on k. However, there are specialized data structures like [van Emde Boas trees](http://en.wikipedia.org/wiki/Van_Emde_Boas_tree) and [y-fast tries](http://w...
There are only two options that do much better than O(N) on total bits: 1. Using specialty bit-scan instructions available in certain architectures like [BSF in x86](http://www.posix.nl/linuxassembly/nasmdochtml/nasmdoca.html#section-A.10). 2. There are O(log2(N)) algorithms for finding the lowest bit set in a word. T...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
A standard bitvector does not support efficient iteration over true bits - the runtime is always O(n), where n is the number of total bits, which has no dependence on k. However, there are specialized data structures like [van Emde Boas trees](http://en.wikipedia.org/wiki/Van_Emde_Boas_tree) and [y-fast tries](http://w...
You can check up to 32-bits at a time with a u64 accumulator and a 32-entry table like ``` u32 kTable[] { 0x01, 0x03, 0x07, 0x0F ..., 0xFFFFFFFF }; ``` Just read in 32 bits into a u64 accumulator and shift it down depending on the offset and check your bits against the table. You can do this in a binary fashion to ...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
There are only two options that do much better than O(N) on total bits: 1. Using specialty bit-scan instructions available in certain architectures like [BSF in x86](http://www.posix.nl/linuxassembly/nasmdochtml/nasmdoca.html#section-A.10). 2. There are O(log2(N)) algorithms for finding the lowest bit set in a word. T...
Sometimes people use [run-length encoding](https://en.wikipedia.org/wiki/Run-length_encoding) for things like that. If you encode incoming bitset into an array of run lengths the number of runs you end up with wouldn't exceed the number of transitions between set and clear bits, which is at most `2*k`. Furthermore, in ...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
A standard bitvector does not support efficient iteration over true bits - the runtime is always O(n), where n is the number of total bits, which has no dependence on k. However, there are specialized data structures like [van Emde Boas trees](http://en.wikipedia.org/wiki/Van_Emde_Boas_tree) and [y-fast tries](http://w...
Looping over the entire bitset and simply checking the value and storing the index if true, IS linear. You can speed that up though with a lookup table. See this code: <http://xiangqi-engine.cvs.sourceforge.net/viewvc/xiangqi-engine/tsito2/src/Utility.cpp?revision=1.5&view=markup>
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
For that to be linear, you'd need a linked-list/array/set of the indices set true. Keeping such a secondary index is not part of the performance/storage tradeoffs required by std::bitset, and given it would disadvantage everyone without your specific requirement, there's no way an implementation will provide this. You ...
There are only two options that do much better than O(N) on total bits: 1. Using specialty bit-scan instructions available in certain architectures like [BSF in x86](http://www.posix.nl/linuxassembly/nasmdochtml/nasmdoca.html#section-A.10). 2. There are O(log2(N)) algorithms for finding the lowest bit set in a word. T...
4,709,160
Is there a way of iterating over a (possibly huge) `std::bitset` that is *linear* in the *number of bits that are set to true*? I want to prevent having to check every single position in the bitset. The iteration should successively return the indices of each bit that is set to true.
2011/01/17
[ "https://Stackoverflow.com/questions/4709160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/577941/" ]
There are only two options that do much better than O(N) on total bits: 1. Using specialty bit-scan instructions available in certain architectures like [BSF in x86](http://www.posix.nl/linuxassembly/nasmdochtml/nasmdoca.html#section-A.10). 2. There are O(log2(N)) algorithms for finding the lowest bit set in a word. T...
There is a way to do it in near O(k) time [plus O(n/64)] using the c++ standard bit manipulation tools in C++20. The O(n/64) is not a problem for me, but is may be an issue if you set is very large and very sparse. These map to CPU intrinsics on all the major platforms (x64, ARM, etc). On order for this to work ...
74,959
What color should a deletion confirmation message be? This is related to the question *[Should 'yes, delete it' be red, or green?](//ux.stackexchange.com/questions/49991/should-yes-delete-it-be-red-or-green)*, but different because this question asks about a passive confirmation message and not the active delete butto...
2015/03/17
[ "https://ux.stackexchange.com/questions/74959", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/17283/" ]
I would recommend moving away from colour for confirmation messages in this case. I say this because it can be confusing for the user especially since you are using red and green for "Reject" and "Accept" so when they have successfully done an action moving from red to green can be disorientating and unworthy extra c...
![Inbox Notification](https://i.stack.imgur.com/NRqQl.png) I find that the grey background with white text gives a very neutral feel and looks good on the eye as well. Unless it's good or bad, I would avoid green or red.
74,959
What color should a deletion confirmation message be? This is related to the question *[Should 'yes, delete it' be red, or green?](//ux.stackexchange.com/questions/49991/should-yes-delete-it-be-red-or-green)*, but different because this question asks about a passive confirmation message and not the active delete butto...
2015/03/17
[ "https://ux.stackexchange.com/questions/74959", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/17283/" ]
![Inbox Notification](https://i.stack.imgur.com/NRqQl.png) I find that the grey background with white text gives a very neutral feel and looks good on the eye as well. Unless it's good or bad, I would avoid green or red.
**The message indicates a successful action, so if you're using color cues, this message should use the color of success: green, in your case**. The danger color (red, in this example) should be used when the user is *about to do* something destructive (e.g. "Are you sure you want to delete this?"), but the message you...
74,959
What color should a deletion confirmation message be? This is related to the question *[Should 'yes, delete it' be red, or green?](//ux.stackexchange.com/questions/49991/should-yes-delete-it-be-red-or-green)*, but different because this question asks about a passive confirmation message and not the active delete butto...
2015/03/17
[ "https://ux.stackexchange.com/questions/74959", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/17283/" ]
![Inbox Notification](https://i.stack.imgur.com/NRqQl.png) I find that the grey background with white text gives a very neutral feel and looks good on the eye as well. Unless it's good or bad, I would avoid green or red.
Already there are couple of good answers urging you from moving away from colors. I do agree with them. Considering the color blindness/cultural relations, **colors should always be used as a secondary mode of conveying any information**. But then again, if you are working with an application which already has alerts f...
74,959
What color should a deletion confirmation message be? This is related to the question *[Should 'yes, delete it' be red, or green?](//ux.stackexchange.com/questions/49991/should-yes-delete-it-be-red-or-green)*, but different because this question asks about a passive confirmation message and not the active delete butto...
2015/03/17
[ "https://ux.stackexchange.com/questions/74959", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/17283/" ]
Don't start with choosing colors! --------------------------------- ### 1. First, distinguish notifications from errors This is a common point of confusion with UX. Consider these two messages: * `Sorry, the app has crashed` - This is an error, and should be highlighted as an error (i.e. pop up alert, dialog, red bu...
![Inbox Notification](https://i.stack.imgur.com/NRqQl.png) I find that the grey background with white text gives a very neutral feel and looks good on the eye as well. Unless it's good or bad, I would avoid green or red.
74,959
What color should a deletion confirmation message be? This is related to the question *[Should 'yes, delete it' be red, or green?](//ux.stackexchange.com/questions/49991/should-yes-delete-it-be-red-or-green)*, but different because this question asks about a passive confirmation message and not the active delete butto...
2015/03/17
[ "https://ux.stackexchange.com/questions/74959", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/17283/" ]
I would recommend moving away from colour for confirmation messages in this case. I say this because it can be confusing for the user especially since you are using red and green for "Reject" and "Accept" so when they have successfully done an action moving from red to green can be disorientating and unworthy extra c...
**The message indicates a successful action, so if you're using color cues, this message should use the color of success: green, in your case**. The danger color (red, in this example) should be used when the user is *about to do* something destructive (e.g. "Are you sure you want to delete this?"), but the message you...
74,959
What color should a deletion confirmation message be? This is related to the question *[Should 'yes, delete it' be red, or green?](//ux.stackexchange.com/questions/49991/should-yes-delete-it-be-red-or-green)*, but different because this question asks about a passive confirmation message and not the active delete butto...
2015/03/17
[ "https://ux.stackexchange.com/questions/74959", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/17283/" ]
I would recommend moving away from colour for confirmation messages in this case. I say this because it can be confusing for the user especially since you are using red and green for "Reject" and "Accept" so when they have successfully done an action moving from red to green can be disorientating and unworthy extra c...
Already there are couple of good answers urging you from moving away from colors. I do agree with them. Considering the color blindness/cultural relations, **colors should always be used as a secondary mode of conveying any information**. But then again, if you are working with an application which already has alerts f...
74,959
What color should a deletion confirmation message be? This is related to the question *[Should 'yes, delete it' be red, or green?](//ux.stackexchange.com/questions/49991/should-yes-delete-it-be-red-or-green)*, but different because this question asks about a passive confirmation message and not the active delete butto...
2015/03/17
[ "https://ux.stackexchange.com/questions/74959", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/17283/" ]
Don't start with choosing colors! --------------------------------- ### 1. First, distinguish notifications from errors This is a common point of confusion with UX. Consider these two messages: * `Sorry, the app has crashed` - This is an error, and should be highlighted as an error (i.e. pop up alert, dialog, red bu...
I would recommend moving away from colour for confirmation messages in this case. I say this because it can be confusing for the user especially since you are using red and green for "Reject" and "Accept" so when they have successfully done an action moving from red to green can be disorientating and unworthy extra c...