qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | Try this
```
For(int i=1;I<2500;I++)
System.out.print(i%2==0?-3*i:3*i)
``` | By making sum = sum + 3 and sum is -6 it will make -6 + 3 = -3 and then \*-1
U will have to make a condition to make +3 or -3 in those cases |
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | If `sum` is positive before multiplying, you should subtract `3` and if it is negative beforehand, you should add `3`. You could implement this with the ternary operator or with `Integer.signum`. Note that you should not be incrementing `i` inside the `for` loop body, as it will be incremented at the end of each iterat... | By making sum = sum + 3 and sum is -6 it will make -6 + 3 = -3 and then \*-1
U will have to make a condition to make +3 or -3 in those cases |
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | Your calculation is effectively canceling:
>
> 3 + 3 \* -1 = -6
>
>
>
>
> -6 + 3 \* -1 = 3
>
>
>
You can do it easier by using a simple `if/else`:
```
for (i = 0; i < 2500; i++) {
if (i % 2 == 0) {
System.out.println(3 * i);
} else {
System.out.println(-3 * i);
}
}
``` | By making sum = sum + 3 and sum is -6 it will make -6 + 3 = -3 and then \*-1
U will have to make a condition to make +3 or -3 in those cases |
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | Don't change the `sum` itself. Change the multiplier `mult`. That should fix it.
```
public static void main(String args[]) {
int i;
int sum = 3;
// Add this variable
int mult = -1;
for (i = 0; i < 2500; i++) {
// Use mult while printing
System.out.println(sum*mult);
//... | By making sum = sum + 3 and sum is -6 it will make -6 + 3 = -3 and then \*-1
U will have to make a condition to make +3 or -3 in those cases |
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | Your calculation is effectively canceling:
>
> 3 + 3 \* -1 = -6
>
>
>
>
> -6 + 3 \* -1 = 3
>
>
>
You can do it easier by using a simple `if/else`:
```
for (i = 0; i < 2500; i++) {
if (i % 2 == 0) {
System.out.println(3 * i);
} else {
System.out.println(-3 * i);
}
}
``` | Use:
```
public static void main (String [] args) {
int i;
int sum = 3;
for (i = 0; i < 2500; i++) {
if(i%2==0) System.out.println(sum);
else System.out.println(-1*sum);
sum += 3;
}
}
``` |
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | Your calculation is effectively canceling:
>
> 3 + 3 \* -1 = -6
>
>
>
>
> -6 + 3 \* -1 = 3
>
>
>
You can do it easier by using a simple `if/else`:
```
for (i = 0; i < 2500; i++) {
if (i % 2 == 0) {
System.out.println(3 * i);
} else {
System.out.println(-3 * i);
}
}
``` | Try this
```
For(int i=1;I<2500;I++)
System.out.print(i%2==0?-3*i:3*i)
``` |
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | Your calculation is effectively canceling:
>
> 3 + 3 \* -1 = -6
>
>
>
>
> -6 + 3 \* -1 = 3
>
>
>
You can do it easier by using a simple `if/else`:
```
for (i = 0; i < 2500; i++) {
if (i % 2 == 0) {
System.out.println(3 * i);
} else {
System.out.println(-3 * i);
}
}
``` | If `sum` is positive before multiplying, you should subtract `3` and if it is negative beforehand, you should add `3`. You could implement this with the ternary operator or with `Integer.signum`. Note that you should not be incrementing `i` inside the `for` loop body, as it will be incremented at the end of each iterat... |
62,682,536 | I have two tables that look like this:
Table 1:
```
name | event | country
```
Table 2:
```
name | event
```
There are no overlapping rows between Table 1 and Table 2, because of the 'event' column. I wanted to union Table 1 with Table 2 since there are no overlaps, but I also want to fill in 'country' for Table... | 2020/07/01 | [
"https://Stackoverflow.com/questions/62682536",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10812410/"
] | Your calculation is effectively canceling:
>
> 3 + 3 \* -1 = -6
>
>
>
>
> -6 + 3 \* -1 = 3
>
>
>
You can do it easier by using a simple `if/else`:
```
for (i = 0; i < 2500; i++) {
if (i % 2 == 0) {
System.out.println(3 * i);
} else {
System.out.println(-3 * i);
}
}
``` | Don't change the `sum` itself. Change the multiplier `mult`. That should fix it.
```
public static void main(String args[]) {
int i;
int sum = 3;
// Add this variable
int mult = -1;
for (i = 0; i < 2500; i++) {
// Use mult while printing
System.out.println(sum*mult);
//... |
140,725 | Since etherscan indexes all addresses that have been involved in any transaction i was wondering if such a data set is available for download anywhere?
I cant find anything on etherscans website and google hasnt turned up much.
If there is no data set available i think my only other option would be to spin up a node ... | 2022/12/06 | [
"https://ethereum.stackexchange.com/questions/140725",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/31016/"
] | After re-reading <https://docs.soliditylang.org/en/latest/abi-spec.html#use-of-dynamic-types> with a fresher brain, I understood that the way the bytes are divided is as follows:
first 32 bytes: offset for the list of tuples
next 32 bytes: length of the list (37)
next 37\*32 bytes: each defining the start position f... | If you look at the source code of the contract, the return type of the function `getAllReserveTokens` is `TokenData[] memory` which is an array of a custom struct defined in the storage of the contract. The `bytes` you are receiving as a response from the contract is the RLP encoded bytes of the data. All data is store... |
9,064,292 | Want to make some Domain Specific Language(DSL) for practice, first idea it is to write interpreter or compiler of [Brainfuck](http://en.wikipedia.org/wiki/Brainfuck).
First idea was to override functions such as they will behave as Brainfuck commands: `">"`, `"<"`, `"+"`, `"-"`, `"."`, `","`, `"["`, `"]"`. Unfortunat... | 2012/01/30 | [
"https://Stackoverflow.com/questions/9064292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479625/"
] | You don't say this specifically in your question, but it seems that when you say DSL, you mean [Internal DSL](http://martinfowler.com/bliki/InternalDslStyle.html)?
Internal DSLs are great, but fundamentally you're always limited by the syntax of the language you're trying to use. Scala is a particularly good language ... | I suppose that you are aware of this [example](http://www.scala-lang.org/node/5372).
Also this [example](http://peter-braun.org/2012/07/brainfuck-interpreter-in-40-lines-of-scala/) suggested by [Mikaël Mayer](https://stackoverflow.com/users/1287856/mikael-mayer) in comments. |
9,064,292 | Want to make some Domain Specific Language(DSL) for practice, first idea it is to write interpreter or compiler of [Brainfuck](http://en.wikipedia.org/wiki/Brainfuck).
First idea was to override functions such as they will behave as Brainfuck commands: `">"`, `"<"`, `"+"`, `"-"`, `"."`, `","`, `"["`, `"]"`. Unfortunat... | 2012/01/30 | [
"https://Stackoverflow.com/questions/9064292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479625/"
] | I suppose that you are aware of this [example](http://www.scala-lang.org/node/5372).
Also this [example](http://peter-braun.org/2012/07/brainfuck-interpreter-in-40-lines-of-scala/) suggested by [Mikaël Mayer](https://stackoverflow.com/users/1287856/mikael-mayer) in comments. | I wrote a BrainFuck interpreter that makes use of Scala parser combinators. the source code is [here](https://github.com/antoinecomte/bfi/blob/master/src/net/antoinecomte/bfi/Interpreter.scala) if it may help. |
9,064,292 | Want to make some Domain Specific Language(DSL) for practice, first idea it is to write interpreter or compiler of [Brainfuck](http://en.wikipedia.org/wiki/Brainfuck).
First idea was to override functions such as they will behave as Brainfuck commands: `">"`, `"<"`, `"+"`, `"-"`, `"."`, `","`, `"["`, `"]"`. Unfortunat... | 2012/01/30 | [
"https://Stackoverflow.com/questions/9064292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479625/"
] | You don't say this specifically in your question, but it seems that when you say DSL, you mean [Internal DSL](http://martinfowler.com/bliki/InternalDslStyle.html)?
Internal DSLs are great, but fundamentally you're always limited by the syntax of the language you're trying to use. Scala is a particularly good language ... | I wrote a BrainFuck interpreter that makes use of Scala parser combinators. the source code is [here](https://github.com/antoinecomte/bfi/blob/master/src/net/antoinecomte/bfi/Interpreter.scala) if it may help. |
1,601,949 | Use the Cauchy-Schwarz Inequality to prove that $a^2+b^2+c^2 \ge ab+ac+bc $ for all positive $a,b,c$.
That's what I've tried:
Let a Cauchy-Schwarz Inequality be :
\begin{array}
(((\sqrt{a} )^2+(\sqrt{b})^2+(\sqrt{c})^2 )\left(\left(\cfrac{ab}{\sqrt{a}}\right)^2 +\left(\cfrac{ac} {\sqrt{b}}\right)^2+\left(\cfrac{bc}{... | 2016/01/06 | [
"https://math.stackexchange.com/questions/1601949",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/291945/"
] | If you insist on C-S, let
$$
u=(a,b,c),\quad v=(b,c,a).
$$
Then,
$$
\text{RHS}=u\cdot v\underbrace{\leq}\_{\text{C-S}}||u||\times||v||=\text{LHS}.
$$ | [](https://i.stack.imgur.com/UVS3U.png)[I have given a detailed proof using an easier method. Please click on this link to see the proof](https://i.stack.imgur.com/LBixg.png) |
1,601,949 | Use the Cauchy-Schwarz Inequality to prove that $a^2+b^2+c^2 \ge ab+ac+bc $ for all positive $a,b,c$.
That's what I've tried:
Let a Cauchy-Schwarz Inequality be :
\begin{array}
(((\sqrt{a} )^2+(\sqrt{b})^2+(\sqrt{c})^2 )\left(\left(\cfrac{ab}{\sqrt{a}}\right)^2 +\left(\cfrac{ac} {\sqrt{b}}\right)^2+\left(\cfrac{bc}{... | 2016/01/06 | [
"https://math.stackexchange.com/questions/1601949",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/291945/"
] | By C-S $\sum\limits\_{cyc}(1+1)(a^2+b^2)\geq\sum\limits\_{cyc}(a+b)^2$
and we are done! | [](https://i.stack.imgur.com/UVS3U.png)[I have given a detailed proof using an easier method. Please click on this link to see the proof](https://i.stack.imgur.com/LBixg.png) |
19,575,873 | Having html structure like this:
```
<div id="parent1" class="parent">
<div class="child">1<div/>
<div>
<div class="child">2</div>
</div>
<div id="parent2" class="parent">
<div class="child">3</div>
<div>
<div class="child">4</div>
</div>
<div id="parent3" class="pa... | 2013/10/24 | [
"https://Stackoverflow.com/questions/19575873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/960626/"
] | For `jQuery`, [`children()`](http://api.jquery.com/children/) will traverse a single level of the `DOM`.
```
$('.parent').children('.child').each(function() {
// do something with each of the direct decedents
});
```
In your case, this will mean that you would return the "first" `.child` and the "third" `.chil... | CSS is easy
```
.parent > .child
```
[**http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/**](http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/) |
19,575,873 | Having html structure like this:
```
<div id="parent1" class="parent">
<div class="child">1<div/>
<div>
<div class="child">2</div>
</div>
<div id="parent2" class="parent">
<div class="child">3</div>
<div>
<div class="child">4</div>
</div>
<div id="parent3" class="pa... | 2013/10/24 | [
"https://Stackoverflow.com/questions/19575873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/960626/"
] | **Try this** <http://jsfiddle.net/9sSqE/>
or could use `closest` <http://api.jquery.com/closest/> **Demo** <http://jsfiddle.net/T26Sa/>
Hope this fits your needs `:)`
**code**
```
$('.parent').each(function () {
$(this).find('.child').html('HULK ---- Found');
alert($(this).html());
});
``` | CSS is easy
```
.parent > .child
```
[**http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/**](http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/) |
19,575,873 | Having html structure like this:
```
<div id="parent1" class="parent">
<div class="child">1<div/>
<div>
<div class="child">2</div>
</div>
<div id="parent2" class="parent">
<div class="child">3</div>
<div>
<div class="child">4</div>
</div>
<div id="parent3" class="pa... | 2013/10/24 | [
"https://Stackoverflow.com/questions/19575873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/960626/"
] | Your question is a bit confusing, and I think the selector will be based on your actual html, but I think this should work for your specific example:
<http://jsfiddle.net/4ZQ4C/>
```
$('.parent .child:not(".parent .parent .child")').addClass('selected');
``` | CSS is easy
```
.parent > .child
```
[**http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/**](http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/) |
19,575,873 | Having html structure like this:
```
<div id="parent1" class="parent">
<div class="child">1<div/>
<div>
<div class="child">2</div>
</div>
<div id="parent2" class="parent">
<div class="child">3</div>
<div>
<div class="child">4</div>
</div>
<div id="parent3" class="pa... | 2013/10/24 | [
"https://Stackoverflow.com/questions/19575873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/960626/"
] | Your question is a bit confusing, and I think the selector will be based on your actual html, but I think this should work for your specific example:
<http://jsfiddle.net/4ZQ4C/>
```
$('.parent .child:not(".parent .parent .child")').addClass('selected');
``` | For `jQuery`, [`children()`](http://api.jquery.com/children/) will traverse a single level of the `DOM`.
```
$('.parent').children('.child').each(function() {
// do something with each of the direct decedents
});
```
In your case, this will mean that you would return the "first" `.child` and the "third" `.chil... |
19,575,873 | Having html structure like this:
```
<div id="parent1" class="parent">
<div class="child">1<div/>
<div>
<div class="child">2</div>
</div>
<div id="parent2" class="parent">
<div class="child">3</div>
<div>
<div class="child">4</div>
</div>
<div id="parent3" class="pa... | 2013/10/24 | [
"https://Stackoverflow.com/questions/19575873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/960626/"
] | Your question is a bit confusing, and I think the selector will be based on your actual html, but I think this should work for your specific example:
<http://jsfiddle.net/4ZQ4C/>
```
$('.parent .child:not(".parent .parent .child")').addClass('selected');
``` | **Try this** <http://jsfiddle.net/9sSqE/>
or could use `closest` <http://api.jquery.com/closest/> **Demo** <http://jsfiddle.net/T26Sa/>
Hope this fits your needs `:)`
**code**
```
$('.parent').each(function () {
$(this).find('.child').html('HULK ---- Found');
alert($(this).html());
});
``` |
377,919 | A friend of mine has been arguing over the truth statement of: "1 dollar more vs. more than 1 dollar".
I am the one implying they're the same statement and convey the same semantic and logic; n < 1.
He fully disagrees they're the same thing in both the semantic and logic. Maybe it's cognitive dissonance.
Edit 1:
S... | 2017/03/11 | [
"https://english.stackexchange.com/questions/377919",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/224712/"
] | They're (usually) different. For example, if you have 10 dollar, and I give you *1 dollar more*, you now have 11 dollars. If I gave you *more than 1 dollar* instead, you would have had at least 12 dollars. | They are not the same.
*More* is a comparative; it can always be followed by *than* and the noun or noun-phrase being compared.
*More than one dollar* is an obvious comparison: whatever amount you are considering is larger than a dollar: *x* > $1.
>
> * The money I have in my wallet is more than one dollar.
> * The... |
52,965,614 | I have a .txt file as a source, part of the file view is below (All price columns are coming as `DT_R4`)
```
Quantity Partner Share Customer Price
1 0 0
1 0 0
3 0.7 0.99
2 1.4 1.99
1 -1.4 -1.99
```
Th... | 2018/10/24 | [
"https://Stackoverflow.com/questions/52965614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2577225/"
] | You can try to use `Conditional Operator` in expression of `Derived Column` something like below.
```
(DT_NUMERIC,18,2)((ABS([Customer Price]) - [Partner Share]) / ABS([Customer Price] == 0 ? 1 : [Customer Price]) * 100)
```
Hope it works for you. | Try to use `TRY_CAST` operator and `ISNULL` in case of 0:
```
(DT_NUMERIC,18,2)((ABS( ISNULL(TRY_CAST([Customer Price] AS int), 0)) - [Partner Share])
/ ABS( ISNULL(TRY_CAST([Customer Price] AS int), 1)) * 100)
```
It looks like some strings can't be converted to integers. Add some error handling to your dataf... |
53,335,697 | I have a variable parameter ( retrieved from a getText field in Seleium Automation) that i want to assign the value into a specefic place in a shell script :
In java this is what i do :
```
String ref = workcreation.getfield_ref().getText();
try { ProcessBuilder pb = new ProcessBuilder("/home/script.sh");
... | 2018/11/16 | [
"https://Stackoverflow.com/questions/53335697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10641682/"
] | You can pass arguments to your command/script by ProcessBuilder.
In your shell script, you can read the argument. A simple example is:
```
ProcessBuilder pb = new ProcessBuilder("/home/script.sh", "hello");
```
in your script:
```
echo "variable set in java: $1"
``` | The `ProcessBuilder` takes an arbitrary number of `String`s as arguments. The first one has to be the executable itself, in your case it is the script `"/home/script.sh"`. You are currently just passing the executable as a single argument. Just add the parameters for your script to the constructor call of `ProcessBuild... |
27,298,207 | I'm looking into writing my own grid system, and I have a simple question.
If I were to have two half columns
eg.
```
.container {
width: 100%;
}
.half-width {
width: 50%;
float: left;
}
<div class="half-width">a</div>
<div class="half-width">b</div>
```
How best to tweak that to actually... | 2014/12/04 | [
"https://Stackoverflow.com/questions/27298207",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2548965/"
] | Here's what I ended up putting in my `forms.py` file to make this work with Twitter bootstrap:
```
class InstrumentForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(InstrumentForm, self).__init__(*args, **kwargs)
self.helper = FormHelper()
self.helper.add_input(Submit('subm... | my form code:
```
class PersonForm(forms.ModelForm):
class Meta:
model = Person
fields = ('name', 'email', 'job_title', 'bio')
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.helper = FormHelper()
self.helper.form_method = 'post'
self.helper.add_input(Submit('submit... |
19,184,759 | I have two tables Table1 and Table2 in my Access database. Table1 has 50 columns and Table2 has 30 columns. I would like to merge Table2 with Table1 without copying any entries from Table2 that have the same values as the values in column1 to column30 for an entry in Table1.
Please note that the columns order and name... | 2013/10/04 | [
"https://Stackoverflow.com/questions/19184759",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1181864/"
] | I feel like the SQL MERGE statement is designed for this situation, but I can see that you may think it to be a little impractical to define each of the 30 columns which the rows are being matched on. But yeah, I would use something like:
```
MERGE Table1 as t1
USING (SELECT column1, column2, column3, column4 FROM Tab... | A strictly VBA solution could look something like the following:
```
Dim rs As DAO.Recordset, rs1 As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Table1Name", dbOpenDynaset)
Set rs1 = CurrentDb.OpenRecordset("Table2Name", dbOpenDynaset)
rs1.MoveFirst
Do While rs1.EOF <> True
'In this example of FindFirst I am se... |
1,713,815 | Prove that $\displaystyle\lim\_{x \to 3} \sqrt{x+1} = 2$
Attempt:
$0 < |x - 3| < \delta \Rightarrow |\sqrt{x+1} - 2| < \epsilon$
Well $|\sqrt{x+1} - 2| = |(\sqrt{x+1} - 2) \cdot \displaystyle\frac{\sqrt{x+1} + 2}{\sqrt{x+1}+2}| = |\frac{x-3}{\sqrt{x+1} + 2}| = |x-3| \cdot \frac{1}{|\sqrt{x+1}+2|}$
Here, the second... | 2016/03/26 | [
"https://math.stackexchange.com/questions/1713815",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/293243/"
] | **Infinite Unions** is the key to understand this.
Intuitively, the situation is described in the following figure:
[](https://i.stack.imgur.com/aWgr6.jpg) | >
> but geometrically does it make sense?
>
>
>
The only geometric thing to consider is that you can inscribe or circumscribe a circle with a square, and that all makes complete sense.
From there it is completely clear how one would express an open set (defined by circles) as a union of open squares: capture each... |
1,713,815 | Prove that $\displaystyle\lim\_{x \to 3} \sqrt{x+1} = 2$
Attempt:
$0 < |x - 3| < \delta \Rightarrow |\sqrt{x+1} - 2| < \epsilon$
Well $|\sqrt{x+1} - 2| = |(\sqrt{x+1} - 2) \cdot \displaystyle\frac{\sqrt{x+1} + 2}{\sqrt{x+1}+2}| = |\frac{x-3}{\sqrt{x+1} + 2}| = |x-3| \cdot \frac{1}{|\sqrt{x+1}+2|}$
Here, the second... | 2016/03/26 | [
"https://math.stackexchange.com/questions/1713815",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/293243/"
] | **Infinite Unions** is the key to understand this.
Intuitively, the situation is described in the following figure:
[](https://i.stack.imgur.com/aWgr6.jpg) | Remember that topoloy can be though of as the study of "stretching without tearing" and then it is common to identify two spaces when one can be deformed into the other (ie homeomorphism). Anyhow, suppose you've got a circle made of super strecthy material, then you can stretch it, without tearing, into a rectangle; an... |
1,713,815 | Prove that $\displaystyle\lim\_{x \to 3} \sqrt{x+1} = 2$
Attempt:
$0 < |x - 3| < \delta \Rightarrow |\sqrt{x+1} - 2| < \epsilon$
Well $|\sqrt{x+1} - 2| = |(\sqrt{x+1} - 2) \cdot \displaystyle\frac{\sqrt{x+1} + 2}{\sqrt{x+1}+2}| = |\frac{x-3}{\sqrt{x+1} + 2}| = |x-3| \cdot \frac{1}{|\sqrt{x+1}+2|}$
Here, the second... | 2016/03/26 | [
"https://math.stackexchange.com/questions/1713815",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/293243/"
] | **Infinite Unions** is the key to understand this.
Intuitively, the situation is described in the following figure:
[](https://i.stack.imgur.com/aWgr6.jpg) | Another thing to consider is what if I took a rectangle and placed the corner on the boundary of the circle. I could do this an infinite amount of times and eventually work my way all around the circle. The reason I can do this is because the circles and rectangles are both open. |
1,713,815 | Prove that $\displaystyle\lim\_{x \to 3} \sqrt{x+1} = 2$
Attempt:
$0 < |x - 3| < \delta \Rightarrow |\sqrt{x+1} - 2| < \epsilon$
Well $|\sqrt{x+1} - 2| = |(\sqrt{x+1} - 2) \cdot \displaystyle\frac{\sqrt{x+1} + 2}{\sqrt{x+1}+2}| = |\frac{x-3}{\sqrt{x+1} + 2}| = |x-3| \cdot \frac{1}{|\sqrt{x+1}+2|}$
Here, the second... | 2016/03/26 | [
"https://math.stackexchange.com/questions/1713815",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/293243/"
] | >
> but geometrically does it make sense?
>
>
>
The only geometric thing to consider is that you can inscribe or circumscribe a circle with a square, and that all makes complete sense.
From there it is completely clear how one would express an open set (defined by circles) as a union of open squares: capture each... | Remember that topoloy can be though of as the study of "stretching without tearing" and then it is common to identify two spaces when one can be deformed into the other (ie homeomorphism). Anyhow, suppose you've got a circle made of super strecthy material, then you can stretch it, without tearing, into a rectangle; an... |
1,713,815 | Prove that $\displaystyle\lim\_{x \to 3} \sqrt{x+1} = 2$
Attempt:
$0 < |x - 3| < \delta \Rightarrow |\sqrt{x+1} - 2| < \epsilon$
Well $|\sqrt{x+1} - 2| = |(\sqrt{x+1} - 2) \cdot \displaystyle\frac{\sqrt{x+1} + 2}{\sqrt{x+1}+2}| = |\frac{x-3}{\sqrt{x+1} + 2}| = |x-3| \cdot \frac{1}{|\sqrt{x+1}+2|}$
Here, the second... | 2016/03/26 | [
"https://math.stackexchange.com/questions/1713815",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/293243/"
] | >
> but geometrically does it make sense?
>
>
>
The only geometric thing to consider is that you can inscribe or circumscribe a circle with a square, and that all makes complete sense.
From there it is completely clear how one would express an open set (defined by circles) as a union of open squares: capture each... | Another thing to consider is what if I took a rectangle and placed the corner on the boundary of the circle. I could do this an infinite amount of times and eventually work my way all around the circle. The reason I can do this is because the circles and rectangles are both open. |
59,958,654 | I have this class and many properties in it
```
public class Course
{
public int CourseId { get; set; }
public string CourseName { get; set; }
public Universities? UniversityName { get; set;}
public string Summary { get; set; }
*
*
}
```
View Model looks like this
``... | 2020/01/28 | [
"https://Stackoverflow.com/questions/59958654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12802486/"
] | Have you set the responsive meta tag?
```
<meta name="viewport" content="width=device-width, initial-scale=1">
```
in the html header.
With it the browser should render the width of the page at the width of its own screen. So, when it's set, if that screen is 320px wide, the browser window will be 320px wide, rathe... | You have to add a viewport meta in the `head` of your html file:
```html
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
...
``` |
56,398,315 | I found online soluton like this:
```
import 'package:queries/collections.dart';
void main() {
List<String> list = ["a", "a", "b", "c", "b", "d"];
var result = new Collection(list).distinct();
print(result.toList());
}
```
But, I don't know how to convert `var result` back to `List<Widget>`. | 2019/05/31 | [
"https://Stackoverflow.com/questions/56398315",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11398385/"
] | There is a way that is a lot easier and does not require any additional imports.
You can convert your `List` to a `Set` which inherently only contains **distinct** elements and then convert that `Set` back to a `List`.
If you are using *Dart 2.3* or higher (`environment: sdk: ">=2.3.0 <3.0.0"`), you can use the fo... | Thank you for your answer,
Here is the full code, i try to modify your method but not working.
(Works only in print)
```
Future<List<List<Widget>>> getList(List<int> list, String column) async {
List<Widget> list1 = List();
List<Widget> list2 = List();
List<Widget> list3 = List();
//test
Lis... |
482,160 | I have a buck converter LM2956, same as
[here](https://rads.stackoverflow.com/amzn/click/com/B076H3XHXP)
stepping down voltage from 12 to 8 volts. A motor turns on from the regulated stepped down voltage, and when it does I get a voltage sag that drops the voltage down 1.5 volts (so from 8 to 6.5). it lasts for about... | 2020/02/20 | [
"https://electronics.stackexchange.com/questions/482160",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/214501/"
] | Ideally, you are not supposed to have analog(motor) and digital(microcontroller) components on the same power rail as such noise affects the operation of digital circuits. The voltage drop is seen because, momentarily, the motor draws more current than the regulator can supply, and hence this results in a voltage drop.... | Typically - to avoid that current spike - you would soft start the motor by increasing the voltage supplied to it over a longer period of time (instead of abruptly dumping 8 V to it). In practice this is usually accomplished with pulse-width modulation (PWM).
You could also bypass the regulated 8 V supply and drive th... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | Based on comments from more experienced users, it looks like the answer relates to how the person is using the shell. "What argument can I pass to `cd` that will cause it to birth kittens?" is not on topic for SO, i.e. questions about a single command and it's uses or arguments that don't otherwise relate to programmin... | Let's start with definitions
Stack Overflow
>
> Stack Overflow is a question and answer site for professional and enthusiast programmers.
>
>
>
Super User
>
> Super User is a question and answer site for computer enthusiasts and power users.
>
>
>
For my point of view programmer can be a power user. Otherw... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | I believe I'm in the minority when it comes to this subject, but I'll add it as an answer and let the voters decide.
I think shell questions should be off topic on StackOverflow **unless** your question is *specifically about scripting the shell*.
Some people seem to have a problem with this distinction. They seem t... | Let's start with definitions
Stack Overflow
>
> Stack Overflow is a question and answer site for professional and enthusiast programmers.
>
>
>
Super User
>
> Super User is a question and answer site for computer enthusiasts and power users.
>
>
>
For my point of view programmer can be a power user. Otherw... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | There is some overlap between [Stack Overflow](https://stackoverflow.com/tour) (about programming) and sites about computer usage ([Super User](https://superuser.com/tour), [Unix & Linux](https://unix.stackexchange.com/tour), [Ask Ubuntu](https://askubuntu.com/tour), [Ask Different](https://apple.stackexchange.com/tour... | Let's start with definitions
Stack Overflow
>
> Stack Overflow is a question and answer site for professional and enthusiast programmers.
>
>
>
Super User
>
> Super User is a question and answer site for computer enthusiasts and power users.
>
>
>
For my point of view programmer can be a power user. Otherw... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | In a nutshell we have:

Clear cut scripting questions
=============================
These questions are **on topic** by all criteria listed on the [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) help page.
**Examples**:
* How do I clock execution... | Let's start with definitions
Stack Overflow
>
> Stack Overflow is a question and answer site for professional and enthusiast programmers.
>
>
>
Super User
>
> Super User is a question and answer site for computer enthusiasts and power users.
>
>
>
For my point of view programmer can be a power user. Otherw... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | I believe I'm in the minority when it comes to this subject, but I'll add it as an answer and let the voters decide.
I think shell questions should be off topic on StackOverflow **unless** your question is *specifically about scripting the shell*.
Some people seem to have a problem with this distinction. They seem t... | Based on comments from more experienced users, it looks like the answer relates to how the person is using the shell. "What argument can I pass to `cd` that will cause it to birth kittens?" is not on topic for SO, i.e. questions about a single command and it's uses or arguments that don't otherwise relate to programmin... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | There is some overlap between [Stack Overflow](https://stackoverflow.com/tour) (about programming) and sites about computer usage ([Super User](https://superuser.com/tour), [Unix & Linux](https://unix.stackexchange.com/tour), [Ask Ubuntu](https://askubuntu.com/tour), [Ask Different](https://apple.stackexchange.com/tour... | Based on comments from more experienced users, it looks like the answer relates to how the person is using the shell. "What argument can I pass to `cd` that will cause it to birth kittens?" is not on topic for SO, i.e. questions about a single command and it's uses or arguments that don't otherwise relate to programmin... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | In a nutshell we have:

Clear cut scripting questions
=============================
These questions are **on topic** by all criteria listed on the [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) help page.
**Examples**:
* How do I clock execution... | Based on comments from more experienced users, it looks like the answer relates to how the person is using the shell. "What argument can I pass to `cd` that will cause it to birth kittens?" is not on topic for SO, i.e. questions about a single command and it's uses or arguments that don't otherwise relate to programmin... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | I believe I'm in the minority when it comes to this subject, but I'll add it as an answer and let the voters decide.
I think shell questions should be off topic on StackOverflow **unless** your question is *specifically about scripting the shell*.
Some people seem to have a problem with this distinction. They seem t... | There is some overlap between [Stack Overflow](https://stackoverflow.com/tour) (about programming) and sites about computer usage ([Super User](https://superuser.com/tour), [Unix & Linux](https://unix.stackexchange.com/tour), [Ask Ubuntu](https://askubuntu.com/tour), [Ask Different](https://apple.stackexchange.com/tour... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | I believe I'm in the minority when it comes to this subject, but I'll add it as an answer and let the voters decide.
I think shell questions should be off topic on StackOverflow **unless** your question is *specifically about scripting the shell*.
Some people seem to have a problem with this distinction. They seem t... | In a nutshell we have:

Clear cut scripting questions
=============================
These questions are **on topic** by all criteria listed on the [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) help page.
**Examples**:
* How do I clock execution... |
275,757 | Stack Overflow has a [bash] tag that people use and seem to like. But... don't most of those questions belong on unix.stackexchange.com? Like [this question](https://stackoverflow.com/questions/26665380/recursively-check-which-backed-up-folders-files-are-no-longer-in-source-director/26666873#26666873) which is clearly ... | 2014/10/31 | [
"https://meta.stackoverflow.com/questions/275757",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/3515888/"
] | There is some overlap between [Stack Overflow](https://stackoverflow.com/tour) (about programming) and sites about computer usage ([Super User](https://superuser.com/tour), [Unix & Linux](https://unix.stackexchange.com/tour), [Ask Ubuntu](https://askubuntu.com/tour), [Ask Different](https://apple.stackexchange.com/tour... | In a nutshell we have:

Clear cut scripting questions
=============================
These questions are **on topic** by all criteria listed on the [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) help page.
**Examples**:
* How do I clock execution... |
68,944 | I am running on a Shimano Tiagra 10 speed (CS-HG500-10) (12T-28T) and (50-34T front). I'd like to change the smallest cog (12T) to something smaller, i.e., 11 or even 10, to improve my sprints. Is that a possibility?
[](https://i.stack.imgur.com/3jTAH... | 2020/06/17 | [
"https://bicycles.stackexchange.com/questions/68944",
"https://bicycles.stackexchange.com",
"https://bicycles.stackexchange.com/users/40108/"
] | There is currently only the TRP Hylex. | A little update, it looks like there is a new possibility since the publication of the question, from SRAM in the APEX 1 range - gravel. <https://www.sram.com/en/sram/models/db-apx-a1> |
68,944 | I am running on a Shimano Tiagra 10 speed (CS-HG500-10) (12T-28T) and (50-34T front). I'd like to change the smallest cog (12T) to something smaller, i.e., 11 or even 10, to improve my sprints. Is that a possibility?
[](https://i.stack.imgur.com/3jTAH... | 2020/06/17 | [
"https://bicycles.stackexchange.com/questions/68944",
"https://bicycles.stackexchange.com",
"https://bicycles.stackexchange.com/users/40108/"
] | Currently, TRP Hylex are one of the only drop bar brake lever (without gears) that has a hyraulic master cylinder. Magura HS66 is another, but these are pretty rare.
Other options include:
**Cable actuated hydraulic calipers.** These are connected by cables just like normal caliper but the hydralic master cyclinder ... | A little update, it looks like there is a new possibility since the publication of the question, from SRAM in the APEX 1 range - gravel. <https://www.sram.com/en/sram/models/db-apx-a1> |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | Thanks everybody for input. Iteration of the div p array was necessary (sorry if that wasn't clear), so doing `$('div#example p').hide();` was not a proper solution. I ended up doing the following:
```
var arr = $('div#example p');
for(i=0;i<arr.length;i++)
{
$(arr[i]).hide();
}
```
Hope this is useful for peopl... | try this...
```
$('div#examples p').hide();
``` |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | Thanks everybody for input. Iteration of the div p array was necessary (sorry if that wasn't clear), so doing `$('div#example p').hide();` was not a proper solution. I ended up doing the following:
```
var arr = $('div#example p');
for(i=0;i<arr.length;i++)
{
$(arr[i]).hide();
}
```
Hope this is useful for peopl... | This the the most performant way to query the dom for present issue:
`$('#examples).find('p').hide();`
It's a few more keystrokes, but the selection happens so much faster than the examples given here by others. The reason being is that it traverses all divs first, then finds those that may have the given id, then tr... |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | try this...
```
$('div#examples p').hide();
``` | From the looks of your question the answer would be, as stated by others:
```
$('div#examples p').hide();
```
But for the case that you have to iterate through each object that is returned from a jQuery query you should use this syntax:
```
$('div#examples p').each(function(){
$(this).hide();
});
```
But reme... |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | example:
```
$('#examples p').hide();
```
div is not necessary | You can still use the the selector query you use. i.e:
```
var paragraphs = $('div#examples p');
paragraphs.hide();
```
or
```
$('div#examples p').hide();
``` |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | example:
```
$('#examples p').hide();
```
div is not necessary | try this...
```
$('div#examples p').hide();
``` |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | This the the most performant way to query the dom for present issue:
`$('#examples).find('p').hide();`
It's a few more keystrokes, but the selection happens so much faster than the examples given here by others. The reason being is that it traverses all divs first, then finds those that may have the given id, then tr... | try this...
```
$('div#examples p').hide();
``` |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | Thanks everybody for input. Iteration of the div p array was necessary (sorry if that wasn't clear), so doing `$('div#example p').hide();` was not a proper solution. I ended up doing the following:
```
var arr = $('div#example p');
for(i=0;i<arr.length;i++)
{
$(arr[i]).hide();
}
```
Hope this is useful for peopl... | From the looks of your question the answer would be, as stated by others:
```
$('div#examples p').hide();
```
But for the case that you have to iterate through each object that is returned from a jQuery query you should use this syntax:
```
$('div#examples p').each(function(){
$(this).hide();
});
```
But reme... |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | You can still use the the selector query you use. i.e:
```
var paragraphs = $('div#examples p');
paragraphs.hide();
```
or
```
$('div#examples p').hide();
``` | try this...
```
$('div#examples p').hide();
``` |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | You can still use the the selector query you use. i.e:
```
var paragraphs = $('div#examples p');
paragraphs.hide();
```
or
```
$('div#examples p').hide();
``` | From the looks of your question the answer would be, as stated by others:
```
$('div#examples p').hide();
```
But for the case that you have to iterate through each object that is returned from a jQuery query you should use this syntax:
```
$('div#examples p').each(function(){
$(this).hide();
});
```
But reme... |
5,241,883 | In the below python code ,can the object know that the template tag is referring a variable and get that in a python variable
`newemp` is the object that i am passing from the views and the template is trying to access a variable as `{{newemp.get_names.emp_add}}` ,now in the python code can the object print this varia... | 2011/03/09 | [
"https://Stackoverflow.com/questions/5241883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277603/"
] | Thanks everybody for input. Iteration of the div p array was necessary (sorry if that wasn't clear), so doing `$('div#example p').hide();` was not a proper solution. I ended up doing the following:
```
var arr = $('div#example p');
for(i=0;i<arr.length;i++)
{
$(arr[i]).hide();
}
```
Hope this is useful for peopl... | You can still use the the selector query you use. i.e:
```
var paragraphs = $('div#examples p');
paragraphs.hide();
```
or
```
$('div#examples p').hide();
``` |
33,786,913 | A stupid question possibly that shouldn't be asked here, but I can't find anything to help me, so anyway, I've created a quick collision system and I made it so you can collide with multiple shapes using 1 bunch of if statements by using arrays. Now rather than defining each wall and creating them, I'm trying to use a ... | 2015/11/18 | [
"https://Stackoverflow.com/questions/33786913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4062174/"
] | This is bacause if you write just `Sheets` it is the same as `ActiveWorkbook.Sheets`. So you would need to add the workbook qualifier something like `Workbooks("MyBook").Sheets("SheetName")`.
Or you could use `ThisWorkbook.Sheets("SheetName")`. Then the sheets collection of the workbook where the VBA code is running ... | Change the code to the following:
```
Private Sub Worksheet_Calculate()
If ThisWorkbook.Sheets("Dashboard").Range("Z11").Value > 0 Then
ThisWorkbook.Sheets("Dashboard").Shapes("tileOverdueTasks").Fill.ForeColor.RGB = RGB(185, 0, 0)
Else
ThisWorkbook.Sheets("Dashboard").Shapes("tileOverdueTasks"... |
4,917 | I started [a program to run 30' after 8 weeks](http://www.runnersworld.com/article/0,7120,s6-238-520--9397-0,00.html). I am in week 2. I am overweight in 20 kilograms
The problem that I have is a pain in my lower back.
Is not shortly after the training, I feel the pain when I sit for too long (I am a programmer). The... | 2011/12/21 | [
"https://fitness.stackexchange.com/questions/4917",
"https://fitness.stackexchange.com",
"https://fitness.stackexchange.com/users/2427/"
] | If you have a job that keeps you sitting for long periods of time, you could have tight hamstrings. They could be especially tight after starting a running program without appropriate stretching. Tight hamstrings tend to contribute to lower back pain.
I'd suggest taking a week off from your running schedule and doing ... | Apart from the advice from @friz also consider changing your "sitting" habits.
E.g. get a table that allows you to stand up for a couple of hours each day, and use a Energetics Stability Ball (or similar) for the rest of the day. For the first couple of weeks, you will likely be very tired in your back, but it will ve... |
4,917 | I started [a program to run 30' after 8 weeks](http://www.runnersworld.com/article/0,7120,s6-238-520--9397-0,00.html). I am in week 2. I am overweight in 20 kilograms
The problem that I have is a pain in my lower back.
Is not shortly after the training, I feel the pain when I sit for too long (I am a programmer). The... | 2011/12/21 | [
"https://fitness.stackexchange.com/questions/4917",
"https://fitness.stackexchange.com",
"https://fitness.stackexchange.com/users/2427/"
] | If you have a job that keeps you sitting for long periods of time, you could have tight hamstrings. They could be especially tight after starting a running program without appropriate stretching. Tight hamstrings tend to contribute to lower back pain.
I'd suggest taking a week off from your running schedule and doing ... | If your back pain didn't start until you began the running program then it is likely that your back and spine cannot handle the compressive forces of running with your extra weight. You may need to begin with something less jarring like walking, biking, running in water, using an elliptical trainer or walking with nord... |
4,917 | I started [a program to run 30' after 8 weeks](http://www.runnersworld.com/article/0,7120,s6-238-520--9397-0,00.html). I am in week 2. I am overweight in 20 kilograms
The problem that I have is a pain in my lower back.
Is not shortly after the training, I feel the pain when I sit for too long (I am a programmer). The... | 2011/12/21 | [
"https://fitness.stackexchange.com/questions/4917",
"https://fitness.stackexchange.com",
"https://fitness.stackexchange.com/users/2427/"
] | Wearing raised heel shoes and running with a form that lands on the heel first can aggravate your back. I am a software developer also (for 30+ years) and, in 2009, was 85 pounds overweight and walked with a cane due to a hyper mobile lumbar disc. An [article by Dr. Rossi](http://nwfootankle.com/files/rossiWhyShoesMake... | Apart from the advice from @friz also consider changing your "sitting" habits.
E.g. get a table that allows you to stand up for a couple of hours each day, and use a Energetics Stability Ball (or similar) for the rest of the day. For the first couple of weeks, you will likely be very tired in your back, but it will ve... |
4,917 | I started [a program to run 30' after 8 weeks](http://www.runnersworld.com/article/0,7120,s6-238-520--9397-0,00.html). I am in week 2. I am overweight in 20 kilograms
The problem that I have is a pain in my lower back.
Is not shortly after the training, I feel the pain when I sit for too long (I am a programmer). The... | 2011/12/21 | [
"https://fitness.stackexchange.com/questions/4917",
"https://fitness.stackexchange.com",
"https://fitness.stackexchange.com/users/2427/"
] | Wearing raised heel shoes and running with a form that lands on the heel first can aggravate your back. I am a software developer also (for 30+ years) and, in 2009, was 85 pounds overweight and walked with a cane due to a hyper mobile lumbar disc. An [article by Dr. Rossi](http://nwfootankle.com/files/rossiWhyShoesMake... | If your back pain didn't start until you began the running program then it is likely that your back and spine cannot handle the compressive forces of running with your extra weight. You may need to begin with something less jarring like walking, biking, running in water, using an elliptical trainer or walking with nord... |
11,987,386 | i want to play a sound for 5 seconds but the code which i am using is playing the sound infinitely.
My code is
```
final MediaPlayer player = new MediaPlayer();
AssetFileDescriptor afd = this.getResources().openRawResourceFd(R.raw.hangout_ringtone);
player.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), ... | 2012/08/16 | [
"https://Stackoverflow.com/questions/11987386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1462686/"
] | Try to remove this line from your code
```
player.setLooping(true);
``` | Use a Runnable with a delay to stop your audio.
```
postDelayed(new Runnable() {
public void run() {
//Code to stop your sound
}
}, 5000);
``` |
11,987,386 | i want to play a sound for 5 seconds but the code which i am using is playing the sound infinitely.
My code is
```
final MediaPlayer player = new MediaPlayer();
AssetFileDescriptor afd = this.getResources().openRawResourceFd(R.raw.hangout_ringtone);
player.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), ... | 2012/08/16 | [
"https://Stackoverflow.com/questions/11987386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1462686/"
] | Try to remove this line from your code
```
player.setLooping(true);
``` | Create a new handler to post a delay for when to stop.
```
mMediaPlayer.start();
// wait 5 sec... then stop the player.
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mMediaPlayer.stop();
}... |
11,987,386 | i want to play a sound for 5 seconds but the code which i am using is playing the sound infinitely.
My code is
```
final MediaPlayer player = new MediaPlayer();
AssetFileDescriptor afd = this.getResources().openRawResourceFd(R.raw.hangout_ringtone);
player.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), ... | 2012/08/16 | [
"https://Stackoverflow.com/questions/11987386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1462686/"
] | Use a Runnable with a delay to stop your audio.
```
postDelayed(new Runnable() {
public void run() {
//Code to stop your sound
}
}, 5000);
``` | Create a new handler to post a delay for when to stop.
```
mMediaPlayer.start();
// wait 5 sec... then stop the player.
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mMediaPlayer.stop();
}... |
4,587,988 | I want to use PDO prepared statements but i find it really time consuming to type. it would be super useful if there is a function to just pass the following associative array:
```
array(
"title"=>$title
"userid"=>$userid
"post"=>$body
)
```
Keeping in mind that the keys in the array always match the rows in the SQL... | 2011/01/03 | [
"https://Stackoverflow.com/questions/4587988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/241654/"
] | ```
function pdo_insert($table, $arr=array())
{
if (!is_array($arr) || !count($arr)) return false;
// your pdo connection
$dbh = '...';
$bind = ':'.implode(',:', array_keys($arr));
$sql = 'insert into '.$table.'('.implode(',', array_keys($arr)).') '.
'values ('.$bind.')';
$stmt = $dbh->prepare(... | Slighly improved PDO Insert function that also takes security into consideration by preventing SQL Injection attacks:
```
// Insert an array with key-value pairs into a specified database table (MySQL).
function pdo_insert($dbh,$table,$keyvals) {
$sql = sprintf("INSERT INTO %s ( `%s` ) %sVALUES ( :%s );",
... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | Powerpoint. There are *hundreds* of PowerPoint poster templates available online, many of them are good, and it is one of the standard formats people accept — and can be exported to PDF for easy post-conference distribution. | I've just used Microsoft Publisher to turn an 8-slide PowerPoint presentation into an A2 poster for a medical conference.
I copied each slide into Publisher and then blew them up to 140% and distributed and aligned them. I added a blue frame, then saved it to PDF for the print shop.
This is probably the best and ea... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | For your use case, I'd go with M PowerPoint. I have spent anywhere from 4 to 16 hours on posters, depending on the level of detail.
My progression through poster design software went as follows:
M PowerPoint - easy to use, basic layout a breeze, limited in typographical tools
M Publisher - more layout tools, still e... | I've used [Microsoft Visio](https://en.wikipedia.org/wiki/Microsoft_Visio) to create posters before.
Its original intent is the creation of flowcharts, technical drawings, simple floor plans etc. It's much better at this kind of diagramming than Powerpoint - but offers a bit less "design hand-holding". On the other ha... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | I haven't written a poster yet, but if you're a Latex savvy, there are plenty of packages that allow you to design posters.
See related questions:
* ["How to create posters using LaTeX"](https://tex.stackexchange.com/q/341/2061)
* ["What can you tell me about poster design and typography in LaTeX?"](https://tex.stac... | As always, if you are on a mac, you can use the combo omnigraffle + latexit. |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | For completeness, Apple's [Pages](http://www.apple.com/iwork/pages/) has quite a few nice poster layouts. | For your use case, I'd go with M PowerPoint. I have spent anywhere from 4 to 16 hours on posters, depending on the level of detail.
My progression through poster design software went as follows:
M PowerPoint - easy to use, basic layout a breeze, limited in typographical tools
M Publisher - more layout tools, still e... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | For completeness, Apple's [Pages](http://www.apple.com/iwork/pages/) has quite a few nice poster layouts. | There are various templates to create poster using markdown\*, cf. the list at <https://gist.github.com/Pakillo/4854e5d760351206084f6be8abe476b2>:
* <https://github.com/odeleongt/flexdashboard-poster>
* <https://github.com/odeleongt/postr>
* <https://github.com/bbucior/drposter>
* <https://github.com/mathematicalcoff... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | I would recommend [Inkscape](http://inkscape.org/):
* vector graphics
* powerful
* free
* intuitive
* cross platform | I recommend the free and open-source desktop publishing program **[Scribus](https://www.scribus.net/)**, available for a wide variety of operating systems including Windows, Mac, and Linux. Unlike many of the programs suggested here, Scribus is specifically focused on tasks relevant to poster production: layout, typese... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | Powerpoint. There are *hundreds* of PowerPoint poster templates available online, many of them are good, and it is one of the standard formats people accept — and can be exported to PDF for easy post-conference distribution. | There are various templates to create poster using markdown\*, cf. the list at <https://gist.github.com/Pakillo/4854e5d760351206084f6be8abe476b2>:
* <https://github.com/odeleongt/flexdashboard-poster>
* <https://github.com/odeleongt/postr>
* <https://github.com/bbucior/drposter>
* <https://github.com/mathematicalcoff... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | I would recommend [Inkscape](http://inkscape.org/):
* vector graphics
* powerful
* free
* intuitive
* cross platform | For completeness, Apple's [Pages](http://www.apple.com/iwork/pages/) has quite a few nice poster layouts. |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | I recommend the free and open-source desktop publishing program **[Scribus](https://www.scribus.net/)**, available for a wide variety of operating systems including Windows, Mac, and Linux. Unlike many of the programs suggested here, Scribus is specifically focused on tasks relevant to poster production: layout, typese... | I've just used Microsoft Publisher to turn an 8-slide PowerPoint presentation into an A2 poster for a medical conference.
I copied each slide into Publisher and then blew them up to 140% and distributed and aligned them. I added a blue frame, then saved it to PDF for the print shop.
This is probably the best and ea... |
1,880 | And how much time does it usually take? I'd like to create a poster without having to put too much time into formatting. | 2012/06/05 | [
"https://academia.stackexchange.com/questions/1880",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/77/"
] | I haven't written a poster yet, but if you're a Latex savvy, there are plenty of packages that allow you to design posters.
See related questions:
* ["How to create posters using LaTeX"](https://tex.stackexchange.com/q/341/2061)
* ["What can you tell me about poster design and typography in LaTeX?"](https://tex.stac... | I want to add an additional tool that I always use:
Adobe InDesign |
17,923,715 | I am new to Symfony 2. So pardon me if this is a simple problem but I just can't figure it out how to deal with it.
I have 2 entities called Book and Page.
This is the snippet of Book entity code
```
/**
* Book
*
* @ORM\Table(name="`book`")
*/
class Book {
/**
* @var integer
*
* @ORM\Column(n... | 2013/07/29 | [
"https://Stackoverflow.com/questions/17923715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1333189/"
] | If you expect exactly one match, use [`Single`](http://msdn.microsoft.com/en-us/library/bb535118.aspx)
```
language = GetAllActiveLanguages().Single(e => e.Id == Id).LanguageCode;
``` | Of course, just put
```
.Select(e => e.LanguageCode)
```
into your query:
```
var activeLanguages =
GetAllActiveLanguages()
.Where(e => e.Id == Id)
.Select(e => e.LanguageCode)
.ToList();
``` |
17,923,715 | I am new to Symfony 2. So pardon me if this is a simple problem but I just can't figure it out how to deal with it.
I have 2 entities called Book and Page.
This is the snippet of Book entity code
```
/**
* Book
*
* @ORM\Table(name="`book`")
*/
class Book {
/**
* @var integer
*
* @ORM\Column(n... | 2013/07/29 | [
"https://Stackoverflow.com/questions/17923715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1333189/"
] | If you expect exactly one match, use [`Single`](http://msdn.microsoft.com/en-us/library/bb535118.aspx)
```
language = GetAllActiveLanguages().Single(e => e.Id == Id).LanguageCode;
``` | Ussing the `.Select(expression)` method, you will get a result that it contains, for sample, selecting a single property, instead you specify you want one item, you will get a `IEnumerable<T>` where `T` is the type of the property you have selected.
For `public string LanguageCode { get; set; }`:
```
List<string> ac... |
334,893 | Sorry for the title, I have problems putting it to words in English.
I ordered some small and cheap Chinese solar panels. I thought it was fun to tinker with them and learn about electricity. After my horrible soldering I found out I want them in series, not parallel and during the resoldering I ruined two of them. To... | 2017/10/17 | [
"https://electronics.stackexchange.com/questions/334893",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/166050/"
] | There are all kinds of things that you can try. Usually there's a trade-off between ease of use, and reliability.
How about conductive epoxy? Perhaps too expensive.
Press-fit pin-in-board technology (pressing pins into PCB, and they 'swage' into place).
from:
<https://en.wikipedia.org/wiki/Swaging#Electronics>
>... | If the copper is reasonably intact, then a temporary approach would be to use spring-loaded test clips. If you want something more permanent, then spring probes, of the sort for testing circuit boards, mounted on a custom-made jig, to hold the board in the correct position. |
70,457,699 | A string variable sometimes includes octal characters that need to be un-octaled. Example: `oct_var = "String\302\240with\302\240octals"`, the value of `oct_var` should be `"String with octals"` with non-breaking spaces.
[Codecs](https://docs.python.org/3.9/library/codecs.html) doesn't support octal, and I failed to f... | 2021/12/23 | [
"https://Stackoverflow.com/questions/70457699",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5309571/"
] | You forgot to indicate that `oct_var` should be given as bytes:
```py
>>> oct_var = b"String\302\240with\302\240octals"
>>> oct_var.decode()
'String\xa0with\xa0octals'
>>> print(oct_var.decode())
String with octals
```
Note: if your value is already as a string (beyond your control), you can *try* to convert it to b... | Putting your ideas and pointers together, and with the risks that come with the use of an **[undocumented function](https://bugs.python.org/issue30588)[\*]**, i.e, **`codecs.escape_decode`**, this line works:
`value = (codecs.escape_decode(bytes(oct_var, "latin-1"))[0].decode("utf-8"))`
[\*] "Internal function means:... |
2,115,671 | Given $f(z) = \dfrac{z-a}{1-\bar{a}z}$, with $|a|<1$.
I showed that if $|z|=1$, then $|f(z)|=1$; if $|z|<1$, then $|f(z)|<1$.
However, I am stuck at showing that the map $f$ is "onto".
Is there any elementary way of showing that this map is onto?
I looked at similar questions here, but they are only showing that... | 2017/01/26 | [
"https://math.stackexchange.com/questions/2115671",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/131137/"
] | Note that
$$f(z)=\frac{z-a}{1-\overline{a}z}$$
has inverse
$$g(z)=\frac{z+a}{1+\overline{a}z}.$$ | Hint: $$f(z) = \frac{z-a}{1-\bar{a}z} \iff z = \frac{f(z)+a}{1+\bar a f(z)}$$ |
2,115,671 | Given $f(z) = \dfrac{z-a}{1-\bar{a}z}$, with $|a|<1$.
I showed that if $|z|=1$, then $|f(z)|=1$; if $|z|<1$, then $|f(z)|<1$.
However, I am stuck at showing that the map $f$ is "onto".
Is there any elementary way of showing that this map is onto?
I looked at similar questions here, but they are only showing that... | 2017/01/26 | [
"https://math.stackexchange.com/questions/2115671",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/131137/"
] | The algebra used in proving that $f$ is one-to-one (or "into") can also be used to show that $f$ is "onto".
\begin{align}
w & = \frac{z-a}{1 - \bar a z} \\[10pt]
z & = \frac{w+a}{1+\bar a w} = \frac{w-b}{1-\bar b w}
\end{align}
The same argument that shows that if $z$ is on the unit circle then so is $w$ will show that... | Hint: $$f(z) = \frac{z-a}{1-\bar{a}z} \iff z = \frac{f(z)+a}{1+\bar a f(z)}$$ |
2,115,671 | Given $f(z) = \dfrac{z-a}{1-\bar{a}z}$, with $|a|<1$.
I showed that if $|z|=1$, then $|f(z)|=1$; if $|z|<1$, then $|f(z)|<1$.
However, I am stuck at showing that the map $f$ is "onto".
Is there any elementary way of showing that this map is onto?
I looked at similar questions here, but they are only showing that... | 2017/01/26 | [
"https://math.stackexchange.com/questions/2115671",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/131137/"
] | Note that
$$f(z)=\frac{z-a}{1-\overline{a}z}$$
has inverse
$$g(z)=\frac{z+a}{1+\overline{a}z}.$$ | The algebra used in proving that $f$ is one-to-one (or "into") can also be used to show that $f$ is "onto".
\begin{align}
w & = \frac{z-a}{1 - \bar a z} \\[10pt]
z & = \frac{w+a}{1+\bar a w} = \frac{w-b}{1-\bar b w}
\end{align}
The same argument that shows that if $z$ is on the unit circle then so is $w$ will show that... |
31,828,189 | I have to reuse the Widget application in the Qml based application with latest Qt version (Qt 5.2). But as per most of the people its is very bad idea to do so.
Can someone explain, why it is bad idea?
Some of the code snippet,
\*.h
```
class MyAppItem: public QQuickPaintedItem{
Q_OBJECT
public:
explicit... | 2015/08/05 | [
"https://Stackoverflow.com/questions/31828189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5190087/"
] | Because you do not want to add a dependency on 3d rendering when you don't need to. 3d rendering can cause [massive](https://bugreports.qt.io/browse/QTBUG-44815) amount of [trouble](https://bugreports.qt.io/browse/QTBUG-47435), which you might be able to avoid in a Qt Widgets application without Qt Quick.
If you are p... | That's interesting, I didn't know that you could do that!
Here are some reasons that I can think of:
1. Unnecessary memory overhead for storing and constructing each `QWidget` instance (this includes any signal/slot connections the widgets might make).
2. Running through the `QWidget::render()` code path unnecessaril... |
4,492,484 | I have a large file that I need to pull out only certain pieces of information. I have found a lot of examples on the web, but I cannot get any to work for my particular instance. I have the file data.log (below), and need to pull out all of the Stats1 counters, including the data above. There are multiple instances of... | 2010/12/20 | [
"https://Stackoverflow.com/questions/4492484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/548992/"
] | Try reading in paragraph mode:
```
local $/ = "";
while (<>) {
print "paragraph: $_";
}
```
I leave figuring out which paragraphs and what processing you want to you.
Output for your sample data:
```
paragraph: # DATA FILE
paragraph: Dec 8 20:00:00
Stats1
counter1: 123
counter2: 456
counter3: ... | Edit4: With those comments, here's the hopefully final version:
```
use strict;
use warnings;
use 5.010;
use Data::Dumper;
my %counter_vals;
{
local $/ = "\n\n\n";
while (<DATA>) {
my ($date) = /(
\p{L}{3}
\s+
(?:3[0-1]|[1-2][0-9]|[1-9])... |
4,492,484 | I have a large file that I need to pull out only certain pieces of information. I have found a lot of examples on the web, but I cannot get any to work for my particular instance. I have the file data.log (below), and need to pull out all of the Stats1 counters, including the data above. There are multiple instances of... | 2010/12/20 | [
"https://Stackoverflow.com/questions/4492484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/548992/"
] | Try reading in paragraph mode:
```
local $/ = "";
while (<>) {
print "paragraph: $_";
}
```
I leave figuring out which paragraphs and what processing you want to you.
Output for your sample data:
```
paragraph: # DATA FILE
paragraph: Dec 8 20:00:00
Stats1
counter1: 123
counter2: 456
counter3: ... | I think this achieves what you want
```
/(.+)\nStats1(?:\n.+){3})/g
```
It matches the following two dates: `Dec 8 20:00:00` and `Dec 8 21:00:00` |
4,492,484 | I have a large file that I need to pull out only certain pieces of information. I have found a lot of examples on the web, but I cannot get any to work for my particular instance. I have the file data.log (below), and need to pull out all of the Stats1 counters, including the data above. There are multiple instances of... | 2010/12/20 | [
"https://Stackoverflow.com/questions/4492484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/548992/"
] | Try reading in paragraph mode:
```
local $/ = "";
while (<>) {
print "paragraph: $_";
}
```
I leave figuring out which paragraphs and what processing you want to you.
Output for your sample data:
```
paragraph: # DATA FILE
paragraph: Dec 8 20:00:00
Stats1
counter1: 123
counter2: 456
counter3: ... | To be honest, the "best" solution depends on your file. For example:
* if the file is immense, slurping it all in via <> or $\_ might not be wise, whereas if it's "small", that would be fine.
* does the file have as regular a structure as the the sample shown? In that snippet the blocks occur on a repeating schedule: ... |
4,492,484 | I have a large file that I need to pull out only certain pieces of information. I have found a lot of examples on the web, but I cannot get any to work for my particular instance. I have the file data.log (below), and need to pull out all of the Stats1 counters, including the data above. There are multiple instances of... | 2010/12/20 | [
"https://Stackoverflow.com/questions/4492484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/548992/"
] | Try reading in paragraph mode:
```
local $/ = "";
while (<>) {
print "paragraph: $_";
}
```
I leave figuring out which paragraphs and what processing you want to you.
Output for your sample data:
```
paragraph: # DATA FILE
paragraph: Dec 8 20:00:00
Stats1
counter1: 123
counter2: 456
counter3: ... | Here is a way to do it:
```
#!/usr/bin/perl
use strict;
use warnings;
local $/ = "\n\n\n";
while (<DATA>) {
print if/Stats1/;
}
__DATA__
Dec 8 20:00:00
Stats1
counter1: 123
counter2: 456
counter3: 789
Dec 8 21:00:00
Stats2
counter4: 123
counter5: 456
counter6: 789
Dec 8 21:0... |
21,268 | I have an old test created by my predecessor which is checking that a user with a read only profile should fail to update records. After I made changes to my project, this test fails. The user with a read only profile succeeds in updating records. And I cannot deploy my changes to production because of this failure. I ... | 2013/11/27 | [
"https://salesforce.stackexchange.com/questions/21268",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/2781/"
] | A complete shot in the dark, but I would guess someone has created a new Profile in production called 'Read Only' that is being returned before the default system profile.
E.g. You can create a new Profile with the same name as the system 'Read Only' Profile.

14:13:10.783 (5783447000)|USER\_DEBUG|[56]|DEBUG|Before updating courses, course = Course\_\_c:{**Unmatched\_Faculty\_Name\_*c=null***, Faculty\_c=003f000000AnrNtAAJ, Id=a0Ef0000001KUW1EAO, Faculty\_... |
685,186 | I just started learning about limits and I need help with finding the limit of this problem.
$$
\lim\_{x \rightarrow \pi} \, \tan\left(\frac{5x}{6}\right)
$$
I know that $\pi$ is in the domain and that the limit would be $0$ at $\pi$ from looking the graph $y=\tan x$.
Am I correct with that?
Sadly, I don't know w... | 2014/02/21 | [
"https://math.stackexchange.com/questions/685186",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/110091/"
] | We solve the equation in three cases:
**Case (I):** If $a=1$, then $[x]=x+1$. Since $[x]\in \mathbb Z$, $x+1\in \mathbb Z$ and so $x\in \mathbb Z$. Hence, $[x]=x$ and we can conclude that $x=x+1$.
**Case (II):** Let $a<1$. Then, since, we have $[x]\leq x<[x]+1$, $ax+1\leq x<ax+2$. It implies that $1\leq x(1-a)<2$. Th... | Call the fractional part of $x$ with $frac(x)$ then;
$[x]=x-frac(x)=ax+1$
$\Rightarrow x-frac(x)-1=ax\Rightarrow [x-1]=ax$
$a=\frac{[x-1]}{x}$ |
685,186 | I just started learning about limits and I need help with finding the limit of this problem.
$$
\lim\_{x \rightarrow \pi} \, \tan\left(\frac{5x}{6}\right)
$$
I know that $\pi$ is in the domain and that the limit would be $0$ at $\pi$ from looking the graph $y=\tan x$.
Am I correct with that?
Sadly, I don't know w... | 2014/02/21 | [
"https://math.stackexchange.com/questions/685186",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/110091/"
] | We solve the equation in three cases:
**Case (I):** If $a=1$, then $[x]=x+1$. Since $[x]\in \mathbb Z$, $x+1\in \mathbb Z$ and so $x\in \mathbb Z$. Hence, $[x]=x$ and we can conclude that $x=x+1$.
**Case (II):** Let $a<1$. Then, since, we have $[x]\leq x<[x]+1$, $ax+1\leq x<ax+2$. It implies that $1\leq x(1-a)<2$. Th... | Let $x = h + f$, where $h\in\mathbb{Z}$ and $f\in[0,1)$. For example, for $x=-3.5$, we have $h=-4$ and $f=0.5$.
Let us assume that $-1 < x < 0$. Then $h=-1$ and $0 \lt f \lt 1$, which gives
$$
[x]=[h+f]= 0 = ah + af + 1 \\
\Rightarrow 0 = -a + af + 1 \\
\Rightarrow f = 1 - {1 \over a}.
$$
Since $0 \lt f < 1$, this i... |
33,226,915 | I have a table containing the following fields:
Location, WeekEnded and SalesOrder
I would like to sum by Location but there are several locations that only have a small number of orders that I would like to Group Together as a single location, I just cannot seem to get the code correct.
Curent Results
* Location A... | 2015/10/20 | [
"https://Stackoverflow.com/questions/33226915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5412043/"
] | Heres a basic push to GitHub, What kind of errors are you getting?
>
> create a new repository on the command line
>
>
>
> ```
> git init
> git add . //This will add everything in the directory
> git commit -m "first commit"
> git remote add origin https://github.com/"username"/"repository".git
> git push -u ... | Here is what solved the problem for me...
That second git command line should be `git add .` not `git add README.md`. The `.` adds all the files in the directory, as mentioned by the accepted answer.
### Code
Solution
```
git init
git add . # This was the key line to change from what was tried in the question.
git... |
31,078,142 | 
I need some help to get this thing working..
Basically on button click, I have to add a line of fixed width with circle end points on the ImageView. User can add upto 5 lines. If I click on any circle (red dot) end point of line, it should allow to... | 2015/06/26 | [
"https://Stackoverflow.com/questions/31078142",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3564885/"
] | WOW, where to even start. OK, first of all, you should not be doing your drawing in the "viewDidLoad" method of your ViewController. You should make a subclass of UIView (let's call it DrawView) and do all your drawing within the "drawRect" method. And within DrawView, you can then intercept touches.
So to get a littl... | To Draw line on image view the following code work for me even in view did load.
**first** int image view
**second** write following code
```
//line 1
CAShapeLayer *shapeLayerOne = [CAShapeLayer layer];
shapeLayerOne.path = [LineOne CGPath];
shapeLayerOne.strokeColor = [[UIColor blueColor] CGColor];
shapeLayerOne.l... |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | For "fun" games with players of different strengths you can use a chess clock and give the weaker player more time. This allows me to play against my son who is just learning a reasonable chance at winning. We often play where he gets 5 minutes on the clock to my 2 minutes. | Besides pieces, you can also give free moves, but both change the game. Playing while down a queen isn't about how well you can play chess, it's about how well you can predict your opponent's moves. Good chess is about making moves that are good no matter what your opponent does, not about correctly guessing what blund... |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | In some ways, the rating system **is** the handicap. It's very similar to the odds given to less impressive horses in racing, or the less favored boxer.
If you over-perform based upon you and your opponents respective ratings, you'll have a net gain of points, even if you don't win many (any?) games.
I drew a master ... | I have been handicapping student games for over 15 years, and my two favourites, if the relative strengths allow, are these:
1) White replaces queen with rook (about 4 points) -OR-
2) White replaces queen with bishop (about 6 points).
Black, the handicap receiver, does not have a numerical advantage in pieces. Both han... |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | I have been handicapping student games for over 15 years, and my two favourites, if the relative strengths allow, are these:
1) White replaces queen with rook (about 4 points) -OR-
2) White replaces queen with bishop (about 6 points).
Black, the handicap receiver, does not have a numerical advantage in pieces. Both han... | I play against kids at my high school, and they're terrible. I can handicap a queen and both rooks, but usually I still win. When you're playing against low-skill players, handicaps don't matter much. |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | For my niece and nephew (ages 5 and 7), I started spotting them four pieces of their choice ( minus K or Q) and each time they win the number decreases by one. We started by switching sides when things were going my way. | I play against kids at my high school, and they're terrible. I can handicap a queen and both rooks, but usually I still win. When you're playing against low-skill players, handicaps don't matter much. |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | I play against kids at my high school, and they're terrible. I can handicap a queen and both rooks, but usually I still win. When you're playing against low-skill players, handicaps don't matter much. | Besides pieces, you can also give free moves, but both change the game. Playing while down a queen isn't about how well you can play chess, it's about how well you can predict your opponent's moves. Good chess is about making moves that are good no matter what your opponent does, not about correctly guessing what blund... |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | I have been handicapping student games for over 15 years, and my two favourites, if the relative strengths allow, are these:
1) White replaces queen with rook (about 4 points) -OR-
2) White replaces queen with bishop (about 6 points).
Black, the handicap receiver, does not have a numerical advantage in pieces. Both han... | Like some people have mentioned in the thread, both time and piece handicaps are popular in chess. You also can do "wager" handicaps if you're playing for cash or play-money currency.
There are several chess websites that now offer handicapping to help bridge the often vast skill-level differences in chess. Out of al... |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | While giving an opponent the odds of a pawn or a knight might be fun to make the winning chances more distributed, it is by no means an exact method. I remember the exciting handicap match between Kasparov and Chapman. Kasparov won 2.5:1.5 by giving the odds of 2 pawns against an opponent of approx. 450 Elo points less... | For "fun" games with players of different strengths you can use a chess clock and give the weaker player more time. This allows me to play against my son who is just learning a reasonable chance at winning. We often play where he gets 5 minutes on the clock to my 2 minutes. |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | Handicapping changes chess in a fundamental way that stones in go do not.
In go, getting an extra stone is roughly equivalent to having an extra move. In chess, losing a piece is catastrophic, and in a game between two players that are within ~300 rating points, losing a piece means loss of the game.
One other reas... | Like some people have mentioned in the thread, both time and piece handicaps are popular in chess. You also can do "wager" handicaps if you're playing for cash or play-money currency.
There are several chess websites that now offer handicapping to help bridge the often vast skill-level differences in chess. Out of al... |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | While giving an opponent the odds of a pawn or a knight might be fun to make the winning chances more distributed, it is by no means an exact method. I remember the exciting handicap match between Kasparov and Chapman. Kasparov won 2.5:1.5 by giving the odds of 2 pawns against an opponent of approx. 450 Elo points less... | I have been handicapping student games for over 15 years, and my two favourites, if the relative strengths allow, are these:
1) White replaces queen with rook (about 4 points) -OR-
2) White replaces queen with bishop (about 6 points).
Black, the handicap receiver, does not have a numerical advantage in pieces. Both han... |
4 | Handicapping is routine in the Japanese game [Go](http://en.wikipedia.org/wiki/Go_%28game%29) (my best game). The basic strength unit is one stone, and a one-stone difference represents a full level of difference in strength.
I (about a 1500 player) once asked a 2100 player how much of a handicap she would need to giv... | 2012/05/01 | [
"https://chess.stackexchange.com/questions/4",
"https://chess.stackexchange.com",
"https://chess.stackexchange.com/users/17/"
] | Handicapping changes chess in a fundamental way that stones in go do not.
In go, getting an extra stone is roughly equivalent to having an extra move. In chess, losing a piece is catastrophic, and in a game between two players that are within ~300 rating points, losing a piece means loss of the game.
One other reas... | I play against kids at my high school, and they're terrible. I can handicap a queen and both rooks, but usually I still win. When you're playing against low-skill players, handicaps don't matter much. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.