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
1,390,850
Assume that $x\_n>0$ and prove $x\_{n+1}>0$ $x\_{n+1}=1-\frac{a-1}{x\_n+a}$ $x\_n+a>a$ $-\frac{a-1}{x\_n+a}>-\frac{a-1}{a}\Rightarrow x\_{n+1}>0$ Is it necessary to find upper bound to prove that sequence is bounded? $x\_{n+1}-x\_n=\frac{-x\_n^2-x\_n(a-1)+1}{x\_n+a}\le 0$ and sequnce is non-increasing, thus is con...
2015/08/09
[ "https://math.stackexchange.com/questions/1390850", "https://math.stackexchange.com", "https://math.stackexchange.com/users/222321/" ]
You actually have to consider three cases: $0<a<1$, $a=1$, and $a>1$. The case $a=1$ is trivial: $x\_n=1$ for $n\ge 2$. Suppose that $0<a<1$ and $x\_n>0$. Then $0<x\_n+a<x\_n+1$, so $x\_{n+1}>1$. Thus, $x\_n>1$ for $n\ge 2$. Now suppose that $a>1$ and $x\_n>0$. Then $a-1>0$, so $$0<\frac{a-1}{x\_n+a}<1\;,$$ and he...
A bit more direct idea is to show that $L$ is attractive fixed point of $f$. This is enough to show that $f'(L)<1$, which is not very complicated.
44,288,133
I have this array, how I can print out an element inside it? For example, I want to print out, inside a new "div", the number "4" of "Date" and the text "descrizione descrizione" of "Title". to create a new "div" I have used: *document.getElementsByTagName("body")[0].appendChild(div);* ```js // EVENT MANAGER var e...
2017/05/31
[ "https://Stackoverflow.com/questions/44288133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7948282/" ]
``` // Using forEach loop function(events) { events.forEach(function(event) { console.log(event.Date); console.log(event.Title); }); } ```
create the DOM node and add the content to it's innerHTML ``` events.forEach(function(event){ var divToAdd = document.createElement('div'); divToAdd.innerHTML = event.Date.getDate() + " - " + event.Title; document.body.appendChild(divToAdd); }); ```
44,288,133
I have this array, how I can print out an element inside it? For example, I want to print out, inside a new "div", the number "4" of "Date" and the text "descrizione descrizione" of "Title". to create a new "div" I have used: *document.getElementsByTagName("body")[0].appendChild(div);* ```js // EVENT MANAGER var e...
2017/05/31
[ "https://Stackoverflow.com/questions/44288133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7948282/" ]
``` // Using forEach loop function(events) { events.forEach(function(event) { console.log(event.Date); console.log(event.Title); }); } ```
Use a foreach-loop on the array, to create the divs with the content and to append it to the body. You can use the day accessor of a Date object to get the day. See documentation [here](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Date) ``` var body = document.getElementsByTagName("bod...
44,288,133
I have this array, how I can print out an element inside it? For example, I want to print out, inside a new "div", the number "4" of "Date" and the text "descrizione descrizione" of "Title". to create a new "div" I have used: *document.getElementsByTagName("body")[0].appendChild(div);* ```js // EVENT MANAGER var e...
2017/05/31
[ "https://Stackoverflow.com/questions/44288133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7948282/" ]
HTML: ``` <div id="calendar"></div> ``` .JS: ``` // EVENT MANAGER var events = [ {'Date': new Date(2017, 5, 4), 'Title': 'descrizione descrizione'}, {'Date': new Date(2017, 5, 18), 'Title': 'desrizione descrizione', 'Link': 'www.google.com'}, {'Date': new Date(2017, 6, 27), 'Title': 'descrizione descrizione'...
``` // Using forEach loop function(events) { events.forEach(function(event) { console.log(event.Date); console.log(event.Title); }); } ```
44,288,133
I have this array, how I can print out an element inside it? For example, I want to print out, inside a new "div", the number "4" of "Date" and the text "descrizione descrizione" of "Title". to create a new "div" I have used: *document.getElementsByTagName("body")[0].appendChild(div);* ```js // EVENT MANAGER var e...
2017/05/31
[ "https://Stackoverflow.com/questions/44288133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7948282/" ]
HTML: ``` <div id="calendar"></div> ``` .JS: ``` // EVENT MANAGER var events = [ {'Date': new Date(2017, 5, 4), 'Title': 'descrizione descrizione'}, {'Date': new Date(2017, 5, 18), 'Title': 'desrizione descrizione', 'Link': 'www.google.com'}, {'Date': new Date(2017, 6, 27), 'Title': 'descrizione descrizione'...
create the DOM node and add the content to it's innerHTML ``` events.forEach(function(event){ var divToAdd = document.createElement('div'); divToAdd.innerHTML = event.Date.getDate() + " - " + event.Title; document.body.appendChild(divToAdd); }); ```
44,288,133
I have this array, how I can print out an element inside it? For example, I want to print out, inside a new "div", the number "4" of "Date" and the text "descrizione descrizione" of "Title". to create a new "div" I have used: *document.getElementsByTagName("body")[0].appendChild(div);* ```js // EVENT MANAGER var e...
2017/05/31
[ "https://Stackoverflow.com/questions/44288133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7948282/" ]
HTML: ``` <div id="calendar"></div> ``` .JS: ``` // EVENT MANAGER var events = [ {'Date': new Date(2017, 5, 4), 'Title': 'descrizione descrizione'}, {'Date': new Date(2017, 5, 18), 'Title': 'desrizione descrizione', 'Link': 'www.google.com'}, {'Date': new Date(2017, 6, 27), 'Title': 'descrizione descrizione'...
Use a foreach-loop on the array, to create the divs with the content and to append it to the body. You can use the day accessor of a Date object to get the day. See documentation [here](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Date) ``` var body = document.getElementsByTagName("bod...
26,884,806
So recently i gave my friend a URL on facebook chat while we were discussing on how much further we have to go on a booking system, my friend says he cant open the link, when i tried clicking it worked but what caught my eye was the referring URL by facebook: > > <https://www.facebook.com/>**l.php**?u=https%3A%2F%2F...
2014/11/12
[ "https://Stackoverflow.com/questions/26884806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3198256/" ]
No one can know what exactly that script does but the developers at Facebook. I presume they track all outgoing links from Facebook to get some statistics on them and on the users. After that it just sends you to the external page.
Please check out the following article [Facebook, privacy and the mystery of l.php](http://web.archive.org/web/20160826060705/http://www.codehesive.com:80/index.php/archive/facebook-privacy-and-the-mystery-of-l-php/) which says: > > Unless it’s from a public page, all you’re bound to see is one simple > referring UR...
2,495,117
I have found confronting information on other websites and thus will ask my question here. Is the following conversion legitimate? $$\sum\_{k=1}^n\sum\_{j=1}^nk\cdot j=\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj$$ I have seen someone doing something similar on [Matroids Matheplanet](http://www.matheplanet.com/default3.html?ca...
2017/10/29
[ "https://math.stackexchange.com/questions/2495117", "https://math.stackexchange.com", "https://math.stackexchange.com/users/492662/" ]
Yes. Since $k$ is a multiplier not related to $j$, it can be "factored" out, resulting in the product of two summations. Simple example, using $n=3$: $$\text{LHS}=\sum\_{k=1}^3\sum\_{j=1}^3 k\cdot j=\sum\_{k=1}^3 k+2k+3k=\sum\_{k=1}^3 6k=6\sum\_{k=1}^3 k=6(1+2+3)=36\\ \text{RHS}=\sum\_{k=1}^3k\sum\_{j=1}^3 j=(1+2+3)...
$$\sum\_{k}\sum\_{j}kj=\sum\_{k}\left(k(1+2+3+...)\right)$$ $$=(1+2+3...+n)1+(1+2+3...+n)2+...+(1+2+3...+n)n$$ And $$\sum\_{k}k\sum\_{j}j=(1+2+3...+n)(1+2+3...+n)$$ Clearly, by distribution, the two are equal.
2,495,117
I have found confronting information on other websites and thus will ask my question here. Is the following conversion legitimate? $$\sum\_{k=1}^n\sum\_{j=1}^nk\cdot j=\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj$$ I have seen someone doing something similar on [Matroids Matheplanet](http://www.matheplanet.com/default3.html?ca...
2017/10/29
[ "https://math.stackexchange.com/questions/2495117", "https://math.stackexchange.com", "https://math.stackexchange.com/users/492662/" ]
$$\sum\_{k}\sum\_{j}kj=\sum\_{k}\left(k(1+2+3+...)\right)$$ $$=(1+2+3...+n)1+(1+2+3...+n)2+...+(1+2+3...+n)n$$ And $$\sum\_{k}k\sum\_{j}j=(1+2+3...+n)(1+2+3...+n)$$ Clearly, by distribution, the two are equal.
> > Trivia: $\Large\sum, \int, \newcommand{\derivative}[3] {\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \derivative{n}{y}{x}$ are linear operations. > > > What does it mean? $\Large f(x)$ is linear if and only if $$\Large f(x+y)=f(x)+f(y)$$ $$\Large f(ax)=a\cdot f(x)$$ Let $$\large f(x)=\sum\_{j=1}^nx$$ ...
2,495,117
I have found confronting information on other websites and thus will ask my question here. Is the following conversion legitimate? $$\sum\_{k=1}^n\sum\_{j=1}^nk\cdot j=\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj$$ I have seen someone doing something similar on [Matroids Matheplanet](http://www.matheplanet.com/default3.html?ca...
2017/10/29
[ "https://math.stackexchange.com/questions/2495117", "https://math.stackexchange.com", "https://math.stackexchange.com/users/492662/" ]
Yes. Since $k$ is a multiplier not related to $j$, it can be "factored" out, resulting in the product of two summations. Simple example, using $n=3$: $$\text{LHS}=\sum\_{k=1}^3\sum\_{j=1}^3 k\cdot j=\sum\_{k=1}^3 k+2k+3k=\sum\_{k=1}^3 6k=6\sum\_{k=1}^3 k=6(1+2+3)=36\\ \text{RHS}=\sum\_{k=1}^3k\sum\_{j=1}^3 j=(1+2+3)...
Yes \begin{eqnarray} \sum\_{k=1}^n\sum\_{j=1}^nk\cdot j &=& \sum\_{k=1}^n k \cdot (1+2+...+n)\\ &=&1(1+2+...+n)+2(1+2+...+n)+...+n(1+2+...+n )\\ &=& (1+2+...+n)(1+2+...+n)\\ &=&\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj \end{eqnarray}
2,495,117
I have found confronting information on other websites and thus will ask my question here. Is the following conversion legitimate? $$\sum\_{k=1}^n\sum\_{j=1}^nk\cdot j=\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj$$ I have seen someone doing something similar on [Matroids Matheplanet](http://www.matheplanet.com/default3.html?ca...
2017/10/29
[ "https://math.stackexchange.com/questions/2495117", "https://math.stackexchange.com", "https://math.stackexchange.com/users/492662/" ]
Yes \begin{eqnarray} \sum\_{k=1}^n\sum\_{j=1}^nk\cdot j &=& \sum\_{k=1}^n k \cdot (1+2+...+n)\\ &=&1(1+2+...+n)+2(1+2+...+n)+...+n(1+2+...+n )\\ &=& (1+2+...+n)(1+2+...+n)\\ &=&\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj \end{eqnarray}
> > Trivia: $\Large\sum, \int, \newcommand{\derivative}[3] {\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \derivative{n}{y}{x}$ are linear operations. > > > What does it mean? $\Large f(x)$ is linear if and only if $$\Large f(x+y)=f(x)+f(y)$$ $$\Large f(ax)=a\cdot f(x)$$ Let $$\large f(x)=\sum\_{j=1}^nx$$ ...
2,495,117
I have found confronting information on other websites and thus will ask my question here. Is the following conversion legitimate? $$\sum\_{k=1}^n\sum\_{j=1}^nk\cdot j=\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj$$ I have seen someone doing something similar on [Matroids Matheplanet](http://www.matheplanet.com/default3.html?ca...
2017/10/29
[ "https://math.stackexchange.com/questions/2495117", "https://math.stackexchange.com", "https://math.stackexchange.com/users/492662/" ]
Yes. Since $k$ is a multiplier not related to $j$, it can be "factored" out, resulting in the product of two summations. Simple example, using $n=3$: $$\text{LHS}=\sum\_{k=1}^3\sum\_{j=1}^3 k\cdot j=\sum\_{k=1}^3 k+2k+3k=\sum\_{k=1}^3 6k=6\sum\_{k=1}^3 k=6(1+2+3)=36\\ \text{RHS}=\sum\_{k=1}^3k\sum\_{j=1}^3 j=(1+2+3)...
Since you have final sums, there is no problem. See $$ \sum\_{k=a}^n\sum\_{j=b}^m c\_kd\_j=\sum\_{k=a}^n\left(\sum\_{j=b}^m c\_kd\_j\right)= \sum\_{k=a}^n\left(c\_k\sum\_{j=b}^m d\_j\right)=\left(\sum\_{k=a}^nc\_k\right)\left(\sum\_{j=b}^m d\_j\right) $$ You just use the distributive law. At the first equation I added ...
2,495,117
I have found confronting information on other websites and thus will ask my question here. Is the following conversion legitimate? $$\sum\_{k=1}^n\sum\_{j=1}^nk\cdot j=\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj$$ I have seen someone doing something similar on [Matroids Matheplanet](http://www.matheplanet.com/default3.html?ca...
2017/10/29
[ "https://math.stackexchange.com/questions/2495117", "https://math.stackexchange.com", "https://math.stackexchange.com/users/492662/" ]
Yes. Since $k$ is a multiplier not related to $j$, it can be "factored" out, resulting in the product of two summations. Simple example, using $n=3$: $$\text{LHS}=\sum\_{k=1}^3\sum\_{j=1}^3 k\cdot j=\sum\_{k=1}^3 k+2k+3k=\sum\_{k=1}^3 6k=6\sum\_{k=1}^3 k=6(1+2+3)=36\\ \text{RHS}=\sum\_{k=1}^3k\sum\_{j=1}^3 j=(1+2+3)...
> > Trivia: $\Large\sum, \int, \newcommand{\derivative}[3] {\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \derivative{n}{y}{x}$ are linear operations. > > > What does it mean? $\Large f(x)$ is linear if and only if $$\Large f(x+y)=f(x)+f(y)$$ $$\Large f(ax)=a\cdot f(x)$$ Let $$\large f(x)=\sum\_{j=1}^nx$$ ...
2,495,117
I have found confronting information on other websites and thus will ask my question here. Is the following conversion legitimate? $$\sum\_{k=1}^n\sum\_{j=1}^nk\cdot j=\sum\_{k=1}^nk\cdot\sum\_{j=1}^nj$$ I have seen someone doing something similar on [Matroids Matheplanet](http://www.matheplanet.com/default3.html?ca...
2017/10/29
[ "https://math.stackexchange.com/questions/2495117", "https://math.stackexchange.com", "https://math.stackexchange.com/users/492662/" ]
Since you have final sums, there is no problem. See $$ \sum\_{k=a}^n\sum\_{j=b}^m c\_kd\_j=\sum\_{k=a}^n\left(\sum\_{j=b}^m c\_kd\_j\right)= \sum\_{k=a}^n\left(c\_k\sum\_{j=b}^m d\_j\right)=\left(\sum\_{k=a}^nc\_k\right)\left(\sum\_{j=b}^m d\_j\right) $$ You just use the distributive law. At the first equation I added ...
> > Trivia: $\Large\sum, \int, \newcommand{\derivative}[3] {\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \derivative{n}{y}{x}$ are linear operations. > > > What does it mean? $\Large f(x)$ is linear if and only if $$\Large f(x+y)=f(x)+f(y)$$ $$\Large f(ax)=a\cdot f(x)$$ Let $$\large f(x)=\sum\_{j=1}^nx$$ ...
185,461
I'm making a presentation, but I don't want to complicate me learning `beamer`, so I use `article` in `landscape` mode. How can I use a bigger font in all the document as default size? 24 pt, 36 pt, or any similar size???? ``` \documentclass[12pt,a4paper,x11names,landscape]{article} \usepackage[top=2.5cm, left=3.5cm...
2014/06/18
[ "https://tex.stackexchange.com/questions/185461", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/30549/" ]
Note `\Large{...}` is incorrect, the command does not take an argument, but you want bigger than large anyway: ``` \RequirePackage{fix-cm} \documentclass[12pt,a4paper,x11names,landscape]{article} \usepackage[top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm]{geometry} % Margenes de la normativa TFG \usepackage{incgrap...
Under the default settings for [`beamer`](http://ctan.org/pkg/beamer), it's not the font sizes that are increased, but actually the paper size that is shrunk. Since the output is view in PDF and made-to-fit within the viewer/screen, it appears that the font sizes are very large. An aspect ratio of 4:3 (resulting in a ...
11,193,954
I need to put in my android applicazion a tool that uses the free service for sending free sms through internet... I saw that many apps are able to integrate these sevices.. I tried a lot but I have not found anything useful.. So I ask you ... how can I use the gateway of `uthsms.net` (for example) for send SMS with ...
2012/06/25
[ "https://Stackoverflow.com/questions/11193954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1307098/" ]
Use a Tool like Firebug to see what gets sent when you click the button on the website. I see that a POST-Request is done to uthsms.net with some parameters. You should be able to do the same POST with your app. These are the parameter: ``` button: Send SMS country: (some integer) gateway: 0 hyderabad: your message r...
Try `GoogleVoice API`. It has documentation, which might help you get started. Here's a link : <https://code.google.com/p/google-voice-java/>
28,947,705
Hey this code works just fine, but it is difficult to read. I am looking for a way to do this better. ``` public void printArray(String[/*row*/][/*column*/] twoDiArray) { if (twoDiArray.length == 2) { for (int i = 0; i < twoDiArray[0].length; i++) { //prints attribute name and value ...
2015/03/09
[ "https://Stackoverflow.com/questions/28947705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4338187/" ]
You have pairs name-value, if your names are unique, you should use `Map<String, Integer>` instead. Otherwise, create your own class called e.g. `Attribute` and use `List<Attribute>`: ``` public class Attribute { private final String name; private final int value; public Attribute(String name, int value)...
You can use new variable to save the value of `twoDiArray.length` and use new var below.
28,947,705
Hey this code works just fine, but it is difficult to read. I am looking for a way to do this better. ``` public void printArray(String[/*row*/][/*column*/] twoDiArray) { if (twoDiArray.length == 2) { for (int i = 0; i < twoDiArray[0].length; i++) { //prints attribute name and value ...
2015/03/09
[ "https://Stackoverflow.com/questions/28947705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4338187/" ]
You have pairs name-value, if your names are unique, you should use `Map<String, Integer>` instead. Otherwise, create your own class called e.g. `Attribute` and use `List<Attribute>`: ``` public class Attribute { private final String name; private final int value; public Attribute(String name, int value)...
This can certainly be cleaned up a little bit. A different approach as other people have mentioned would have much neater code. It's a little bizarre that you have row and column like that. Reversing the order would also make things cleaner: ``` public void printArray(String[/*row*/][/*column*/] twoDiArray){ if(t...
28,947,705
Hey this code works just fine, but it is difficult to read. I am looking for a way to do this better. ``` public void printArray(String[/*row*/][/*column*/] twoDiArray) { if (twoDiArray.length == 2) { for (int i = 0; i < twoDiArray[0].length; i++) { //prints attribute name and value ...
2015/03/09
[ "https://Stackoverflow.com/questions/28947705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4338187/" ]
You have pairs name-value, if your names are unique, you should use `Map<String, Integer>` instead. Otherwise, create your own class called e.g. `Attribute` and use `List<Attribute>`: ``` public class Attribute { private final String name; private final int value; public Attribute(String name, int value)...
another way to check array ``` public void printArray(String[/*row*/][/*column*/] twoDiArray){ assert twoDiArray.length == 2; for(int i=0; i<twoDiArray[0].length; i++){ attributeNameAndValue(kvp[i][0], kvp[i][1]); } } ```
28,947,705
Hey this code works just fine, but it is difficult to read. I am looking for a way to do this better. ``` public void printArray(String[/*row*/][/*column*/] twoDiArray) { if (twoDiArray.length == 2) { for (int i = 0; i < twoDiArray[0].length; i++) { //prints attribute name and value ...
2015/03/09
[ "https://Stackoverflow.com/questions/28947705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4338187/" ]
You have pairs name-value, if your names are unique, you should use `Map<String, Integer>` instead. Otherwise, create your own class called e.g. `Attribute` and use `List<Attribute>`: ``` public class Attribute { private final String name; private final int value; public Attribute(String name, int value)...
To improve the code readability apply the java code conventions (<http://www.oracle.com/technetwork/java/codeconvtoc-136057.html>). Introduce variables rows and columns (for the number of rows and number of columns) ``` public void printArray(String[/*row*/][/*column*/] twoDiArray) { int rows = twoDiArray.length; ...
32,270,768
I am a completely new programmer and I am trying to develop a website in php. All I want to do in this part of the code is to "read" the user's inputs and save them as session variables in order to do/ calculate something else in another subpage. In order to see if everything is working fine I added the lines `echo "We...
2015/08/28
[ "https://Stackoverflow.com/questions/32270768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5276812/" ]
This is a simple join and an aggregation based on the vendor\_id: ``` select v.vendor_id, string_agg(ct.cuisine_type, ', ') as cuisine_type, string_agg(c.cuisine, ', ') as cuisine from table_1 as v join table_2 as ct on v.vendor_id = ct.vendor_id join table_3 as c on ct.cuisine_type = c.cuisine_ty...
Your table structure looks a bit strange. For instance, why does each cuisine type have only a single cuisine? Normally, I would expect the vendor to be connected to the cuisines, and then each cuisine to have a type. However, that is not *this* question. With the data you have provided, you can use `string_agg()`: `...
49,540,595
I am trying a simple (or not) query to get Users that exist in 2 Departments. Struct: **User** ID Name **UserDepartment** ID IDUser IDDepartment **Department** ID Name So i want users from DepartmentA and DepartmentB ( Is imposible to do: ``` Select * from User as US left join UserDepartment as DP on User.ID = U...
2018/03/28
[ "https://Stackoverflow.com/questions/49540595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1968341/" ]
To get all users that belong in both 1 and 2 departments: ``` SELECT * FROM User WHERE User.ID IN (SELECT UserID FROM UserDepartment WHERE IDDepartment = 1) AND User.ID IN (SELECT UserID FROM UserDepartment WHERE IDDepartment = 2) ``` The results are essentially the same as the latter query you have, except it ...
``` /*** If only users for dept 1 and 2 need to be shown the use this query ****/ Select * from #User u inner join ( Select d1.UserID from #UserDepartment d1 where d1.Department = 1 intersect ...
49,540,595
I am trying a simple (or not) query to get Users that exist in 2 Departments. Struct: **User** ID Name **UserDepartment** ID IDUser IDDepartment **Department** ID Name So i want users from DepartmentA and DepartmentB ( Is imposible to do: ``` Select * from User as US left join UserDepartment as DP on User.ID = U...
2018/03/28
[ "https://Stackoverflow.com/questions/49540595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1968341/" ]
This seems like a job for **INTERSECT**. You can get the list of user id's you want by doing something like: ``` SELECT IDUser FROM UserDepartment WHERE IDDepartment = 1 INTERSECT SELECT IDUser FROM UserDepartment WHERE IDDepartment = 2 ```
``` /*** If only users for dept 1 and 2 need to be shown the use this query ****/ Select * from #User u inner join ( Select d1.UserID from #UserDepartment d1 where d1.Department = 1 intersect ...
33,263,940
I have a WordPress website with Ad Inserter plugin. This plugin has different blocks where I can insert a php code to show it in different position of the post (e.g. after title, after paragraph 1, after content...) I have a php script and I want to print it in the post 2 times in 2 different positions. The problem i...
2015/10/21
[ "https://Stackoverflow.com/questions/33263940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4308345/" ]
Not an in-DOORS answer (ha, I slay me!), but what I use is PureText. Install the little program in your Windows system tray, and assign a hotkey combo. Then, instead of Ctrl+V for paste, when I press Win+V the clipboard contents are converted to plain text, and then the clipboard is pasted. (That last sentence is impor...
I don't know how to do this when pasting, but you can use a little DXL to change it afterwards, which is especially useful when the text contains formatting that you cannot remove from within DOORS: ``` Buffer temp = create temp = obj."Object Text" string s = tempStringOf temp obj."Object Text"= s delete temp ``` Th...
12,000,413
I am using Froyo version to run the Application. I got a **Fatal Exception** when I run the project also the Application has closed unexpectedly. I have 3 Buttons in activity\_main.xml file. **Main Activity Code** ``` public class Main extends Activity { private DropboxAPI<AndroidAuthSession> mDBApi; final static S...
2012/08/17
[ "https://Stackoverflow.com/questions/12000413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1488059/" ]
Minsdk version is 10, i.e,gingerbread . ``` <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="15" /> ``` You need to set it as 8 for Froyo ``` <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> ```
change the minSdkVersion to 8 instead of 10. ``` <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> ```
84,180
I have the following question: For a given two-dimensional Riemann surface $C$, 1. Is there a way to classify all topologically distinct three-dimensional compact manifolds $M$ whose boundary is $C$, i.e., $\partial M =C$? 2. Is there always a three-dimensional compact manifold $M$ such that $\partial M =C$ and is co...
2011/12/23
[ "https://mathoverflow.net/questions/84180", "https://mathoverflow.net", "https://mathoverflow.net/users/13731/" ]
1. When you say "Riemann surface", do you mean "topological surface"? Does the Riemann surface structure have any significance? I assume below that you mean "two-manifold" 1. Well, any three manifold contains a handlebody of your favorite genus, so this question is at least as hard as classifying three-manifolds (whi...
(1) Consider the case where C is a sphere. For any such manifold, we can just add a 3-dimensional ball to get a closed compact 3-fold. So in this case it's just the classification of closed compact 3-folds. For the torus, it's slightly more compact. One can again add a donut, so the problem includes the classification...
84,180
I have the following question: For a given two-dimensional Riemann surface $C$, 1. Is there a way to classify all topologically distinct three-dimensional compact manifolds $M$ whose boundary is $C$, i.e., $\partial M =C$? 2. Is there always a three-dimensional compact manifold $M$ such that $\partial M =C$ and is co...
2011/12/23
[ "https://mathoverflow.net/questions/84180", "https://mathoverflow.net", "https://mathoverflow.net/users/13731/" ]
1. When you say "Riemann surface", do you mean "topological surface"? Does the Riemann surface structure have any significance? I assume below that you mean "two-manifold" 1. Well, any three manifold contains a handlebody of your favorite genus, so this question is at least as hard as classifying three-manifolds (whi...
For (3), here is a nice counterexample if we ignore contractibility (taken from an article from *The American Mathematical Monthly*): <http://www.jstor.org/stable/pdfplus/2695643.pdf> Hopefully someone can embed the image (Figure 13). It is two topologically distinct manifolds with the torus as a boundary... one bein...
84,180
I have the following question: For a given two-dimensional Riemann surface $C$, 1. Is there a way to classify all topologically distinct three-dimensional compact manifolds $M$ whose boundary is $C$, i.e., $\partial M =C$? 2. Is there always a three-dimensional compact manifold $M$ such that $\partial M =C$ and is co...
2011/12/23
[ "https://mathoverflow.net/questions/84180", "https://mathoverflow.net", "https://mathoverflow.net/users/13731/" ]
(1) Consider the case where C is a sphere. For any such manifold, we can just add a 3-dimensional ball to get a closed compact 3-fold. So in this case it's just the classification of closed compact 3-folds. For the torus, it's slightly more compact. One can again add a donut, so the problem includes the classification...
For (3), here is a nice counterexample if we ignore contractibility (taken from an article from *The American Mathematical Monthly*): <http://www.jstor.org/stable/pdfplus/2695643.pdf> Hopefully someone can embed the image (Figure 13). It is two topologically distinct manifolds with the torus as a boundary... one bein...
278,900
I wrote below query for single status check, it is working but not for multiple status checks, it is throwing errors. ``` String draft = 'Draft'; String cancel = 'Cancelled'; String cmpnQuery = 'SELECT ID,Name,FROM Campaign where status!=:draft'; //working without issues String campQuery = 'SELECT ID,Name FROM Camp...
2019/09/20
[ "https://salesforce.stackexchange.com/questions/278900", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/64371/" ]
You should make a `Set<String>` and add the status to it. Like this ``` Set<String> stringSet = new Set<String>{'draft','cancel'}; ``` Then you can update the query to: ``` String campQuery = 'SELECT ID,Name FROM Campaign where status NOT IN: stringSet'; ```
Sarvesh and Zach are good anwsers, you can also achieve the same result with the next query. ``` SELECT Id, Name FROM Campaign WHERE Status != 'draft' AND Status != 'cancel' ```
278,900
I wrote below query for single status check, it is working but not for multiple status checks, it is throwing errors. ``` String draft = 'Draft'; String cancel = 'Cancelled'; String cmpnQuery = 'SELECT ID,Name,FROM Campaign where status!=:draft'; //working without issues String campQuery = 'SELECT ID,Name FROM Camp...
2019/09/20
[ "https://salesforce.stackexchange.com/questions/278900", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/64371/" ]
Use [Quoted String Escape Sequences](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_quotedstringescapes.htm) character ``` Database.query('SELECT ID,Name FROM Campaign where status NOT IN (\'draft\',\'cancel\')') ```
Sarvesh and Zach are good anwsers, you can also achieve the same result with the next query. ``` SELECT Id, Name FROM Campaign WHERE Status != 'draft' AND Status != 'cancel' ```
6,541,778
I am trying to build a script that pulls in data from a database using php/mysql. And I want to create a sidebar with the locations in my database. Kind of like the example in the link underneath <http://www.geocodezip.com/v3_MW_example_map15c.html> I am able to pull in data and display the locations on my map ...
2011/06/30
[ "https://Stackoverflow.com/questions/6541778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823890/" ]
Use `json.loads` not `json.load`. (`load` loads from a file-like object, `loads` from a string. So you could just as well omit the `.read()` call instead.)
I'm not familiar with python 3 yet, but it seems like `urllib.request.urlopen().read()` returns a `byte` object rather than string. You might try to feed it into a `StringIO` object, or even do a `str(response)`.
6,541,778
I am trying to build a script that pulls in data from a database using php/mysql. And I want to create a sidebar with the locations in my database. Kind of like the example in the link underneath <http://www.geocodezip.com/v3_MW_example_map15c.html> I am able to pull in data and display the locations on my map ...
2011/06/30
[ "https://Stackoverflow.com/questions/6541778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823890/" ]
Try this: ``` jsonResponse = json.loads(response.decode('utf-8')) ```
Use `json.loads` not `json.load`. (`load` loads from a file-like object, `loads` from a string. So you could just as well omit the `.read()` call instead.)
6,541,778
I am trying to build a script that pulls in data from a database using php/mysql. And I want to create a sidebar with the locations in my database. Kind of like the example in the link underneath <http://www.geocodezip.com/v3_MW_example_map15c.html> I am able to pull in data and display the locations on my map ...
2011/06/30
[ "https://Stackoverflow.com/questions/6541778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823890/" ]
Use `json.loads` not `json.load`. (`load` loads from a file-like object, `loads` from a string. So you could just as well omit the `.read()` call instead.)
I got the same error `{AttributeError: 'bytes' object has no attribute 'read'}` in python3. This worked for me later without using json: ``` from urllib.request import urlopen from bs4 import BeautifulSoup url = 'https://someurl/' page = urlopen(url) html = page.read() soup = BeautifulSoup(html) print(soup.prettify('...
6,541,778
I am trying to build a script that pulls in data from a database using php/mysql. And I want to create a sidebar with the locations in my database. Kind of like the example in the link underneath <http://www.geocodezip.com/v3_MW_example_map15c.html> I am able to pull in data and display the locations on my map ...
2011/06/30
[ "https://Stackoverflow.com/questions/6541778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823890/" ]
Try this: ``` jsonResponse = json.loads(response.decode('utf-8')) ```
I'm not familiar with python 3 yet, but it seems like `urllib.request.urlopen().read()` returns a `byte` object rather than string. You might try to feed it into a `StringIO` object, or even do a `str(response)`.
6,541,778
I am trying to build a script that pulls in data from a database using php/mysql. And I want to create a sidebar with the locations in my database. Kind of like the example in the link underneath <http://www.geocodezip.com/v3_MW_example_map15c.html> I am able to pull in data and display the locations on my map ...
2011/06/30
[ "https://Stackoverflow.com/questions/6541778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823890/" ]
I'm not familiar with python 3 yet, but it seems like `urllib.request.urlopen().read()` returns a `byte` object rather than string. You might try to feed it into a `StringIO` object, or even do a `str(response)`.
I got the same error `{AttributeError: 'bytes' object has no attribute 'read'}` in python3. This worked for me later without using json: ``` from urllib.request import urlopen from bs4 import BeautifulSoup url = 'https://someurl/' page = urlopen(url) html = page.read() soup = BeautifulSoup(html) print(soup.prettify('...
6,541,778
I am trying to build a script that pulls in data from a database using php/mysql. And I want to create a sidebar with the locations in my database. Kind of like the example in the link underneath <http://www.geocodezip.com/v3_MW_example_map15c.html> I am able to pull in data and display the locations on my map ...
2011/06/30
[ "https://Stackoverflow.com/questions/6541778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823890/" ]
Try this: ``` jsonResponse = json.loads(response.decode('utf-8')) ```
I got the same error `{AttributeError: 'bytes' object has no attribute 'read'}` in python3. This worked for me later without using json: ``` from urllib.request import urlopen from bs4 import BeautifulSoup url = 'https://someurl/' page = urlopen(url) html = page.read() soup = BeautifulSoup(html) print(soup.prettify('...
85,421
The police arrested a suspect linked to sexual assaults. The police searched his home. It sounds like initially the search warrants were very limited in scope but they widened as things turned up. While he was in jail, his lawyer followed his instructions to hide evidence. From [Wikipedia](https://en.wikipedia.org/wik...
2022/10/16
[ "https://law.stackexchange.com/questions/85421", "https://law.stackexchange.com", "https://law.stackexchange.com/users/4067/" ]
Quick answer ============ "Is a lawyer allowed to follow a client's instructions to hide evidence?" **Probably not**. I discuss this in the final section of this answer. About this specific case, the Crown did not prove beyond a reasonable doubt that the lawyer (Ken Murray) had intended to conceal the tapes permenant...
The details and principles of this case seem well addressed in the [answer by Jen](https://law.stackexchange.com/a/85423/17500). But I wish to address a particular point in the question which does not depend on the detailed facts of this particular case. The OP asks in the question: > > Doesn't a lawyer have a respo...
85,421
The police arrested a suspect linked to sexual assaults. The police searched his home. It sounds like initially the search warrants were very limited in scope but they widened as things turned up. While he was in jail, his lawyer followed his instructions to hide evidence. From [Wikipedia](https://en.wikipedia.org/wik...
2022/10/16
[ "https://law.stackexchange.com/questions/85421", "https://law.stackexchange.com", "https://law.stackexchange.com/users/4067/" ]
Quick answer ============ "Is a lawyer allowed to follow a client's instructions to hide evidence?" **Probably not**. I discuss this in the final section of this answer. About this specific case, the Crown did not prove beyond a reasonable doubt that the lawyer (Ken Murray) had intended to conceal the tapes permenant...
A lawyer protects lawfully. Once an evidence is encountered, every lawyer must expose it to the court or take criminal complicity responsibility.
85,421
The police arrested a suspect linked to sexual assaults. The police searched his home. It sounds like initially the search warrants were very limited in scope but they widened as things turned up. While he was in jail, his lawyer followed his instructions to hide evidence. From [Wikipedia](https://en.wikipedia.org/wik...
2022/10/16
[ "https://law.stackexchange.com/questions/85421", "https://law.stackexchange.com", "https://law.stackexchange.com/users/4067/" ]
The details and principles of this case seem well addressed in the [answer by Jen](https://law.stackexchange.com/a/85423/17500). But I wish to address a particular point in the question which does not depend on the detailed facts of this particular case. The OP asks in the question: > > Doesn't a lawyer have a respo...
A lawyer protects lawfully. Once an evidence is encountered, every lawyer must expose it to the court or take criminal complicity responsibility.
16,387,558
I don't understand this piece of code of a `for` loop in matlab, I know that loops in matlab usually look like: `for ii=1:2:100` so that it starts in 1 until 100 and in each iteration you add 2. But here I've got this condition in the loop and I don't get what it does: ``` for ii=[1:w:rd(1)-w-border, rd(1)-w-border+1...
2013/05/05
[ "https://Stackoverflow.com/questions/16387558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2164877/" ]
You're not doing it wrong, that's just not the semantics defined for [`Enumerator#each`](http://www.ruby-doc.org/core-2.0/Enumerator.html#method-i-each). You could make a derivative enumerator that only iterates from current position to end: ``` class Enumerator def enum_the_rest Enumerator.new { |y| loop { y <<...
[`Enumerator#next`](http://ruby-doc.org/core-2.0/Enumerator.html#method-i-next) and [`Enumerator#each`](http://ruby-doc.org/core-2.0/Enumerator.html#method-i-each) work on the object differently. Per the documentation for `#each` (emphasis mine): > > Iterates over the block **according to how this Enumerable was cons...
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
> > what should be the default opamp I stock in my parts bin? > > > It's a failure on your part to think that there is a default op-amp that suits most applications. It's as simple as that. It's also a failure to limit what you think are the important parameters to those that you have stated. There are many impor...
Here is a brief answer - go to a distributor site and look at the op-amp section. One can normally select by parameters. For example, [Farnell](http://uk.farnell.com/c/semiconductors-ics/amplifiers-comparators/operational-amplifiers-op-amps)
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
> > what should be the default opamp I stock in my parts bin? > > > It's a failure on your part to think that there is a default op-amp that suits most applications. It's as simple as that. It's also a failure to limit what you think are the important parameters to those that you have stated. There are many impor...
Ne5532 is a good all purpose opamp. Tda1308 is another one for good low voltage application. It has poorer DC performance however.
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
In complement to Andy's list of criteria, I'll add that most of the time, one of the usual suspects will do just fine. For example: * [MCP6002](http://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf) is a good one. Dirt cheap (bag of 10 is 3€). It's your crummy CMOS opamp. It is slow so it won't oscillate on your...
> > what should be the default opamp I stock in my parts bin? > > > It's a failure on your part to think that there is a default op-amp that suits most applications. It's as simple as that. It's also a failure to limit what you think are the important parameters to those that you have stated. There are many impor...
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
> > what should be the default opamp I stock in my parts bin? > > > It's a failure on your part to think that there is a default op-amp that suits most applications. It's as simple as that. It's also a failure to limit what you think are the important parameters to those that you have stated. There are many impor...
Because you mentioned Arduino (low power, low voltage): LM358N - 0.5mA, min 3V 1MHz MCP6001 - 0.1mA, min 1.8V 1MHz LM324 - 0.7mA, min 3V 1MHz (quadruple) NE5532a - ?mA min +-5V (10MHz!) TDA1308 - 3mA, min 3V, (class-AB stereo headphone driver, circ boards already available on ebay for $1) LM193, LM293, ...
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
Ne5532 is a good all purpose opamp. Tda1308 is another one for good low voltage application. It has poorer DC performance however.
Here is a brief answer - go to a distributor site and look at the op-amp section. One can normally select by parameters. For example, [Farnell](http://uk.farnell.com/c/semiconductors-ics/amplifiers-comparators/operational-amplifiers-op-amps)
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
In complement to Andy's list of criteria, I'll add that most of the time, one of the usual suspects will do just fine. For example: * [MCP6002](http://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf) is a good one. Dirt cheap (bag of 10 is 3€). It's your crummy CMOS opamp. It is slow so it won't oscillate on your...
Here is a brief answer - go to a distributor site and look at the op-amp section. One can normally select by parameters. For example, [Farnell](http://uk.farnell.com/c/semiconductors-ics/amplifiers-comparators/operational-amplifiers-op-amps)
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
Because you mentioned Arduino (low power, low voltage): LM358N - 0.5mA, min 3V 1MHz MCP6001 - 0.1mA, min 1.8V 1MHz LM324 - 0.7mA, min 3V 1MHz (quadruple) NE5532a - ?mA min +-5V (10MHz!) TDA1308 - 3mA, min 3V, (class-AB stereo headphone driver, circ boards already available on ebay for $1) LM193, LM293, ...
Here is a brief answer - go to a distributor site and look at the op-amp section. One can normally select by parameters. For example, [Farnell](http://uk.farnell.com/c/semiconductors-ics/amplifiers-comparators/operational-amplifiers-op-amps)
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
In complement to Andy's list of criteria, I'll add that most of the time, one of the usual suspects will do just fine. For example: * [MCP6002](http://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf) is a good one. Dirt cheap (bag of 10 is 3€). It's your crummy CMOS opamp. It is slow so it won't oscillate on your...
Ne5532 is a good all purpose opamp. Tda1308 is another one for good low voltage application. It has poorer DC performance however.
316,716
Related to [What's the uA741's appeal?](https://electronics.stackexchange.com/questions/8253/whats-the-ua741s-appeal), a lot of schematics use this rather dated opamp. My follow-up question would be: What is a good alternative? Of course if you have specific requirements you just search for the correct part. What I'm ...
2017/07/11
[ "https://electronics.stackexchange.com/questions/316716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/94884/" ]
In complement to Andy's list of criteria, I'll add that most of the time, one of the usual suspects will do just fine. For example: * [MCP6002](http://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf) is a good one. Dirt cheap (bag of 10 is 3€). It's your crummy CMOS opamp. It is slow so it won't oscillate on your...
Because you mentioned Arduino (low power, low voltage): LM358N - 0.5mA, min 3V 1MHz MCP6001 - 0.1mA, min 1.8V 1MHz LM324 - 0.7mA, min 3V 1MHz (quadruple) NE5532a - ?mA min +-5V (10MHz!) TDA1308 - 3mA, min 3V, (class-AB stereo headphone driver, circ boards already available on ebay for $1) LM193, LM293, ...
40,542,695
I currently have this code for an ajax search field. ``` $users = $wpdb->get_results( "SELECT * FROM wp_users WHERE display_name LIKE '%" . esc_attr( $_REQUEST['query'] ) . "%' LIMIT 10" ); ``` I only want to limit the results to 10. When the user clicks a load more button, how is this going run and exclude user ids...
2016/11/11
[ "https://Stackoverflow.com/questions/40542695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6522489/" ]
Have you tried `position=position_jitter()`? You can adjust the `width` and `height` to your choosing. ``` ggplot(df, aes(x = huff_margin_dem, y = margin16dem_state, label = abbrev)) + geom_abline(intercept = 0) + geom_text(fontface = "bold",position=position_jitter(width=1,height=1)) ``` **EDIT** An example to ...
Just thought I'd point out that `ggrepel::geom_text_repel` will do what you're after. Considering some of the text in your example already overlaps with the line, I figure perhaps it is the `label` part of `geom_label_repel` that you don't like, due to the background it will place behind your text, blocking the line. ...
38,770,073
I have created a structure called Register, with around 8 fields within it. I now want to create a structure called Instrument, which should have a variable amount of of fields, 6 which are the same for every instrument, plus a certain amount of fields depending on how many registers are attributed to it. How can I cre...
2016/08/04
[ "https://Stackoverflow.com/questions/38770073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6626066/" ]
You can make use of [flexible array members](https://en.wikipedia.org/wiki/Flexible_array_member) to achieve the same. Something like ``` typedef struct { int x; int y; int z; Register Reg1; Register Reg2; //upto this is fixed.... Register Reg[]; } Instrument...
You can use pointers ``` typedef struct { int x; int y; int z; Register *reg; } Instrument; ``` use it into code ``` Instrument a.reg = malloc(sizeof(Register)*NUM_OF_REGISTERS); if (a.reg != NULL) { // your STUFF free(a.Reg); } ```
15,732,257
I've got a project with complicated dependencies, and I'd like to make it easier for other developers to grab them. I've got a `Capfile`, `Gemfile`, `Guardfile`, `Procfile`, and `Rakefile`, so I thought... why not a `Brewfile` to manage system-level package dependencies for mac developers who clone the project? My hop...
2013/03/31
[ "https://Stackoverflow.com/questions/15732257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1293695/" ]
You can install an arbitrary formula using a URL, though not a file name. So if you turn the path in that `brew install /Users/me/...` command in to a `file://` URL, you can probably get it to work simply without having to maintain a repo or tap or anything like that. Note that to get it to automatically update stuff,...
It looks like I'm not the first with [this idea](https://github.com/andrew/brewdler)! Brewdler doesn't support specific taps or anything, but it'll work for me.
62,043,046
I am getting nan score from cross\_val\_score. May I please know how to handle it.. Struggling since a day. ``` from sklearn.model_selection import KFold, cross_val_score from sklearn.model_selection import train_test_split import hyperopt from hyperopt import tpe from hyperopt import STATUS_OK from hyperopt import Tr...
2020/05/27
[ "https://Stackoverflow.com/questions/62043046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8054946/" ]
cross\_val\_score method has this weird problem, if there is any issue with the underlying datatypes or parameters and encounters error internally instead of printing the exact error traceback it gives nans in the output. To understand your specific problem, use this parameter "error\_score" ``` cross_val_score(xgboo...
In cross\_val\_score, try using `df.loc[:,:'Amount'].values, df['Class'].values`
31,822
`User` and `Role` are just examples; also, code is sparse on purpose (i.e. for demonstration purposes only). Thoughts? (e.g. good, bad, etc.) **Interfaces** ``` public interface IEntity { int Id { get; } } public interface IUser : IEntity { string Username { get; } string Email { get; } ICollect...
2013/09/25
[ "https://codereview.stackexchange.com/questions/31822", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/30048/" ]
You should not dispose the context in the Repository's dispose method, because it has been injected via the constructor and you have no information if you can safely dispose it or not. If the same context has been passed into another repository then you would break it by disposing it. Please read this for a full expla...
This seems about right. There is only one thing I'd like to point out. I'd change this: ``` public interface IEntity { int Id { get; } } public class Entity : IEntity { public virtual int Id { get; set; } } ``` **All** your entities are assumed to have **only one Id**, ruling out **every** composite key. ...
23,496,360
Sonarqube software of department, demo and learning. StartSonar.bat does not start. Error Log below: ``` Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=160m; support was removed in 8.0 ``` I’m studied the error: ``` Jira task number:SONAR-5204 this jira status:closed and resolution:fixed ...
2014/05/06
[ "https://Stackoverflow.com/questions/23496360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/801104/" ]
You are trying to run SonarQube with a JDK 8, which is not supported (yet). Please revert to a previous version (JDK 7 is perfectly suitable).
I also came across the same error; However, the problem was not about Java version. As I went and looked into the logs, it was found that I copied new version of FindBug library and there was a conflict as two FindBug library existed. Thus, it may be good idea to look into sonar.log file which could be found in *sonar\...
50,239,555
I have a doubt about Microservices Architecture. We are developing an ERP and there're several microservices such as Human Resources, Identity, Orders and so on. We've implemented a shared domain layer for entities that are common for all those layers, including abstractions ( interfaces ) of Company, Location and so...
2018/05/08
[ "https://Stackoverflow.com/questions/50239555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Usually microservice architectures adopt a "share nothing" concept, which mean your code bases should be ideally separate. Yes, that will mean you will write more code but will keep your microservices more manageable, uncoupled and probably lighter. Also, regarding the DDD-part do the question, you should really striv...
> > My question is: What's the boundary of shared items for microservices and how bad is that? > > > Up until a few years ago it was complicated to get the boundaries a microservice defined because there was simply no agreement on how to archieve that, but Evans sorted that out a few years ago: [GOTO 2015 • DDD &...
11,669,691
I would like to enable those parameter but I don't have enought rights to modify the data base code (because of my company). So, I was wondering if I can modify them while I'm creating the conecction with the data base or accessing to a store procedure by means of a Java application.
2012/07/26
[ "https://Stackoverflow.com/questions/11669691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1479487/" ]
Don't use Regex for HTML, I would suggest checking out the [HtmlAgilityPack](http://htmlagilitypack.codeplex.com/ "HtmlAgilityPack") Very simple: ``` var doc = new HtmlDocument(); doc.LoadHtml("...your sample html..."); // all <td> tags in the document foreach (HtmlNode td in doc.DocumentNode.SelectNodes("//td")) {...
You should not use regex to parse HTML (one of many refs: [link](https://stackoverflow.com/questions/590747/using-regular-expressions-to-parse-html-why-not)) There exists a great .NET library named HtmlAgilityPack that I would recommend.
2,072,460
Hi I am currently using TableAdapter that returns a dataTable, which is fine to use when result table should have more than one row like : ``` MyItemsDataTable myItemsDataTable = Adapter.GetAllItems(); ``` but if we need only one row as a result, say an item, which has a particular ID ``` MyItemsDataSet.MyItemRow...
2010/01/15
[ "https://Stackoverflow.com/questions/2072460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/175216/" ]
Hard to tell without knowing what the code for the original throw is doing. It is possible that there are outstanding forms events that get processed as part of the app shutdown that ends up re-invoking the original code fragment. It could also be a virtual function on your application class that gets invoked during sh...
I suspect that in `ExceptionHandler.OnUnhandledException` a new exception might be raised which remains unhandled, gets bubbled up to the unhandled exceptions handler, which raises your `ExceptionHandler.OnUnhandledException` method and so on.. (infinite loop -> stack overflow). So doublecheck your OnUnhandledExceptio...
2,072,460
Hi I am currently using TableAdapter that returns a dataTable, which is fine to use when result table should have more than one row like : ``` MyItemsDataTable myItemsDataTable = Adapter.GetAllItems(); ``` but if we need only one row as a result, say an item, which has a particular ID ``` MyItemsDataSet.MyItemRow...
2010/01/15
[ "https://Stackoverflow.com/questions/2072460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/175216/" ]
**tl;dr: It's the debugger**. Detach and you won't get this weird behaviour. --- Alright. I did some experimentation with a Brand Spankin' New Project, and came up with a result. I'll start by posting the code so that you, too, can join in the fun and see it firsthand. Teh Codez ========= *[plz email them to me](ht...
I suspect that in `ExceptionHandler.OnUnhandledException` a new exception might be raised which remains unhandled, gets bubbled up to the unhandled exceptions handler, which raises your `ExceptionHandler.OnUnhandledException` method and so on.. (infinite loop -> stack overflow). So doublecheck your OnUnhandledExceptio...
2,072,460
Hi I am currently using TableAdapter that returns a dataTable, which is fine to use when result table should have more than one row like : ``` MyItemsDataTable myItemsDataTable = Adapter.GetAllItems(); ``` but if we need only one row as a result, say an item, which has a particular ID ``` MyItemsDataSet.MyItemRow...
2010/01/15
[ "https://Stackoverflow.com/questions/2072460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/175216/" ]
It's just a VS option that is enabled by default (only relevant when debugging of course). So no need to detach the debugger if all you want is to (test?) crash and burn where your un-debugged process will. ![Where this behaviour is controlled](https://i.stack.imgur.com/yfQZU.png)
I suspect that in `ExceptionHandler.OnUnhandledException` a new exception might be raised which remains unhandled, gets bubbled up to the unhandled exceptions handler, which raises your `ExceptionHandler.OnUnhandledException` method and so on.. (infinite loop -> stack overflow). So doublecheck your OnUnhandledExceptio...
2,072,460
Hi I am currently using TableAdapter that returns a dataTable, which is fine to use when result table should have more than one row like : ``` MyItemsDataTable myItemsDataTable = Adapter.GetAllItems(); ``` but if we need only one row as a result, say an item, which has a particular ID ``` MyItemsDataSet.MyItemRow...
2010/01/15
[ "https://Stackoverflow.com/questions/2072460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/175216/" ]
**tl;dr: It's the debugger**. Detach and you won't get this weird behaviour. --- Alright. I did some experimentation with a Brand Spankin' New Project, and came up with a result. I'll start by posting the code so that you, too, can join in the fun and see it firsthand. Teh Codez ========= *[plz email them to me](ht...
Hard to tell without knowing what the code for the original throw is doing. It is possible that there are outstanding forms events that get processed as part of the app shutdown that ends up re-invoking the original code fragment. It could also be a virtual function on your application class that gets invoked during sh...
2,072,460
Hi I am currently using TableAdapter that returns a dataTable, which is fine to use when result table should have more than one row like : ``` MyItemsDataTable myItemsDataTable = Adapter.GetAllItems(); ``` but if we need only one row as a result, say an item, which has a particular ID ``` MyItemsDataSet.MyItemRow...
2010/01/15
[ "https://Stackoverflow.com/questions/2072460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/175216/" ]
It's just a VS option that is enabled by default (only relevant when debugging of course). So no need to detach the debugger if all you want is to (test?) crash and burn where your un-debugged process will. ![Where this behaviour is controlled](https://i.stack.imgur.com/yfQZU.png)
Hard to tell without knowing what the code for the original throw is doing. It is possible that there are outstanding forms events that get processed as part of the app shutdown that ends up re-invoking the original code fragment. It could also be a virtual function on your application class that gets invoked during sh...
2,072,460
Hi I am currently using TableAdapter that returns a dataTable, which is fine to use when result table should have more than one row like : ``` MyItemsDataTable myItemsDataTable = Adapter.GetAllItems(); ``` but if we need only one row as a result, say an item, which has a particular ID ``` MyItemsDataSet.MyItemRow...
2010/01/15
[ "https://Stackoverflow.com/questions/2072460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/175216/" ]
**tl;dr: It's the debugger**. Detach and you won't get this weird behaviour. --- Alright. I did some experimentation with a Brand Spankin' New Project, and came up with a result. I'll start by posting the code so that you, too, can join in the fun and see it firsthand. Teh Codez ========= *[plz email them to me](ht...
It's just a VS option that is enabled by default (only relevant when debugging of course). So no need to detach the debugger if all you want is to (test?) crash and burn where your un-debugged process will. ![Where this behaviour is controlled](https://i.stack.imgur.com/yfQZU.png)
368,131
Between a mains step down transformer and a SMPS, which would be safer for a bench power supply? I cannot look inside the transformer in either case to judge the insulation quality. But, if the insulation does fail there would be 230VAC at the secondary for the mains transformer. And, maybe 325VDC at the output of the ...
2018/04/12
[ "https://electronics.stackexchange.com/questions/368131", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/72155/" ]
> > Battery A still had potential of 12V, but the battery B showed 0V. > > > When you connect batteries in series, you have to make sure they are of equal capacity (Ampere hours), equal Voltage and equal wear and age. Basically you may only create a series pack with two brand new batteries. This is important ...
Voltage is not a reliable indicator of charge state. Both batteries can have a terminal voltage of 12V, but one be half charged and the other nearly dead. Running them in series will work until the weakest one is completely discharged. At that point, the battery that still has charge begins pushing current through ...
368,131
Between a mains step down transformer and a SMPS, which would be safer for a bench power supply? I cannot look inside the transformer in either case to judge the insulation quality. But, if the insulation does fail there would be 230VAC at the secondary for the mains transformer. And, maybe 325VDC at the output of the ...
2018/04/12
[ "https://electronics.stackexchange.com/questions/368131", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/72155/" ]
Voltage is not a reliable indicator of charge state. Both batteries can have a terminal voltage of 12V, but one be half charged and the other nearly dead. Running them in series will work until the weakest one is completely discharged. At that point, the battery that still has charge begins pushing current through ...
The battery connected to the positive terminal will drain first every time. The idea that they drain evenly is incorrect. I check my trolling motor batteries for voltage every time I bring my boat back from the lake. The one connected to the positive lead is low and the one connected to the negative lead is 12+V.
368,131
Between a mains step down transformer and a SMPS, which would be safer for a bench power supply? I cannot look inside the transformer in either case to judge the insulation quality. But, if the insulation does fail there would be 230VAC at the secondary for the mains transformer. And, maybe 325VDC at the output of the ...
2018/04/12
[ "https://electronics.stackexchange.com/questions/368131", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/72155/" ]
> > Battery A still had potential of 12V, but the battery B showed 0V. > > > When you connect batteries in series, you have to make sure they are of equal capacity (Ampere hours), equal Voltage and equal wear and age. Basically you may only create a series pack with two brand new batteries. This is important ...
The battery connected to the positive terminal will drain first every time. The idea that they drain evenly is incorrect. I check my trolling motor batteries for voltage every time I bring my boat back from the lake. The one connected to the positive lead is low and the one connected to the negative lead is 12+V.
69,030,610
` import { initializeApp, getApps } from 'firebase/app'; import { getStorage } from 'firebase/storage'; const firebaseConfig = { apiKey: 'key', authDomain: 'facebook-clone-nextjs-2dcc9.firebaseapp.com', projectId: 'facebook-clone-nextjs-2dcc9', storageBucket: 'facebook-clone-nextjs-2dcc9.appspot.com', messagingSenderI...
2021/09/02
[ "https://Stackoverflow.com/questions/69030610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14810669/" ]
The issues are: * You are using modular SDK so you cannot use `db.collection()` * You should use `getFirestore` to get an instance of Firestore but you are using `getStorage` which will get an instance of Storage. Try refcatoring your code to this: ``` import { getFirestore, collection } from "firebase/firestore" c...
You should use `getFirestore` to get an instance of `Firestore`, but you are using `getStorage` which will get an instance of `Storage`.
56,761,405
I have a map of callbacks that pass information and execute various functions throughout code, very much like events in C# but in C++. The map is defined as `std::map<std::string, std::function<void(uint8_t*)>> mCallbacks` It is passed by reference to all subprograms Then each class binds its callbacks as such `m...
2019/06/25
[ "https://Stackoverflow.com/questions/56761405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2056201/" ]
You should generally prefer to use a lambda instead of `std::bind()`. Try something more like this: ```cpp std::map<std::string, std::function<void(void*)>> mCallbacks; struct Label_Callback_Data { std::string labelName; std::string labelText; Label_Callback_Data(std::string v_name, std::string v_text) ...
This is how I did it ... ``` //The container ``` `std::map<std::string, std::function<void(std::shared_ptr<CallbackData::BlankData>)>> mCallbacks` ... ``` //CALLBACK FUNCTION bool InputManager::KeyboardCallback(std::shared_ptr<CallbackData::BlankData> callback_data) { std::shared_ptr<CallbackData::Keyboard> ...
19,020,963
I am using a CUDA texture in border addressing mode (`cudaAddressModeBorder`). I am reading texture coordinates using `tex2D<float>()`. When the texture coordinates fall outside the texture, `tex2D<float>()` returns `0`. How can I change this returned border value from `0` to something else? I could check the texture ...
2013/09/26
[ "https://Stackoverflow.com/questions/19020963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1630/" ]
As mentioned by sgarizvi, CUDA supports only four, non-customizable address modes, namely, **clamp**, **border**, **wrap** and **mirror**, which are described in Section 3.2.11.1. of the CUDA programming guide. The former two work in both unnormalized and normalized coordinates, while the latter two in normalized coor...
As of now (CUDA 5.5), the CUDA texture fetch behavior is not customizable. Only 1 of the 4 automatic built-in modes (i.e. **Border**, **Clamp**, **Wrap** and **Mirror**) can be utilized for out of range texture fetch.
21,197,769
I am trying to pass a key value in query string from one page to another in a project using the Struts 2 framework. **URL Mapping:** ```xml <struts> <package name="default" namespace="/" extends="struts-default"> <!-- Line --> <action name="line" class="com.example.a.b.action.LineAction">...
2014/01/17
[ "https://Stackoverflow.com/questions/21197769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/593884/" ]
The problem is your database model, you can fix with a quest if the depth will always be three or less, but this is not a nice solution. Maybe a idea to read the following article on hierarchical data in MySQL: <http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/>
you could write a stored-procedure that creates a temporary table and loop through each node and insert category until the parent is NULL then SELECT from that temporary table ORDER by reverse order so that higher nodes will show up first and then drop that temporary table when you're done like this [sqlFiddle](http://...
28,929,822
I want to check if a element is being hovered over. I get this error: ``` Syntax error, unrecognized expression: unsupported pseudo: hover ``` when I use this code: ``` $('.class').blur(function(){ if(!$(this).is(':hover')){ //element not being hovered over } }); ``` i also tried this: ``` $('...
2015/03/08
[ "https://Stackoverflow.com/questions/28929822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2014429/" ]
``` $(".class").mouseover(function(){ $(this).attr('checked',true); }); }); ```
**jQuery has this functionality built-in.** [See documentation on .hover()](https://api.jquery.com/hover/) ``` $(".class").hover( function() { // item is being hovered over $(this).addClass('hover'); }, function() { // item is no longer being hovered over $(this).removeClass('hover'); } ); ```
33,750
I already know that pressing `Ctrl` + `W` will hide the bottom part of the HUD. But how can I hide the rest of the HUD that is shown on the top of the screen and the replay progress bar?
2011/10/30
[ "https://gaming.stackexchange.com/questions/33750", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/13582/" ]
As far as I can see that is not posible, here is a list of what you can do while watching a replay: > > Unit Following - You can lock the camera to any unit to follow it > around the map. To do this select the unit and press `Ctrl` + > `Shift` + `F`. > > > Replay Overlay - An overlay in the top left displays vari...
Actually you can with the letter `H`.
78,828
A particular server I need to interact with has an ancient or crippled `sshd` installed, and only supports SHA1 algorithms for key exchange. From information in the Snowden documents, I am leery that keys exchanged with servers with weak key exchange algorithms may be intercepted. I keep a separate identity that I use...
2015/01/09
[ "https://security.stackexchange.com/questions/78828", "https://security.stackexchange.com", "https://security.stackexchange.com/users/66011/" ]
You have several misconceptions here. First, the whole point of a public/private keypair is that you don't send the private key to the server. The only thing your key is used for is signing messages; the server doesn't get your private key at any point during the SSH protocol. Even if you use agent forwarding (which l...
Understanding the Risk: Jump Host Access to Other Resources ----------------------------------------------------------- > > However, if I have added my regular key to ssh-agent, it appears that my hopefully-more-secure key will still get sent over the potentially insecure key exchange. > > > Exposure of key mater...
1,164,503
I have replaced my laptop's HDD with a 480 GB SSD. I left a 20 GB gap at the end of the disk for over-provisioning (the location doesn't matter because it is a SSD). And the main partition has lots of free space. I used the trim feature integrated to Windows for the main partition. I then **hope** this SSD is cor...
2017/01/07
[ "https://superuser.com/questions/1164503", "https://superuser.com", "https://superuser.com/users/124122/" ]
The data you search for are only inside a private part on the SSD. Currently no standard way to access the internal SSD controler and its data structures. So even if possible it will be device specific. I suspect the existence of such programs in the hands of manufacturers, but never saw one. That said, I never sear...
Your question makes little sense, the [TRIM command](https://en.wikipedia.org/wiki/Trim_(computing)) is at it's most basic your OS informing the microcode in the SSD that a certain block no longer contains data and that it can be wiped/used for wear levelling or whatever. For monitoring health and wear data either use...
1,164,503
I have replaced my laptop's HDD with a 480 GB SSD. I left a 20 GB gap at the end of the disk for over-provisioning (the location doesn't matter because it is a SSD). And the main partition has lots of free space. I used the trim feature integrated to Windows for the main partition. I then **hope** this SSD is cor...
2017/01/07
[ "https://superuser.com/questions/1164503", "https://superuser.com", "https://superuser.com/users/124122/" ]
Users of some SSDs are reporting that `smartctl -A` is giving them a `Wear_Leveling_Count`. Others, like me, don't seem to have a way to find out. My drive model is reported as `TOSHIBA THNSNK128GVN8`. I have some `Unknown_SSD_Attribute` but they don't seem to have values that seem to be representing my discarded bloc...
Your question makes little sense, the [TRIM command](https://en.wikipedia.org/wiki/Trim_(computing)) is at it's most basic your OS informing the microcode in the SSD that a certain block no longer contains data and that it can be wiped/used for wear levelling or whatever. For monitoring health and wear data either use...
1,164,503
I have replaced my laptop's HDD with a 480 GB SSD. I left a 20 GB gap at the end of the disk for over-provisioning (the location doesn't matter because it is a SSD). And the main partition has lots of free space. I used the trim feature integrated to Windows for the main partition. I then **hope** this SSD is cor...
2017/01/07
[ "https://superuser.com/questions/1164503", "https://superuser.com", "https://superuser.com/users/124122/" ]
The data you search for are only inside a private part on the SSD. Currently no standard way to access the internal SSD controler and its data structures. So even if possible it will be device specific. I suspect the existence of such programs in the hands of manufacturers, but never saw one. That said, I never sear...
Users of some SSDs are reporting that `smartctl -A` is giving them a `Wear_Leveling_Count`. Others, like me, don't seem to have a way to find out. My drive model is reported as `TOSHIBA THNSNK128GVN8`. I have some `Unknown_SSD_Attribute` but they don't seem to have values that seem to be representing my discarded bloc...
63,698,536
I am trying to get the product name and the quantity from a nested HTML table using selenium. My problem is some of the divs don't have any id or class names. The table I am trying to access is the **Critical Product list**. Here is what I have done but I do seem to be lost at how I can get the nested divs. *The site i...
2020/09/02
[ "https://Stackoverflow.com/questions/63698536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7034465/" ]
You don't need beautiful soup, nor to save the page\_source. I used a CSS selector to select all the target rows in the table and then applied list comprehension to choose the left and right sides of each row. I outputted the results to a list of tuples. ``` options = Options() options.add_argument('start-maximized') ...
You have to use relative xpath to find the element with `class="line-item-left"` for the name of each item and the element with `class="line-item-right"` for the number of available items. ``` driver.find_elements_by_class_name("line-item-left") //Item names driver.find_elements_by_class_name("line-item-right") //Numb...
63,698,536
I am trying to get the product name and the quantity from a nested HTML table using selenium. My problem is some of the divs don't have any id or class names. The table I am trying to access is the **Critical Product list**. Here is what I have done but I do seem to be lost at how I can get the nested divs. *The site i...
2020/09/02
[ "https://Stackoverflow.com/questions/63698536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7034465/" ]
You don't need beautiful soup, nor to save the page\_source. I used a CSS selector to select all the target rows in the table and then applied list comprehension to choose the left and right sides of each row. I outputted the results to a list of tuples. ``` options = Options() options.add_argument('start-maximized') ...
This is the selector for **`product name`**: ``` div.critical-product-table-container div.line-item-left ``` And for **`total`**: ``` div.critical-product-table-container div.line-item-right ``` But the following approach is without `BeautifulSoup`. `time.sleep(...)` is bad practice, please use [**`WebDriverWait...
63,698,536
I am trying to get the product name and the quantity from a nested HTML table using selenium. My problem is some of the divs don't have any id or class names. The table I am trying to access is the **Critical Product list**. Here is what I have done but I do seem to be lost at how I can get the nested divs. *The site i...
2020/09/02
[ "https://Stackoverflow.com/questions/63698536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7034465/" ]
To print the product name and the quantity you need to induce [WebDriverWait](https://stackoverflow.com/questions/49775502/webdriverwait-not-working-as-expected/49775808#49775808) for the `visibility_of_all_elements_located()` and you can use either of the following [Locator Strategies](https://stackoverflow.com/questi...
You have to use relative xpath to find the element with `class="line-item-left"` for the name of each item and the element with `class="line-item-right"` for the number of available items. ``` driver.find_elements_by_class_name("line-item-left") //Item names driver.find_elements_by_class_name("line-item-right") //Numb...
63,698,536
I am trying to get the product name and the quantity from a nested HTML table using selenium. My problem is some of the divs don't have any id or class names. The table I am trying to access is the **Critical Product list**. Here is what I have done but I do seem to be lost at how I can get the nested divs. *The site i...
2020/09/02
[ "https://Stackoverflow.com/questions/63698536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7034465/" ]
To print the product name and the quantity you need to induce [WebDriverWait](https://stackoverflow.com/questions/49775502/webdriverwait-not-working-as-expected/49775808#49775808) for the `visibility_of_all_elements_located()` and you can use either of the following [Locator Strategies](https://stackoverflow.com/questi...
This is the selector for **`product name`**: ``` div.critical-product-table-container div.line-item-left ``` And for **`total`**: ``` div.critical-product-table-container div.line-item-right ``` But the following approach is without `BeautifulSoup`. `time.sleep(...)` is bad practice, please use [**`WebDriverWait...
583,701
I am trying to draw something like this in overleaf using Tikzpicture, I need assistance [![enter image description here](https://i.stack.imgur.com/2lwme.png)](https://i.stack.imgur.com/2lwme.png)
2021/02/16
[ "https://tex.stackexchange.com/questions/583701", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/235406/" ]
This is relative simple problem. You only need to make yourself a little bit familiar with TikZ package. It has very detailed (consequently huge) documentation, but for start is sufficient to read the first *Tutorial* or [A very minimal introduction to TikZ](http://cremeronline.com/LaTeX/minimaltikz.pdf) and see exampl...
Here is something to start with. How to properly make the right angle mark see [here](https://tex.stackexchange.com/a/79999/224762). ``` \documentclass[border=3mm]{article} \usepackage{tikz} \usepackage{caption} \newcommand*{\rechterWinkel}[3]{% #1 = point, #2 = start angle, #3 = radius \draw[shift={(#2:#3)}] (...
583,701
I am trying to draw something like this in overleaf using Tikzpicture, I need assistance [![enter image description here](https://i.stack.imgur.com/2lwme.png)](https://i.stack.imgur.com/2lwme.png)
2021/02/16
[ "https://tex.stackexchange.com/questions/583701", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/235406/" ]
One solution with `tkz-euclide`: ``` \documentclass{article} \usepackage{tkz-euclide} \begin{document} \begin{figure} \centering \begin{tikzpicture}[double distance=3pt] \clip(-.5,-.5) rectangle (12,5); \tkzDefPoints{-5/0/S,0/0/A,3/0/B,1/2/C} \tkzDefPointsBy[hom...
Here is something to start with. How to properly make the right angle mark see [here](https://tex.stackexchange.com/a/79999/224762). ``` \documentclass[border=3mm]{article} \usepackage{tikz} \usepackage{caption} \newcommand*{\rechterWinkel}[3]{% #1 = point, #2 = start angle, #3 = radius \draw[shift={(#2:#3)}] (...
45,663,041
I started using atom as my editor for learning Javascript. I've followed a bunch of tutorials online and while my code looks exactly like it does in the tuts, for some reason I'm missing the Javascript behavior. Here is a simple example of my code that simply won't run out of atom, notepadd++ or notepad. In atom I use ...
2017/08/13
[ "https://Stackoverflow.com/questions/45663041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8423126/" ]
As suggested by @qwertyman in the comments 1. remove all invalid edges i.e edges whose difference is greater than 1 2. Now we have a forest, for each forest calculate the diameter as it is given in @Filip Kočica solution 3. The answer would be the max diameter out of all forests
For each subtree, you can calculate the longest increasing path down from the subtree root, the longest decreasing path down, and the longest internal path consisting of the increasing and decreasing paths down from the same node anywhere in the subtree. It's easy to calculate these for a node if you already have them...
45,663,041
I started using atom as my editor for learning Javascript. I've followed a bunch of tutorials online and while my code looks exactly like it does in the tuts, for some reason I'm missing the Javascript behavior. Here is a simple example of my code that simply won't run out of atom, notepadd++ or notepad. In atom I use ...
2017/08/13
[ "https://Stackoverflow.com/questions/45663041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8423126/" ]
As suggested by @qwertyman in the comments 1. remove all invalid edges i.e edges whose difference is greater than 1 2. Now we have a forest, for each forest calculate the diameter as it is given in @Filip Kočica solution 3. The answer would be the max diameter out of all forests
The answer is incorrect - another user correctly pointed out a bug. My solution below works only when the max length path passes through the root. In case, for example, the max length path is entirely in the left subtree and does not pass through the root, this answer fails. Feel free to read further to acquaint yourse...
45,663,041
I started using atom as my editor for learning Javascript. I've followed a bunch of tutorials online and while my code looks exactly like it does in the tuts, for some reason I'm missing the Javascript behavior. Here is a simple example of my code that simply won't run out of atom, notepadd++ or notepad. In atom I use ...
2017/08/13
[ "https://Stackoverflow.com/questions/45663041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8423126/" ]
As suggested by @qwertyman in the comments 1. remove all invalid edges i.e edges whose difference is greater than 1 2. Now we have a forest, for each forest calculate the diameter as it is given in @Filip Kočica solution 3. The answer would be the max diameter out of all forests
Let `longest_desc[a]` be the longest 1-by-1 descending path going down from a Similarly `longest_asc[a]`, the longest 1-by-1 incremental path going down from a For a fixed root R, the answer would be `longest_desc[R] + longest_asc[R] - 1`. A brut force solution would do 2 dfs/bfs traversals from each node X to compu...
60,089,171
I have this class ``` class Cars implements Transport, Serializable, Cloneable { private String type; private Models[] cars; private int number; private static final long serialVersionUID = 1L; Cars(String type, int number){ this.type = type; this.number = number; cars = new Model...
2020/02/06
[ "https://Stackoverflow.com/questions/60089171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12669203/" ]
The allowed[] array contains all zeroes. So if you input any value say x , where 0 >= x >= INT\_MAX your code would print "Exited with 0". Any negative number should print "Accepted". May be a logical bug you have in your code. I ran your code in Xcode. Try debugging using breakpoints if that helps.
Usual way is to add breakpoint at the closing brace to check the result before exiting. Another way is to go Tools > Options > Debugging and uncheck "Automatically close the console when debugging stops".
34,661,939
I want to find out if user has used the words `admin` or `username` anywhere in their possible username string. So if user wants to use `admin`, or `I am admin`, or `my admin name` or `my username`, as their username, I want my regexp to detect it. If he uses `adminmember` I can live with that, don't detect it. I also...
2016/01/07
[ "https://Stackoverflow.com/questions/34661939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1708788/" ]
Square brackets in a regexp are not for grouping, they're for specifying character classes; grouping is done with parentheses. You don't want to anchor the regexp with `^` and `$`, because that will only match at the beginning and end of the string; you want to use `\b` to match word boundaries. ``` /\b(admin|username...
Just look for words using word boundaries: ``` /\b(?:admin|username)\b/i ``` and if there is a match return error e.g. ``` if (preg_match('/\b(?:admin|username)\b/i', $input)) { die("Invalid Input"); } ```
34,661,939
I want to find out if user has used the words `admin` or `username` anywhere in their possible username string. So if user wants to use `admin`, or `I am admin`, or `my admin name` or `my username`, as their username, I want my regexp to detect it. If he uses `adminmember` I can live with that, don't detect it. I also...
2016/01/07
[ "https://Stackoverflow.com/questions/34661939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1708788/" ]
Just look for words using word boundaries: ``` /\b(?:admin|username)\b/i ``` and if there is a match return error e.g. ``` if (preg_match('/\b(?:admin|username)\b/i', $input)) { die("Invalid Input"); } ```
This might be the pattern that you're looking for: ``` '#(^|\s){1}('. $needle .')($|\s|,|\.){1}#i' ``` Some details depend on the restrictions that you want to apply.
34,661,939
I want to find out if user has used the words `admin` or `username` anywhere in their possible username string. So if user wants to use `admin`, or `I am admin`, or `my admin name` or `my username`, as their username, I want my regexp to detect it. If he uses `adminmember` I can live with that, don't detect it. I also...
2016/01/07
[ "https://Stackoverflow.com/questions/34661939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1708788/" ]
Square brackets in a regexp are not for grouping, they're for specifying character classes; grouping is done with parentheses. You don't want to anchor the regexp with `^` and `$`, because that will only match at the beginning and end of the string; you want to use `\b` to match word boundaries. ``` /\b(admin|username...
Try the below snippet to keep your list of words in `Array`. ``` $input = "im username "; $spam_words = array("admin", "username"); $expression = '/\b(?:' . implode($spam_words, "|") . ')\b/i'; if (preg_match($expression, $input)) { die("Username contains invalid value"); } else { echo "Congrats! is valid input";...
34,661,939
I want to find out if user has used the words `admin` or `username` anywhere in their possible username string. So if user wants to use `admin`, or `I am admin`, or `my admin name` or `my username`, as their username, I want my regexp to detect it. If he uses `adminmember` I can live with that, don't detect it. I also...
2016/01/07
[ "https://Stackoverflow.com/questions/34661939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1708788/" ]
Square brackets in a regexp are not for grouping, they're for specifying character classes; grouping is done with parentheses. You don't want to anchor the regexp with `^` and `$`, because that will only match at the beginning and end of the string; you want to use `\b` to match word boundaries. ``` /\b(admin|username...
This might be the pattern that you're looking for: ``` '#(^|\s){1}('. $needle .')($|\s|,|\.){1}#i' ``` Some details depend on the restrictions that you want to apply.
34,661,939
I want to find out if user has used the words `admin` or `username` anywhere in their possible username string. So if user wants to use `admin`, or `I am admin`, or `my admin name` or `my username`, as their username, I want my regexp to detect it. If he uses `adminmember` I can live with that, don't detect it. I also...
2016/01/07
[ "https://Stackoverflow.com/questions/34661939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1708788/" ]
Try the below snippet to keep your list of words in `Array`. ``` $input = "im username "; $spam_words = array("admin", "username"); $expression = '/\b(?:' . implode($spam_words, "|") . ')\b/i'; if (preg_match($expression, $input)) { die("Username contains invalid value"); } else { echo "Congrats! is valid input";...
This might be the pattern that you're looking for: ``` '#(^|\s){1}('. $needle .')($|\s|,|\.){1}#i' ``` Some details depend on the restrictions that you want to apply.
3,865,952
I need to transfrom bits into char array or string, help to find best way to store bits and what shoud I do if for example I have 18 bits I will make 2 char and 2 bits?
2010/10/05
[ "https://Stackoverflow.com/questions/3865952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/446657/" ]
``` SELECT tb1.booking_ref, tb1.investor, tb2.cost, tb3.product FROM tb1 inner join tb3 on tb1.location = tb3.location left join tb2 on tb1.booking_ref = tb2.booking_ref and tb1.investor = tb2.investor WHERE tb1.investor = '12345' ```
Instead of in the `WHERE` clause, add `tb1.location = tb3.location` to an `ON`/`AND` clause. Answer before the question update: yes, it would. Where did you state the relationship between table `tb3` and either of `tb1`, `tb2`? For joins, you need to have a relationship between certain columns among these tables.
3,865,952
I need to transfrom bits into char array or string, help to find best way to store bits and what shoud I do if for example I have 18 bits I will make 2 char and 2 bits?
2010/10/05
[ "https://Stackoverflow.com/questions/3865952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/446657/" ]
``` SELECT tb1.booking_ref, tb1.investor, tb2.cost, tb3.product FROM tb1 inner join tb3 on tb1.location = tb3.location left join tb2 on tb1.booking_ref = tb2.booking_ref and tb1.investor = tb2.investor WHERE tb1.investor = '12345' ```
This might help you: ``` SELECT t1.booking_ref, t1.investor, t.cost, t.product FROM tb1 t1 CROSS APPLY( SELECT t2.cost, t3.product FROM tb3 t3 LEFT JOIN tb2 t2 ON (t1.booking_ref = t2.booking_ref AND t1.investor = t2.investor AND t1.investor = '12345') ) AS t ...
29,694,458
I would like to inverse two div inside a bigger div when the user choose something on an input radio. I have this html: ``` <input type="radio" name="orderBy" id="orderByAsc" value="asc" > <input type="radio" name="orderBy" id="orderByDesc" value="desc" > <div class="col-md-10"> <div class="tags"> //Stu...
2015/04/17
[ "https://Stackoverflow.com/questions/29694458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393203/" ]
```js $(document).on('change', 'input[name=orderBy]', function() { var that = $(this); var val = that.val(); var wrp = $('#wrp'); var one = $('#one'); var two = $('#two'); if (val == 'desc') { var oneC = one.clone(); one.remove(); two.before(oneC); } else if (val == 'asc') { var...
What do you want it to do, when you click on desc? Because right now, it won't change the order at all, you select each div and append it to its parent, so you put it exactly where it was at the beginning. If you want to change the order by clicking on desc too, just use prepend in both cases. E.g.: ``` $('input[type...
29,694,458
I would like to inverse two div inside a bigger div when the user choose something on an input radio. I have this html: ``` <input type="radio" name="orderBy" id="orderByAsc" value="asc" > <input type="radio" name="orderBy" id="orderByDesc" value="desc" > <div class="col-md-10"> <div class="tags"> //Stu...
2015/04/17
[ "https://Stackoverflow.com/questions/29694458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393203/" ]
```js $(document).on('change', 'input[name=orderBy]', function() { var that = $(this); var val = that.val(); var wrp = $('#wrp'); var one = $('#one'); var two = $('#two'); if (val == 'desc') { var oneC = one.clone(); one.remove(); two.before(oneC); } else if (val == 'asc') { var...
It's because when you're clicking the radio desc, it trigger the `else` statement which will append the `div` to the end before it's container closing tags, so if it run, it will results in something like this Start: ``` <div id="container"> <div id="1">1</div> <div id="2">2</div> </div> ``` 1st iteration o...
29,694,458
I would like to inverse two div inside a bigger div when the user choose something on an input radio. I have this html: ``` <input type="radio" name="orderBy" id="orderByAsc" value="asc" > <input type="radio" name="orderBy" id="orderByDesc" value="desc" > <div class="col-md-10"> <div class="tags"> //Stu...
2015/04/17
[ "https://Stackoverflow.com/questions/29694458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393203/" ]
```js $(document).on('change', 'input[name=orderBy]', function() { var that = $(this); var val = that.val(); var wrp = $('#wrp'); var one = $('#one'); var two = $('#two'); if (val == 'desc') { var oneC = one.clone(); one.remove(); two.before(oneC); } else if (val == 'asc') { var...
This can actually be accomplished with CSS alone, no need for any Javascript. What we're going to do is use flexbox to layout the divs and then, using a `:checked` pseudo class and an adjacent selector `~`, change the `order` of the child divs. ```css .col-md-10{ display:-webkit-flex; display:flex; -web...
29,694,458
I would like to inverse two div inside a bigger div when the user choose something on an input radio. I have this html: ``` <input type="radio" name="orderBy" id="orderByAsc" value="asc" > <input type="radio" name="orderBy" id="orderByDesc" value="desc" > <div class="col-md-10"> <div class="tags"> //Stu...
2015/04/17
[ "https://Stackoverflow.com/questions/29694458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393203/" ]
It's because when you're clicking the radio desc, it trigger the `else` statement which will append the `div` to the end before it's container closing tags, so if it run, it will results in something like this Start: ``` <div id="container"> <div id="1">1</div> <div id="2">2</div> </div> ``` 1st iteration o...
What do you want it to do, when you click on desc? Because right now, it won't change the order at all, you select each div and append it to its parent, so you put it exactly where it was at the beginning. If you want to change the order by clicking on desc too, just use prepend in both cases. E.g.: ``` $('input[type...
29,694,458
I would like to inverse two div inside a bigger div when the user choose something on an input radio. I have this html: ``` <input type="radio" name="orderBy" id="orderByAsc" value="asc" > <input type="radio" name="orderBy" id="orderByDesc" value="desc" > <div class="col-md-10"> <div class="tags"> //Stu...
2015/04/17
[ "https://Stackoverflow.com/questions/29694458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2393203/" ]
This can actually be accomplished with CSS alone, no need for any Javascript. What we're going to do is use flexbox to layout the divs and then, using a `:checked` pseudo class and an adjacent selector `~`, change the `order` of the child divs. ```css .col-md-10{ display:-webkit-flex; display:flex; -web...
What do you want it to do, when you click on desc? Because right now, it won't change the order at all, you select each div and append it to its parent, so you put it exactly where it was at the beginning. If you want to change the order by clicking on desc too, just use prepend in both cases. E.g.: ``` $('input[type...
440,932
How do I program my Mac's `F19` key to automatically type a text when I press it?
2012/06/24
[ "https://superuser.com/questions/440932", "https://superuser.com", "https://superuser.com/users/142082/" ]
You can use GNU sed: ``` sed -i -e "/^$/d" su.txt ``` Will delete blank lines. --- If you're on a BSD variant or OS X, use this instead: ``` sed -i '' -e "/^$/d" su.txt ``` Here, `-i` takes an *extension* as an argument – using the GNU sed syntax would result in a file `su.txt-e` being created.
This can be achieved by using grep: ``` grep . file ``` Or try the [ex](https://en.wikipedia.org/wiki/Ex_(text_editor))-way (cross-platform compatible): ``` ex -s +'v/\S/d' -cwq test.txt ``` For multiple files (edit in-place): ``` ex -s +'bufdo!v/\S/d' -cxa *.txt ``` Note: The `:bufdo` command is not [POSIX](h...
24,205,998
I have a problem with the java librairie OpenCSV. I didn't succeed to read all line of my CSV file, I read only the second line, I don't know why ... My CSV file : ``` "NumACLEB","Nom","Prenom","Niveau","Telephone","Portable","Rue","Code Postale","Ville","Activite","Adresse Mail","Cotisation Acleb","Cotisation Ad...
2014/06/13
[ "https://Stackoverflow.com/questions/24205998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3360368/" ]
The error states, you are using the column annotation on what the JPA provider thinks should be a relationship mapping - for some reason it thinks the Airport City string is a relationship instead of a basic mapping. Join columns are required on relationship mappings to specify both a foreign key field as well as the f...
Your error message pretty clearly tells you what's wrong: When you model a relationship, you have to specify the join column. See the [Javadoc](http://docs.oracle.com/javaee/7/api/javax/persistence/OneToOne.html) for a short example, or read the [Java EE tutorial](http://docs.oracle.com/javaee/7/tutorial/doc/partpersis...