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 |
|---|---|---|---|---|---|
2,381,213 | Suppose the non-constant functions $f$ and $g$ satisfy the following two conditions:
$1)\ g(x-y) = g(x)g(y) +f(x)f(y)$
$2)\ f(0) = 0$.
Determine $g(0)$ and $(f(x))^2 + (g(x))^2.$
Is the answer $g(0) = 0?$ Is the second answer $0?$ | 2017/08/03 | [
"https://math.stackexchange.com/questions/2381213",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/463689/"
] | Let $x=y=0$. Then $$g(0)=[g(0)]^2+[f(0)]^2\\g(0)=0 \text{ or } 1$$
Let $x=y$. Then $$g(0)=[g(x)]^2+[f(x)]^2$$
Suppose $g(0)=0$.
Taking $y=0$, we get $$g(x)=0$$ But $g$ is non-constant. Therefore, $$g(0) \neq 0$$ Hence, $$g(0)=[g(x)]^2+[f(x)]^2=1$$ | Putting $x=y$ in the first relation, note that $g(0)=g^2(x)+f^2(x)$. Also, $g(0)=g^2(0)+f^2(0)\implies g(0)=0,1$. But $g(0)=0\implies f(x)=0,g(x)=0$, which contradicts the fact that they are non-constant. So, $g(0)=1$. |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | We have
$x = x\_i e\_i = x'\_i e'\_i$
where $e\_i$ and $e'\_i$ are bases related by nonsingular linear transformation.
Note that
${e'}\_i^T e'\_j = g\_{ij}$,
where $g$ is invertible.
Thus,
${e'}\_i^T e\_j x\_j = {e'}\_i^T e'\_j x'\_j = g\_{ij}x'\_j$
or
$$x'\_i = (g^{-1})\_{ij}{e'}\_j^T e\_k x\_k
= (g^{-1})\_{ij}{e'... | Using the property of the transpose $\langle A^Tw,v\rangle = \langle w, Av\rangle$, I get:
$$\pmatrix{a\_{11} & a\_{12} & a\_{13} \\ a\_{21} & a\_{22} & a\_{23}}\pmatrix{x \\ y \\ z} = \pmatrix{\langle A^T\pmatrix{1 \\ 0}, \pmatrix{x \\ y \\ z}\rangle \\ \langle A^T\pmatrix{0 \\ 1}, \pmatrix{x \\ y \\ z}\rangle} = \pm... |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | It is easiest to see this in one dimension first.
Our goal is to show that any linear transformation $T: \mathbb{R}^n \rightarrow \mathbb{R}$ can be represented in the form $Tu = \beta^Tu$ for some $n$-dimensional vector $\beta$. Say that $u \in \mathbb{R}^n$; let $e\_1, \ldots, e\_n$ be the standard basis vectors for... | Using the property of the transpose $\langle A^Tw,v\rangle = \langle w, Av\rangle$, I get:
$$\pmatrix{a\_{11} & a\_{12} & a\_{13} \\ a\_{21} & a\_{22} & a\_{23}}\pmatrix{x \\ y \\ z} = \pmatrix{\langle A^T\pmatrix{1 \\ 0}, \pmatrix{x \\ y \\ z}\rangle \\ \langle A^T\pmatrix{0 \\ 1}, \pmatrix{x \\ y \\ z}\rangle} = \pm... |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | I think an intuitive way to think about matrix multiplication is to regard it as a combination of coordinate extraction and scalar multiplication. First, given any basis for a finite vector space, such as $\mathbb{R}^n$, we usually express any vector $\mathbf{v}=\sum\_i c\_i \mathbf{e}\_i=[c\_1,c\_2,\dots,c\_n]$ as an ... | Using the property of the transpose $\langle A^Tw,v\rangle = \langle w, Av\rangle$, I get:
$$\pmatrix{a\_{11} & a\_{12} & a\_{13} \\ a\_{21} & a\_{22} & a\_{23}}\pmatrix{x \\ y \\ z} = \pmatrix{\langle A^T\pmatrix{1 \\ 0}, \pmatrix{x \\ y \\ z}\rangle \\ \langle A^T\pmatrix{0 \\ 1}, \pmatrix{x \\ y \\ z}\rangle} = \pm... |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | We have
$x = x\_i e\_i = x'\_i e'\_i$
where $e\_i$ and $e'\_i$ are bases related by nonsingular linear transformation.
Note that
${e'}\_i^T e'\_j = g\_{ij}$,
where $g$ is invertible.
Thus,
${e'}\_i^T e\_j x\_j = {e'}\_i^T e'\_j x'\_j = g\_{ij}x'\_j$
or
$$x'\_i = (g^{-1})\_{ij}{e'}\_j^T e\_k x\_k
= (g^{-1})\_{ij}{e'... | It is easiest to see this in one dimension first.
Our goal is to show that any linear transformation $T: \mathbb{R}^n \rightarrow \mathbb{R}$ can be represented in the form $Tu = \beta^Tu$ for some $n$-dimensional vector $\beta$. Say that $u \in \mathbb{R}^n$; let $e\_1, \ldots, e\_n$ be the standard basis vectors for... |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | We have
$x = x\_i e\_i = x'\_i e'\_i$
where $e\_i$ and $e'\_i$ are bases related by nonsingular linear transformation.
Note that
${e'}\_i^T e'\_j = g\_{ij}$,
where $g$ is invertible.
Thus,
${e'}\_i^T e\_j x\_j = {e'}\_i^T e'\_j x'\_j = g\_{ij}x'\_j$
or
$$x'\_i = (g^{-1})\_{ij}{e'}\_j^T e\_k x\_k
= (g^{-1})\_{ij}{e'... | After reading your question further, I believe I misunderstood initially what you were asking.
In terms of orthogonality, what it tells you is that the row space is the orthogonal complement to the Nul space. Thus every vector can be written uniquely as the sum of a vector in the row space of A and in the Nul space of... |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | We have
$x = x\_i e\_i = x'\_i e'\_i$
where $e\_i$ and $e'\_i$ are bases related by nonsingular linear transformation.
Note that
${e'}\_i^T e'\_j = g\_{ij}$,
where $g$ is invertible.
Thus,
${e'}\_i^T e\_j x\_j = {e'}\_i^T e'\_j x'\_j = g\_{ij}x'\_j$
or
$$x'\_i = (g^{-1})\_{ij}{e'}\_j^T e\_k x\_k
= (g^{-1})\_{ij}{e'... | I think an intuitive way to think about matrix multiplication is to regard it as a combination of coordinate extraction and scalar multiplication. First, given any basis for a finite vector space, such as $\mathbb{R}^n$, we usually express any vector $\mathbf{v}=\sum\_i c\_i \mathbf{e}\_i=[c\_1,c\_2,\dots,c\_n]$ as an ... |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | It is easiest to see this in one dimension first.
Our goal is to show that any linear transformation $T: \mathbb{R}^n \rightarrow \mathbb{R}$ can be represented in the form $Tu = \beta^Tu$ for some $n$-dimensional vector $\beta$. Say that $u \in \mathbb{R}^n$; let $e\_1, \ldots, e\_n$ be the standard basis vectors for... | After reading your question further, I believe I misunderstood initially what you were asking.
In terms of orthogonality, what it tells you is that the row space is the orthogonal complement to the Nul space. Thus every vector can be written uniquely as the sum of a vector in the row space of A and in the Nul space of... |
2,010,067 | I was trying to understand where it came from that each row in a matrix multiplication is a dot product, as in:
$$
Ax = \left(
\begin{array}{ccc}
a\_{1}^T \\
\vdots \\
a\_m^T \end{array}
\right)x = \left(
\begin{array}{ccc}
a\_{1}^Tx \\
\vdots \\
a\_m^T x \end{array}
\right)
$$
what is an intuitive explanation or... | 2016/11/12 | [
"https://math.stackexchange.com/questions/2010067",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/118359/"
] | I think an intuitive way to think about matrix multiplication is to regard it as a combination of coordinate extraction and scalar multiplication. First, given any basis for a finite vector space, such as $\mathbb{R}^n$, we usually express any vector $\mathbf{v}=\sum\_i c\_i \mathbf{e}\_i=[c\_1,c\_2,\dots,c\_n]$ as an ... | After reading your question further, I believe I misunderstood initially what you were asking.
In terms of orthogonality, what it tells you is that the row space is the orthogonal complement to the Nul space. Thus every vector can be written uniquely as the sum of a vector in the row space of A and in the Nul space of... |
38,296,166 | Im trying to save an audio in the new Firebase Storage option, the audio is set as a .mp3 file and the uploaded to Firebase via this code : `UploadTask uploadAudio = storageRef.putFile(audioUri);`
The problem is that the audio is stored as a video/mp4 file, and because of that the MediaPlayer does not reproduce it as ... | 2016/07/10 | [
"https://Stackoverflow.com/questions/38296166",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4564450/"
] | Moving comment to answer:
You can explicitly [specify metadata when you upload the file](https://firebase.google.com/docs/storage/android/upload-files#add_file_metadata) to Firebase. If you specify `setContentType("audio/mpeg")` it should map the file to an MP3 correctly. | ```
class func uploadAudios(data : Data,completion : @escaping (_ succus : String )->Void){
var url = ""
let storage = Storage.storage()
// Create file metadata including the content type
let metadata = StorageMetadata()
metadata.contentType = "audio/mpeg"
let uploadRef = storage.reference().c... |
4,854,246 | I have a table named `forums` with the follow field structure:
1. object\_type --> [ Group | Page | Tournament | etc....] (Possibles values. each element has its own table)
2. object\_id --> [group's id | page's id | tournament's id | etc..] (id object\_type)
3. id\_forum, 4.name, etc.
Then I have the following table... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4854246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/539806/"
] | I think what you are looking for can be done with inheritance.
Check <http://www.doctrine-project.org/docs/orm/2.0/en/reference/inheritance-mapping.html> for detailed explanation. | I had a similar problem. I've posted a complete example on how to implement polymorphic associations in Doctrine 2.2 in [this post](https://stackoverflow.com/a/11086328/461115). |
4,854,246 | I have a table named `forums` with the follow field structure:
1. object\_type --> [ Group | Page | Tournament | etc....] (Possibles values. each element has its own table)
2. object\_id --> [group's id | page's id | tournament's id | etc..] (id object\_type)
3. id\_forum, 4.name, etc.
Then I have the following table... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4854246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/539806/"
] | I think what you are looking for can be done with inheritance.
Check <http://www.doctrine-project.org/docs/orm/2.0/en/reference/inheritance-mapping.html> for detailed explanation. | This should have been a comment but my reputation is too low, sorry.
Unfortunately polymorphic association is not exactly the same as CTI (Class Table Inheritance) : CTI requires a parent table with the same id for all subclasses.
CTI might work in most cases, but it can be a problem if you want to create a polymorph... |
4,854,246 | I have a table named `forums` with the follow field structure:
1. object\_type --> [ Group | Page | Tournament | etc....] (Possibles values. each element has its own table)
2. object\_id --> [group's id | page's id | tournament's id | etc..] (id object\_type)
3. id\_forum, 4.name, etc.
Then I have the following table... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4854246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/539806/"
] | This should have been a comment but my reputation is too low, sorry.
Unfortunately polymorphic association is not exactly the same as CTI (Class Table Inheritance) : CTI requires a parent table with the same id for all subclasses.
CTI might work in most cases, but it can be a problem if you want to create a polymorph... | I had a similar problem. I've posted a complete example on how to implement polymorphic associations in Doctrine 2.2 in [this post](https://stackoverflow.com/a/11086328/461115). |
9,367,172 | I have this table
```
ID InvoiceNo Created_date
-- --------- ------------
1 123 1/1/2009
1 234 1/1/2010
1 2304 2/1/2010
1 av245 3/1/2011
1 45wd3 4/1/2011
2 345 1/1/2010
2 4w5 2/1/2010
```
I am trying to select the ID where there has been no activity sinc... | 2012/02/20 | [
"https://Stackoverflow.com/questions/9367172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/993826/"
] | Not optimized for performance, but I would just do something like this:
*quick and dirty alert*
```
select distinct q.id from (select id, max(created_date) as latestdate from TABLENAME group by id) q where q.latestdate <= '2010-11-01'
``` | in oracle i might write something like this:
```
select id from mytable
MINUS
SELECT id from mytable where created_dt > '2010-11-01'
```
to use NOT IN:
```
select * from mytable
where id not in ( select id from mytable where created_dt > '2010-11-01' )
``` |
4,878,907 | I'm following a tutorial and it said at one point it should compile, but it errored.
To find out why I just used their code instead of mine and have just pasted all theirs in, however, this is picking up errors. It's in a header file, I've placed the errors below the code
```
#ifndef _CApp_H_
#define _CApp_H_
#... | 2011/02/02 | [
"https://Stackoverflow.com/questions/4878907",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/511258/"
] | Is the SDL.h file in your include path? Nothing in the example jumps out at me as wrong. | This isn't really a proper answer to your question, but...
I would highly recommend switching to SFML instead of SDL. It's essentially a modernized, object-oriented SFML written in C++. It has many advantages over SDL (such as fully hardware-accelerated 2D drawing). Check it out if you'd like. |
4,878,907 | I'm following a tutorial and it said at one point it should compile, but it errored.
To find out why I just used their code instead of mine and have just pasted all theirs in, however, this is picking up errors. It's in a header file, I've placed the errors below the code
```
#ifndef _CApp_H_
#define _CApp_H_
#... | 2011/02/02 | [
"https://Stackoverflow.com/questions/4878907",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/511258/"
] | Is the SDL.h file in your include path? Nothing in the example jumps out at me as wrong. | It's probably located in a path. Try putting # include "SDL\SDL.h". |
62,785,998 | I have a Mapping table that stores Source and destination table name. I want to compare source table data with destination table data and find out the missing rows. Table names should be passed dynamically in data flow mapping. | 2020/07/08 | [
"https://Stackoverflow.com/questions/62785998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8940801/"
] | Use the Exists transformation in ADF data flows with the "Does not exists" option.
[](https://i.stack.imgur.com/1hDjZ.png) | Do you have an example syntax when using the same dynamic column name $ColumnName for both the streams? Because all I get is true because I assume the $ColumnName seems to be evaluated as a string and then "string = string" evaluates to true.
In some of the documentation it indicates inputStream@column == inputStream@... |
8,972,560 | I have 2 queries and i want to use result of first query in second one.
Following does not work for me:
```
$id = $_GET['uid'];
$app_id = $_GET['apid'];
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
mysql_query($sql) or die ($sql);
$result = mysql_insert_id();
echo $result;
$sql = "inser... | 2012/01/23 | [
"https://Stackoverflow.com/questions/8972560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1153445/"
] | You could have used MySQL [LAST\_INSERT\_ID()](http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id) function. This way all this mess with insert id will be gone.
```
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
if(mysql_query($sql)){
$sql = "insert int... | `$result` contains an SQL resource, not the id.
```
$insert_id = mysql_insert_id();
$sql = "INSERT INTO tbl_ms(m_name, ng_ID, status)
VALUES ($app_id, $insert_id, 1)";
```
Don't forget to sanitize user input to avoid injection attacks. |
8,972,560 | I have 2 queries and i want to use result of first query in second one.
Following does not work for me:
```
$id = $_GET['uid'];
$app_id = $_GET['apid'];
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
mysql_query($sql) or die ($sql);
$result = mysql_insert_id();
echo $result;
$sql = "inser... | 2012/01/23 | [
"https://Stackoverflow.com/questions/8972560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1153445/"
] | You could have used MySQL [LAST\_INSERT\_ID()](http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id) function. This way all this mess with insert id will be gone.
```
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
if(mysql_query($sql)){
$sql = "insert int... | `$result` in your code will always contain a boolean, and if it was successful, when used in the next query, this will always be `1`. You `echo`d the value you need, but you didn't catch it in a variable so it could be used in the next query.
Try this:
```
$id = mysql_real_escape_string($_GET['uid']);
$sql = "INSERT ... |
8,972,560 | I have 2 queries and i want to use result of first query in second one.
Following does not work for me:
```
$id = $_GET['uid'];
$app_id = $_GET['apid'];
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
mysql_query($sql) or die ($sql);
$result = mysql_insert_id();
echo $result;
$sql = "inser... | 2012/01/23 | [
"https://Stackoverflow.com/questions/8972560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1153445/"
] | You could have used MySQL [LAST\_INSERT\_ID()](http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id) function. This way all this mess with insert id will be gone.
```
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
if(mysql_query($sql)){
$sql = "insert int... | Make a variable `$insertedID = mysql_insert_id();` just before the second `$sql` variable !
And in the second `$sql` query replace the `$result` with `$insertedID`
It should solve your problem ! |
8,972,560 | I have 2 queries and i want to use result of first query in second one.
Following does not work for me:
```
$id = $_GET['uid'];
$app_id = $_GET['apid'];
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
mysql_query($sql) or die ($sql);
$result = mysql_insert_id();
echo $result;
$sql = "inser... | 2012/01/23 | [
"https://Stackoverflow.com/questions/8972560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1153445/"
] | You could have used MySQL [LAST\_INSERT\_ID()](http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id) function. This way all this mess with insert id will be gone.
```
$sql = "insert into tbl_sc (client_id,status) values ($id,1)";
if(mysql_query($sql)){
$sql = "insert int... | In the second query just use
```
insert into tbl_ms(m_name, ng_ID, status)
values ($app_id,last_insert_id() ,1)
```
no need to play this via PHP! |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | Give this a shot:
```
eventRender: function(event, element) {
var limit = 20;
if (event.title.length > limit) {
element.find('.fc-event-title').text(event.title.substr(0,limit)+'...').parent().attr('title', event.title);
}
}
```
That will crop and add a title with native browser tooltips. you cou... | You can:
1. Change the way the event is rendered, either in [eventRender](http://arshaw.com/fullcalendar/docs/event_rendering/eventRender/) (the callback where the user may modify the div) or in the source of fullcalendar itself.
2. Add a tooltip to the calendar event that shows the full title, perhaps with [qtip](htt... |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | I made a little bit different thing with this problem:
Find this part in source of fullcallendar:
```
if (seg.contentTop !== undefined && height - seg.contentTop < 10) {
// not enough room for title, put it in the time header
eventElement.find('div.fc-event-time')
.text(formatDate(event.start, opt('timeFormat... | You could add a break line in the event, between time and title, using the func **`eventRender`**.
It solution applies only for *month view*.
```
eventRender: function(event, element, view) {
var limit = 10;
if (view.type === 'month' && event.title && event.title.length > limit) {
element.find('.fc-ti... |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | I fixed it like this for MonthView:
Find this function: (for me it's on line#5381)
```
function daySegHTML(segs)
```
In this function find this code:
```
html +=
" class='" + classes.join(' ') + "'" +
" style='position:absolute;z-index:8;left:"+left+"px;" + skinCss + "'" +
```
Add a piece of code befor... | In Version 5.9 just set:
```
.fc-event-main{
overflow:hidden;
}
.fc-event-title{
text-overflow: ellipsis;
}
``` |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | Give this a shot:
```
eventRender: function(event, element) {
var limit = 20;
if (event.title.length > limit) {
element.find('.fc-event-title').text(event.title.substr(0,limit)+'...').parent().attr('title', event.title);
}
}
```
That will crop and add a title with native browser tooltips. you cou... | I made a little bit different thing with this problem:
Find this part in source of fullcallendar:
```
if (seg.contentTop !== undefined && height - seg.contentTop < 10) {
// not enough room for title, put it in the time header
eventElement.find('div.fc-event-time')
.text(formatDate(event.start, opt('timeFormat... |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | You can:
1. Change the way the event is rendered, either in [eventRender](http://arshaw.com/fullcalendar/docs/event_rendering/eventRender/) (the callback where the user may modify the div) or in the source of fullcalendar itself.
2. Add a tooltip to the calendar event that shows the full title, perhaps with [qtip](htt... | @Arron answer works perfectly for me except for an update for version `FullCalendar v2.9.1`
need to find `div` with class `fc-title` and not `.fc-event-title`
```
var titleLimit = 20;
if (event.title.length > titleLimit) {
eventElement.find('.fc-title').text(event.title.substr(0,titleLimit)+'...').parent(... |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | You can:
1. Change the way the event is rendered, either in [eventRender](http://arshaw.com/fullcalendar/docs/event_rendering/eventRender/) (the callback where the user may modify the div) or in the source of fullcalendar itself.
2. Add a tooltip to the calendar event that shows the full title, perhaps with [qtip](htt... | You could add a break line in the event, between time and title, using the func **`eventRender`**.
It solution applies only for *month view*.
```
eventRender: function(event, element, view) {
var limit = 10;
if (view.type === 'month' && event.title && event.title.length > limit) {
element.find('.fc-ti... |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | If you want to show the title in multiple lines, you can override the fullcalendar default CSS.
**Default CSS in FullCalendar v2.1.1**
```
.fc-day-grid-event > .fc-content {
white-space: nowrap;
overflow: hidden;
}
```
Remove the `white-space: nowrap;` and yout title will always be visible. | I made a little bit different thing with this problem:
Find this part in source of fullcallendar:
```
if (seg.contentTop !== undefined && height - seg.contentTop < 10) {
// not enough room for title, put it in the time header
eventElement.find('div.fc-event-time')
.text(formatDate(event.start, opt('timeFormat... |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | Give this a shot:
```
eventRender: function(event, element) {
var limit = 20;
if (event.title.length > limit) {
element.find('.fc-event-title').text(event.title.substr(0,limit)+'...').parent().attr('title', event.title);
}
}
```
That will crop and add a title with native browser tooltips. you cou... | In Version 5.9 just set:
```
.fc-event-main{
overflow:hidden;
}
.fc-event-title{
text-overflow: ellipsis;
}
``` |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | I fixed it like this for MonthView:
Find this function: (for me it's on line#5381)
```
function daySegHTML(segs)
```
In this function find this code:
```
html +=
" class='" + classes.join(' ') + "'" +
" style='position:absolute;z-index:8;left:"+left+"px;" + skinCss + "'" +
```
Add a piece of code befor... | You could add a break line in the event, between time and title, using the func **`eventRender`**.
It solution applies only for *month view*.
```
eventRender: function(event, element, view) {
var limit = 10;
if (view.type === 'month' && event.title && event.title.length > limit) {
element.find('.fc-ti... |
5,454,962 | I have a little problem with long title in fullcalendar plugin. If u have a long title and short event time (for example 1 day) so ur event title will not to be fit.
What I can do with that? | 2011/03/28 | [
"https://Stackoverflow.com/questions/5454962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/679678/"
] | If you want to show the title in multiple lines, you can override the fullcalendar default CSS.
**Default CSS in FullCalendar v2.1.1**
```
.fc-day-grid-event > .fc-content {
white-space: nowrap;
overflow: hidden;
}
```
Remove the `white-space: nowrap;` and yout title will always be visible. | You can:
1. Change the way the event is rendered, either in [eventRender](http://arshaw.com/fullcalendar/docs/event_rendering/eventRender/) (the callback where the user may modify the div) or in the source of fullcalendar itself.
2. Add a tooltip to the calendar event that shows the full title, perhaps with [qtip](htt... |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | We have a "Getting started" guide on the website: <https://specflow.org/getting-started/>
Also we have some examples here: <https://github.com/techtalk/SpecFlow-Examples>
You could compare your project with the example if you missed something. | It is better for you to use visual studio 2015 to do the same things that you want. |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | I had the same issue . And when I upgraded my specflow to 3.0.213 , feature.cs and tests were not generated in test explorer. Then I used [this](https://github.com/techtalk/SpecFlow-Examples/tree/master/MSBuild/OldCSProj_SpecFlow30) MSBUild example with latest specflow to generate feature.cs and tests in test explorer.... | It is better for you to use visual studio 2015 to do the same things that you want. |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | Install the "SpecFlow.Tools.MsBuild.Generation" nuget package and rebuild the solution. That *should* get you going. | It is better for you to use visual studio 2015 to do the same things that you want. |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | Had the same issue,
Besides adding the nuget package
**SpecFlow.Tools.MsBuild.Generation**
as Meza mentioned.
The testes did not appear in the Test Explorer before i added
**SpecFlow.NUnit.Runners**
besides already having
SpecFlow
SpecFlow.NUnit
NUnit
NUnit3TestAdapter
and the Visual Specflow extension
... | It is better for you to use visual studio 2015 to do the same things that you want. |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | As an update these were the nuget packages I had in place to finally get an example working, using selenium running under NUnit. (It may be useful to someone)
[](https://i.stack.imgur.com/y79CZ.png) | It is better for you to use visual studio 2015 to do the same things that you want. |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | Install the "SpecFlow.Tools.MsBuild.Generation" nuget package and rebuild the solution. That *should* get you going. | We have a "Getting started" guide on the website: <https://specflow.org/getting-started/>
Also we have some examples here: <https://github.com/techtalk/SpecFlow-Examples>
You could compare your project with the example if you missed something. |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | Install the "SpecFlow.Tools.MsBuild.Generation" nuget package and rebuild the solution. That *should* get you going. | I had the same issue . And when I upgraded my specflow to 3.0.213 , feature.cs and tests were not generated in test explorer. Then I used [this](https://github.com/techtalk/SpecFlow-Examples/tree/master/MSBuild/OldCSProj_SpecFlow30) MSBUild example with latest specflow to generate feature.cs and tests in test explorer.... |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | Install the "SpecFlow.Tools.MsBuild.Generation" nuget package and rebuild the solution. That *should* get you going. | Had the same issue,
Besides adding the nuget package
**SpecFlow.Tools.MsBuild.Generation**
as Meza mentioned.
The testes did not appear in the Test Explorer before i added
**SpecFlow.NUnit.Runners**
besides already having
SpecFlow
SpecFlow.NUnit
NUnit
NUnit3TestAdapter
and the Visual Specflow extension
... |
57,917,739 | I'm starting with BDD and spec-flow in C# and Visual Studio. I was following a tutorial at <https://www.toolsqa.com/specflow/set-up-specflow/> to set up a project but I cannot be shown the tests in visual studio 2017 to run.
The steps I take are the following:
1. I create a project as a class library in the .NET Fram... | 2019/09/13 | [
"https://Stackoverflow.com/questions/57917739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8483333/"
] | Install the "SpecFlow.Tools.MsBuild.Generation" nuget package and rebuild the solution. That *should* get you going. | As an update these were the nuget packages I had in place to finally get an example working, using selenium running under NUnit. (It may be useful to someone)
[](https://i.stack.imgur.com/y79CZ.png) |
4,398,762 | >
> Suppose that $0\leq p\_n\leq 1$ and put
> $\alpha\_n=\min\left\{p\_n,\,1-p\_n\right\}$.
>
>
> Show that, if $\sum\alpha\_n$ converges, then on some
> discrete probability space there exist independent events $A\_n$ satisfying
> $P\left(A\_n\right)=p\_n$.
>
>
>
This is problem 5.15 in Billingsley's *Probabili... | 2022/03/08 | [
"https://math.stackexchange.com/questions/4398762",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/386270/"
] | Originally, the question was asked without the "independent" qualifier that was present in the Billingsley book. I have updated my answer to account for this requirement.
---
For simplicity, I will assume without loss of generality that each $p\_n\le \frac12$, so that $\alpha\_n=p\_n$ and $\sum\_{n\ge 1}p\_n<\infty$.... | For every $n$, define the distribution $\mu\_n$ by
\begin{align}
\mu\_n\{0\} = \alpha\_n, \; \mu\_n\{1\} = 1 - \alpha\_n.
\end{align}
By Theorem $5.3$, there exists on the probability space $(\Omega, \mathscr{F}, P) := ((0, 1], \mathscr{B}, \lambda)$ an independent sequence $\{X\_n\}$ of binary random variables such t... |
4,398,762 | >
> Suppose that $0\leq p\_n\leq 1$ and put
> $\alpha\_n=\min\left\{p\_n,\,1-p\_n\right\}$.
>
>
> Show that, if $\sum\alpha\_n$ converges, then on some
> discrete probability space there exist independent events $A\_n$ satisfying
> $P\left(A\_n\right)=p\_n$.
>
>
>
This is problem 5.15 in Billingsley's *Probabili... | 2022/03/08 | [
"https://math.stackexchange.com/questions/4398762",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/386270/"
] | Originally, the question was asked without the "independent" qualifier that was present in the Billingsley book. I have updated my answer to account for this requirement.
---
For simplicity, I will assume without loss of generality that each $p\_n\le \frac12$, so that $\alpha\_n=p\_n$ and $\sum\_{n\ge 1}p\_n<\infty$.... | Putting the idea of @MikeEarnest into equation:
Assume wlog $\sum\_n \min(p\_n,1-p\_n) = \sum\_n p\_n$ by relabeling $p\_n \rightarrow 1-p\_n$ if $p\_n > 0.5$.
Assume wlog let $1-p\_1 < 1-p\_2 <....<1-p\_n < 1-p\_{n+1}<...$. This is true since $\sum\_n p\_n < \infty$ and hence $p\_n \rightarrow 0$.
Let $S$ be a cont... |
4,398,762 | >
> Suppose that $0\leq p\_n\leq 1$ and put
> $\alpha\_n=\min\left\{p\_n,\,1-p\_n\right\}$.
>
>
> Show that, if $\sum\alpha\_n$ converges, then on some
> discrete probability space there exist independent events $A\_n$ satisfying
> $P\left(A\_n\right)=p\_n$.
>
>
>
This is problem 5.15 in Billingsley's *Probabili... | 2022/03/08 | [
"https://math.stackexchange.com/questions/4398762",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/386270/"
] | For every $n$, define the distribution $\mu\_n$ by
\begin{align}
\mu\_n\{0\} = \alpha\_n, \; \mu\_n\{1\} = 1 - \alpha\_n.
\end{align}
By Theorem $5.3$, there exists on the probability space $(\Omega, \mathscr{F}, P) := ((0, 1], \mathscr{B}, \lambda)$ an independent sequence $\{X\_n\}$ of binary random variables such t... | Putting the idea of @MikeEarnest into equation:
Assume wlog $\sum\_n \min(p\_n,1-p\_n) = \sum\_n p\_n$ by relabeling $p\_n \rightarrow 1-p\_n$ if $p\_n > 0.5$.
Assume wlog let $1-p\_1 < 1-p\_2 <....<1-p\_n < 1-p\_{n+1}<...$. This is true since $\sum\_n p\_n < \infty$ and hence $p\_n \rightarrow 0$.
Let $S$ be a cont... |
4,404,491 | I'm not an XSLT wizard.
I have the current XSLT i'm using to remove empty nodes:
```
string strippingStylesheet = "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">" +
"<xsl:template match=\"@*|node()\">" +
"<xsl:if test=\". != ''\">" +
... | 2010/12/10 | [
"https://Stackoverflow.com/questions/4404491",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/324516/"
] | >
> I have the current XSLT i'm using to
> remove empty nodes:
>
>
> . . . . . . . . .
>
>
> I need to find a way to also remove
> nodes with -1 in them
>
>
>
I guess that it is required to remove *all* "empty nodes".
The processing depends on the definition of "empty node". One reasonable definition in you... | In simple case this should work:
```
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[. = '' or . = '-1']"/>
```
With this simple input:
```
<root>
<node></node>
<node>-1</node>
<node>2</node>
... |
38,753,895 | I understand that the Twitter streaming API only allows for a single connection per user account on Twitter. I was wondering if multiple streaming connections from the same IP address are allowed, if each connection has credentials from a different user account? For example, in a scenario where a single server may proc... | 2016/08/03 | [
"https://Stackoverflow.com/questions/38753895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/116223/"
] | **Read second line:**
```
$myFile = "data/vote_result.txt";
$linesArray = file($myFile);
echo $linesArray[1]; //line 2
```
If you want to append a line to file, use **FILE\_APPEND** flag in file\_put\_contents and concatenate "\n" with implode.
```
file_put_contents('data/vote_result.txt', implode(',', $results)."... | Besides that you should use a database like MySQL for this, you can use the [file](http://php.net/manual/en/function.file.php) function. Example:
```
$data = file('file.txt');
print $data[1]; // printing out the second line
```
This given you can simply add new lines just by adding a new entry in the array and then ... |
45,788,018 | I am using Visual Studio 2017 and trying to create a "Console App (.Net Standard)". It is no longer on my list of available projects when I do "File -> New Project..."
[](https://i.stack.imgur.com/IRUsv.png)
It was there a few minutes ago. It disappeared... | 2017/08/21 | [
"https://Stackoverflow.com/questions/45788018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192044/"
] | It doesn't make sense to create a .NET Standard console app.
You can think of .NET Standard like you would an interface in C#. .NET Standard is an interface, then there's concrete implementations of it in .NET Framework, .NET Core and other platforms. .NET Standard makes sense for class libraries, but a console app ne... | My code looked like this
```cs
using System;
namespace TriNitroToluene
{
public static class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.Read();
}
}
}
```
In the project properties, set output type to consol... |
38,570,528 | If I deploy my application directly on stand alone Tomcat 8, the server starts without any errors. Ony when I try to start Tomcat within IntelliJ, I get this NoClassDefFoundError: org/slf4j/Logger and the application doesn't start. Everything works fine when I deploy the WAR directly in the external Tomcat.
Attached ar... | 2016/07/25 | [
"https://Stackoverflow.com/questions/38570528",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4239950/"
] | Try this
```
var result = db.PersonRank(i => new
{
PersonRank = i.PersonRank,
amount = i.amount,
PersonRankSum = (db.PersonRank
.Where(t => t.PersonRank <= i.PersonR... | ```
var query =
from pr in context.PersonRanks
orderby pr.PersonRank
select new
{
pr.PersonRank,
pr.Amount,
Sum = context.PersonRanks.Where(p => p.PersonRank <= pr.PersonRank).Sum(p => p.Amount)
};
``` |
12,097,671 | I am wondering if I can access the values I get after iterating the hashmap in the following code (I know they are stored in map but want to use them outside loop). The key and corresponding values are iterated inside a loop. Can concurrent hashmap help me to get the values and use them outside the loop.
Thank You.
... | 2012/08/23 | [
"https://Stackoverflow.com/questions/12097671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1552373/"
] | `ConcurrentHashMap` is designed to be thread-safe.
If you aren't using multiple threads, it's worse than useless.
You should just use a `MultiMap`.
You can *always* access values outside the loop. | ConcorrentHashMap is fail-safe. it won't give any concurrent modification exceptions. it works good for multi threaded operations. The whole implementation of ConcurrentHashMap is same as HashMap but the while retrieving the elements , HashMap locks whole map restricting doing further modifications which gives concurre... |
10,862,778 | I see that there is `[tabBar setSelectedImageTintColor:[UIColor]]` which is great, but how do I set the imagetintcolor for the offstate? I can't seem to find a `[tabBar setImageTintColor]` or `[tabBar setUnSelectedImageTintColor]`. | 2012/06/02 | [
"https://Stackoverflow.com/questions/10862778",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27305/"
] | Take a look at the "Managing the Finished and Selected Image" task's section of the docs of [UITabBarItem](https://developer.apple.com/library/IOs/ipad/#documentation/UIKit/Reference/UITabBarItem_Class/Reference/Reference.html). | For changing the look and feel of the buttons to that level of detail, you are going to have to implement your own custom UITabBar. Here's a good reference:
<http://idevrecipes.com/2010/12/16/raised-center-tab-bar-button/> |
10,862,778 | I see that there is `[tabBar setSelectedImageTintColor:[UIColor]]` which is great, but how do I set the imagetintcolor for the offstate? I can't seem to find a `[tabBar setImageTintColor]` or `[tabBar setUnSelectedImageTintColor]`. | 2012/06/02 | [
"https://Stackoverflow.com/questions/10862778",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27305/"
] | And for a quick cut 'n paste:
```
NSArray *tabBarImages = [[NSArray alloc] initWithObjects:@"tab_a.png",
@"tab_b.png",
@"tab_c.png",
@"tab_d.png",
@"tab_e.png",
nil];
for (uint i=0;i<[_tabBarCo... | For changing the look and feel of the buttons to that level of detail, you are going to have to implement your own custom UITabBar. Here's a good reference:
<http://idevrecipes.com/2010/12/16/raised-center-tab-bar-button/> |
10,862,778 | I see that there is `[tabBar setSelectedImageTintColor:[UIColor]]` which is great, but how do I set the imagetintcolor for the offstate? I can't seem to find a `[tabBar setImageTintColor]` or `[tabBar setUnSelectedImageTintColor]`. | 2012/06/02 | [
"https://Stackoverflow.com/questions/10862778",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27305/"
] | Take a look at the "Managing the Finished and Selected Image" task's section of the docs of [UITabBarItem](https://developer.apple.com/library/IOs/ipad/#documentation/UIKit/Reference/UITabBarItem_Class/Reference/Reference.html). | And for a quick cut 'n paste:
```
NSArray *tabBarImages = [[NSArray alloc] initWithObjects:@"tab_a.png",
@"tab_b.png",
@"tab_c.png",
@"tab_d.png",
@"tab_e.png",
nil];
for (uint i=0;i<[_tabBarCo... |
2,582,129 | I have a sketch of proof of irrationality of $\sqrt2$ due to Marcin Mazur. It is asupposed that $\sqrt2=\frac ab$ where $a$ is the smallest positive numerator that $\sqrt 2$ can have as a fraction. Since $\sqrt2=\frac{-4\sqrt2+6}{3\sqrt2-4}$, we have $\sqrt 2=\frac{4a-6b}{4b-3a}$. In order to get a contradiction we use... | 2017/12/27 | [
"https://math.stackexchange.com/questions/2582129",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | I think you have a mistake in the argument. You need to start with the equation $$\sqrt{2}=\frac{6b-4a}{3a-4b}\tag{1}$$ Note that $4/3<\sqrt{2}=a/b<3/2$ and hence the integers $6b-4a$ and $3a-4b$ are positive. Further it should be noticed that $3a-4b<b$ because $a/b<5/3$. It follows that if we have positive integers $a... | I believe this is how one could do it. Assume that $0 < 4a − 6b$. Then,
\begin{align\*}
0 &< 4a - 6b \\
6b &< 4a \\
\frac{3}{2} &< \frac{a}{b} = \sqrt{2} \\
\implies \frac{9}{4} &< 2 = \frac{8}{4}
\end{align\*}
which is clearly not true. Thus, $0 \nless 4a − 6b$. |
9,226,032 | I'm writing a script in Python for Linux that should suspend process when given conditions are met and later resume it. To do so I'm using psutil (http://code.google.com/p/psutil).
The problem I encountered is rather strange. When I use python command line, everything works fine - process is suspended and later resumed... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9226032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1192062/"
] | I know its an old entry but for the ones who encountered this problem recently,
this code works fine for me (Python 3.7.3) :
```
psutil.Process(pid=19931).suspend()
```
And similarly
```
psutil.Process(pid=19931).resume()
```
But you have to be sure that referred process is still alive. | The first thing I would suspect when Python behaves differently under the interactive shell and executing a script would be running different versions of Python. This can easily happen when you point to an interpreter in your script file with something like:
```
#!/usr/bin/python
```
This is a long shot since, accor... |
5,761,189 | I have enabled the XSendFile module in Apache 2 running on Ubuntu 10.04. I have added the `XSendFile on` directive and restarted the Apache server successfully. When I add the `XSendFilePath /path/to/dir` directive and restart Apache I get the following error:
*Invalid command 'XSendFilePath', perhaps misspelled or de... | 2011/04/23 | [
"https://Stackoverflow.com/questions/5761189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412569/"
] | On 10.04 Lucid, the version of XSendFile installed by apt by default is 0.9.2:
<http://packages.ubuntu.com/lucid/libapache2-mod-xsendfile>
The directive XSendFilePath replaced XSendFileAllowAbove in version 0.1.0, so for 0.9.2:
<https://tn123.org/mod_xsendfile/>
Try using XSendFileAllowAbove if you're on anything l... | Do you have the x-sendfile module installed and enabled in apache? Run "apachectl -M" to see a list of all of modules. You may have to build it, see <https://tn123.org/mod_xsendfile/> |
29,066,801 | How do I create a custom back button on one of my storyboards, when I do a segue and I say push it creates a back button on Mac with but when I do a modal or model it does not create a back button? | 2015/03/15 | [
"https://Stackoverflow.com/questions/29066801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4350822/"
] | Modally presented view controllers do not automatically get close buttons.
`self.navigationController.leftBarButtonItem = ...`
A pushed view controller will automatically create a back button if the navigation controller is shown. | You will have to create your own back button. In the view controller that you have presented via the modal transition, you have to put a toolbar on it. Put it at the top and if using autolayout set the constraints top, both sides and height. Then place a barbuttonitem in the toolbar. You can select a system button like... |
29,066,801 | How do I create a custom back button on one of my storyboards, when I do a segue and I say push it creates a back button on Mac with but when I do a modal or model it does not create a back button? | 2015/03/15 | [
"https://Stackoverflow.com/questions/29066801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4350822/"
] | Modally presented view controllers do not automatically get close buttons.
`self.navigationController.leftBarButtonItem = ...`
A pushed view controller will automatically create a back button if the navigation controller is shown. | As Douglas explained, you need to create property of the button (UIButton or BarButtonItem) and in the viewcontroller .m file connect
```
- (IBAction)backButton:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
```
with the button. This will dismiss the current view controller and bring y... |
901,117 | **I have asked this question on SO, but they suggested, the question is better suited for Superuser.**
I installed Python 2.7.9 on Windows 7. It is supposed to have pip built-in. However, during Python installation, pip setup failed. I tried to install pip using get-pip.py, but it also failed giving the following err... | 2015/04/13 | [
"https://superuser.com/questions/901117",
"https://superuser.com",
"https://superuser.com/users/437174/"
] | 1. Ensure that you are logged in with user "ali" and have write access to the folder c:\users\ali\appdata\local\temp\tmpe8llat\
2. Uninstall existing Python 2.7.9 files
3. Download and reinstall 2.7.9 files | I found that this error does not prevent the installation to be successful.
The files pip can't delete are some temporary files I believe. I usually delete them by hand from time to time. |
901,117 | **I have asked this question on SO, but they suggested, the question is better suited for Superuser.**
I installed Python 2.7.9 on Windows 7. It is supposed to have pip built-in. However, during Python installation, pip setup failed. I tried to install pip using get-pip.py, but it also failed giving the following err... | 2015/04/13 | [
"https://superuser.com/questions/901117",
"https://superuser.com",
"https://superuser.com/users/437174/"
] | Exit all python related process and try again.
pip cannot delete files which is currently using. | 1. Ensure that you are logged in with user "ali" and have write access to the folder c:\users\ali\appdata\local\temp\tmpe8llat\
2. Uninstall existing Python 2.7.9 files
3. Download and reinstall 2.7.9 files |
901,117 | **I have asked this question on SO, but they suggested, the question is better suited for Superuser.**
I installed Python 2.7.9 on Windows 7. It is supposed to have pip built-in. However, during Python installation, pip setup failed. I tried to install pip using get-pip.py, but it also failed giving the following err... | 2015/04/13 | [
"https://superuser.com/questions/901117",
"https://superuser.com",
"https://superuser.com/users/437174/"
] | Exit all python related process and try again.
pip cannot delete files which is currently using. | I found that this error does not prevent the installation to be successful.
The files pip can't delete are some temporary files I believe. I usually delete them by hand from time to time. |
61,630,317 | I have a database with more tables and I have to check if the name from a selected table is other tables.
For example, let's suppose that our database contains 4 tables(called Laptop1, Laptop2, Laptop3 and Laptop4) and every table define a laptop. So it contains Name, Date, Model. I can select table Laptop1 and I have... | 2020/05/06 | [
"https://Stackoverflow.com/questions/61630317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11569598/"
] | You can use EXCEPT clause to get the laptop names which are not present in other tables.
```sql
SELECT Name FROM Laptop1
EXCEPT
(
SELECT Name FROM Laptop2
UNION ALL
SELECT Name FROM Laptop3
UNION ALL
SELECT Name FROM Laptop4)
```
Ideally, you should not have multiple tables holding laptop information. In relational ... | You can use `not exists`:
```
select l1.*
from laptop1 l1
where
not exists (select 1 from laptop2 l2 where l2.name = l1.name)
and not exists (select 1 from laptop3 l3 where l3.name = l2.name)
and not exists (select 1 from laptop4 l4 where l4.name = l2.name)
``` |
61,630,317 | I have a database with more tables and I have to check if the name from a selected table is other tables.
For example, let's suppose that our database contains 4 tables(called Laptop1, Laptop2, Laptop3 and Laptop4) and every table define a laptop. So it contains Name, Date, Model. I can select table Laptop1 and I have... | 2020/05/06 | [
"https://Stackoverflow.com/questions/61630317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11569598/"
] | You can use EXCEPT clause to get the laptop names which are not present in other tables.
```sql
SELECT Name FROM Laptop1
EXCEPT
(
SELECT Name FROM Laptop2
UNION ALL
SELECT Name FROM Laptop3
UNION ALL
SELECT Name FROM Laptop4)
```
Ideally, you should not have multiple tables holding laptop information. In relational ... | You could indeed use not exists.
But I agree with Zohar Peled : The architecture doesn't seem relevant. You should have all the laptops in the same table.
Don't forget that checking not exists is gonna cost much IO specially if using a varchar.
If you still go this way :
- check your indexes. You will probably need a... |
61,630,317 | I have a database with more tables and I have to check if the name from a selected table is other tables.
For example, let's suppose that our database contains 4 tables(called Laptop1, Laptop2, Laptop3 and Laptop4) and every table define a laptop. So it contains Name, Date, Model. I can select table Laptop1 and I have... | 2020/05/06 | [
"https://Stackoverflow.com/questions/61630317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11569598/"
] | You can use EXCEPT clause to get the laptop names which are not present in other tables.
```sql
SELECT Name FROM Laptop1
EXCEPT
(
SELECT Name FROM Laptop2
UNION ALL
SELECT Name FROM Laptop3
UNION ALL
SELECT Name FROM Laptop4)
```
Ideally, you should not have multiple tables holding laptop information. In relational ... | For a real database, you should work on fixing it. Barring that, I would recommend creating a view in the database:
```
create view v_laptops as
select name, date, model, 1 as which from laptop1 union all
select name, date, model, 2 from laptop2 union all
select name, date, model, 3 from laptop3 union all
... |
20,551,026 | I got an array with elements:
```
set interfaces ge-1/0/2 unit 108 family inet address 10.187.132.227/27 vrrp-group 8 virtual-address 10.187.132.225
set interfaces ge-1/0/2 unit 108 family inet address 10.187.132.227/27 vrrp-group 8 priority 200
set interfaces ge-1/0/2 unit 108 family inet address 10.187.132.227/27 vr... | 2013/12/12 | [
"https://Stackoverflow.com/questions/20551026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2177887/"
] | ```
my @array = ...
my @strings = map {/address\s*(.*?)\s*vrrp-group/ ? $1 : ()} @array;
``` | Presuming each line is an element, `split` each element on spaces to turn it into an array, the look in the relevant array element. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | Last FM's [album.getInfo](http://www.last.fm/api/show/album.getInfo) API call offers images in four different sizes and can be searched using names or [musicbrainz](http://musicbrainz.org/) IDs. Output can be XML/JSON/JSONP. | Other than the Cover Art Archive the only other approachably "free" and unlimited resource is Wikipedia: <http://www.onemusicapi.com/blog/2014/09/10/querying-wikipedia-album-artwork/>
You can use DBpedia to search for the album, then use the Wikimedia APIs to actually download the image. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | Last.fm isn't completely free and unlimited
"Last.fm reserves the right to share in revenue generated from your use of Last.fm Data in future on terms to be negotiated in good faith between Last.fm and You."
Discovered the FreeCover website API a few minutes ago searching for the same thing:
<http://www.freecovers.net... | Other than the Cover Art Archive the only other approachably "free" and unlimited resource is Wikipedia: <http://www.onemusicapi.com/blog/2014/09/10/querying-wikipedia-album-artwork/>
You can use DBpedia to search for the album, then use the Wikimedia APIs to actually download the image. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | How about [Discogs](http://www.discogs.com/help/forums/topic/167057), or [Amazon](http://explodingpixels.wordpress.com/2008/06/24/getting-album-art-using-amazon-web-services/) or seeing what [Cover Fetcher](http://linux.softpedia.com/get/Multimedia/Audio/amaroK-Scripts/Cover-Fetcher-39314.shtml) does? | Last FM's [album.getInfo](http://www.last.fm/api/show/album.getInfo) API call offers images in four different sizes and can be searched using names or [musicbrainz](http://musicbrainz.org/) IDs. Output can be XML/JSON/JSONP. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | Last.FM provides an API for getting art but you can't actually use it in publicly distributed applications. They said that the recording companies own the art and they aren't licensed to distribute it. Huh? Why the API then? I don't get it. | Other than the Cover Art Archive the only other approachably "free" and unlimited resource is Wikipedia: <http://www.onemusicapi.com/blog/2014/09/10/querying-wikipedia-album-artwork/>
You can use DBpedia to search for the album, then use the Wikimedia APIs to actually download the image. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | Musicbrainz and the Internet Archive offer the [Cover Art Archive](http://coverartarchive.org/) but you do need to request using the album's [MBID](http://musicbrainz.org/doc/MBID). | Last FM's [album.getInfo](http://www.last.fm/api/show/album.getInfo) API call offers images in four different sizes and can be searched using names or [musicbrainz](http://musicbrainz.org/) IDs. Output can be XML/JSON/JSONP. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | How about [Discogs](http://www.discogs.com/help/forums/topic/167057), or [Amazon](http://explodingpixels.wordpress.com/2008/06/24/getting-album-art-using-amazon-web-services/) or seeing what [Cover Fetcher](http://linux.softpedia.com/get/Multimedia/Audio/amaroK-Scripts/Cover-Fetcher-39314.shtml) does? | Last.fm isn't completely free and unlimited
"Last.fm reserves the right to share in revenue generated from your use of Last.fm Data in future on terms to be negotiated in good faith between Last.fm and You."
Discovered the FreeCover website API a few minutes ago searching for the same thing:
<http://www.freecovers.net... |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | Last.FM provides an API for getting art but you can't actually use it in publicly distributed applications. They said that the recording companies own the art and they aren't licensed to distribute it. Huh? Why the API then? I don't get it. | Last FM's [album.getInfo](http://www.last.fm/api/show/album.getInfo) API call offers images in four different sizes and can be searched using names or [musicbrainz](http://musicbrainz.org/) IDs. Output can be XML/JSON/JSONP. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | Musicbrainz and the Internet Archive offer the [Cover Art Archive](http://coverartarchive.org/) but you do need to request using the album's [MBID](http://musicbrainz.org/doc/MBID). | Other than the Cover Art Archive the only other approachably "free" and unlimited resource is Wikipedia: <http://www.onemusicapi.com/blog/2014/09/10/querying-wikipedia-album-artwork/>
You can use DBpedia to search for the album, then use the Wikimedia APIs to actually download the image. |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | Last.FM provides an API for getting art but you can't actually use it in publicly distributed applications. They said that the recording companies own the art and they aren't licensed to distribute it. Huh? Why the API then? I don't get it. | Last.fm isn't completely free and unlimited
"Last.fm reserves the right to share in revenue generated from your use of Last.fm Data in future on terms to be negotiated in good faith between Last.fm and You."
Discovered the FreeCover website API a few minutes ago searching for the same thing:
<http://www.freecovers.net... |
7,543,575 | I have been puzzled by the problem for several days: the task tags(TODO FIXME XXX and etc.) disappeared in tasks view in my working java project. What strange is this problem did not occur if a create a new project. Perhaps that's because I changed some configuration of my working project, but I can not figure out what... | 2011/09/25 | [
"https://Stackoverflow.com/questions/7543575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486005/"
] | How about [Discogs](http://www.discogs.com/help/forums/topic/167057), or [Amazon](http://explodingpixels.wordpress.com/2008/06/24/getting-album-art-using-amazon-web-services/) or seeing what [Cover Fetcher](http://linux.softpedia.com/get/Multimedia/Audio/amaroK-Scripts/Cover-Fetcher-39314.shtml) does? | Musicbrainz and the Internet Archive offer the [Cover Art Archive](http://coverartarchive.org/) but you do need to request using the album's [MBID](http://musicbrainz.org/doc/MBID). |
30,755,434 | I am building a app in ionic, i am trying to get external restful api data into the view via a controller, but there seems to be something wrong with my controller because nothing is being pulled in?
my code is:
```js
angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(func... | 2015/06/10 | [
"https://Stackoverflow.com/questions/30755434",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323982/"
] | Solution to this:
```
$http.get('http://jsonplaceholder.typicode.com/posts')
.success(function(results){
$scope.posts = results.posts;
console.log($scope.posts);
});
```
You were using `data` but there isn't `data` in the results. Look at the console, and you should see objects now.
[Working codepen](http:/... | you have made 2 mistakes in your code:
**First:** once you define 'item' in ng-repeat you should use it to bind your object key "title":
```
ng-repeat='item in posts'
```
>
> 'item' is now holding your JSON keys.
>
>
>
```
<h2>{{item.title}}</h2>
```
**Second:** reviewing *jsonplaceholder* JSON you are call... |
58,933,826 | Cypress: I want to find an element from the list of an element based on text and want to click on that
```
cy.get('partie-room-list-item > div > div.content-block > span.partie-title').each(($elm , i) => {
cy.get($elm).invoke('text').then((text) => {
if (text === 'textinelement') {
... | 2019/11/19 | [
"https://Stackoverflow.com/questions/58933826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6360775/"
] | Could you try below code and let me know the outcome. You could used `.text()` to get the text from the span element.
```
cy.get('partie-room-list-item > div > div > .partie-title').each(ele => {
const eleText = "cypresssendfollowRequest";
if (ele.text() === eleText) {
ele.click()... | ```
it("This test is for selecting a single element based on text",()=>{
cy.visit('http://automationpractice.com/index.php')
cy.get("[title='Women']").each(($element, index)=>{
console.log("Object is "+ $element.text())
if($element.text()=='Women'){
cy.get($element).click()
}... |
58,933,826 | Cypress: I want to find an element from the list of an element based on text and want to click on that
```
cy.get('partie-room-list-item > div > div.content-block > span.partie-title').each(($elm , i) => {
cy.get($elm).invoke('text').then((text) => {
if (text === 'textinelement') {
... | 2019/11/19 | [
"https://Stackoverflow.com/questions/58933826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6360775/"
] | Could you try below code and let me know the outcome. You could used `.text()` to get the text from the span element.
```
cy.get('partie-room-list-item > div > div > .partie-title').each(ele => {
const eleText = "cypresssendfollowRequest";
if (ele.text() === eleText) {
ele.click()... | You want to use `cy.contains()` ([see documentation](https://docs.cypress.io/api/commands/contains)).
For example:
```js
cy.contains('textinelement').click();
```
You can also add specificity so it only looks for text within a specified selector:
```js
cy.contains('.partie-title', 'textinelement').click();
``` |
58,933,826 | Cypress: I want to find an element from the list of an element based on text and want to click on that
```
cy.get('partie-room-list-item > div > div.content-block > span.partie-title').each(($elm , i) => {
cy.get($elm).invoke('text').then((text) => {
if (text === 'textinelement') {
... | 2019/11/19 | [
"https://Stackoverflow.com/questions/58933826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6360775/"
] | I am just guessing here. If you post your HTML I might be able to help you
```
cy.get('.partie-title').contains('textinelement').click()
```
looking at your image it would be like this
```
cy.get('.partie-title').contains('cypresssendfollowRequest').click()
``` | ```
it("This test is for selecting a single element based on text",()=>{
cy.visit('http://automationpractice.com/index.php')
cy.get("[title='Women']").each(($element, index)=>{
console.log("Object is "+ $element.text())
if($element.text()=='Women'){
cy.get($element).click()
}... |
58,933,826 | Cypress: I want to find an element from the list of an element based on text and want to click on that
```
cy.get('partie-room-list-item > div > div.content-block > span.partie-title').each(($elm , i) => {
cy.get($elm).invoke('text').then((text) => {
if (text === 'textinelement') {
... | 2019/11/19 | [
"https://Stackoverflow.com/questions/58933826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6360775/"
] | I am just guessing here. If you post your HTML I might be able to help you
```
cy.get('.partie-title').contains('textinelement').click()
```
looking at your image it would be like this
```
cy.get('.partie-title').contains('cypresssendfollowRequest').click()
``` | You want to use `cy.contains()` ([see documentation](https://docs.cypress.io/api/commands/contains)).
For example:
```js
cy.contains('textinelement').click();
```
You can also add specificity so it only looks for text within a specified selector:
```js
cy.contains('.partie-title', 'textinelement').click();
``` |
58,933,826 | Cypress: I want to find an element from the list of an element based on text and want to click on that
```
cy.get('partie-room-list-item > div > div.content-block > span.partie-title').each(($elm , i) => {
cy.get($elm).invoke('text').then((text) => {
if (text === 'textinelement') {
... | 2019/11/19 | [
"https://Stackoverflow.com/questions/58933826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6360775/"
] | ```
it("This test is for selecting a single element based on text",()=>{
cy.visit('http://automationpractice.com/index.php')
cy.get("[title='Women']").each(($element, index)=>{
console.log("Object is "+ $element.text())
if($element.text()=='Women'){
cy.get($element).click()
}... | You want to use `cy.contains()` ([see documentation](https://docs.cypress.io/api/commands/contains)).
For example:
```js
cy.contains('textinelement').click();
```
You can also add specificity so it only looks for text within a specified selector:
```js
cy.contains('.partie-title', 'textinelement').click();
``` |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | I found a solution that works for the specific case given:
```
>>> pp2 = pp.buffer(0)
>>> pp2.is_valid
True
>>> pp2.exterior.coords[:]
[(0.0, 0.0), (0.0, 3.0), (3.0, 3.0), (3.0, 0.0), (2.0, 0.0), (0.0, 0.0)]
>>> pp2.interiors[0].coords[:]
[(2.0, 1.0), (2.0, 2.0), (1.0, 2.0), (1.0, 1.0), (2.0, 1.0)]
``` | I have used the .buffer(0) method a lot, but it gave different results on Windows and on Linux. Therefore if you encounter such a problem, remember that:
**Warning**: The .buffer(0) function of shapely may behave different on different operating systems, i.e. Windows and Linux. I had examples, where on Linux an empty ... |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | I found a solution that works for the specific case given:
```
>>> pp2 = pp.buffer(0)
>>> pp2.is_valid
True
>>> pp2.exterior.coords[:]
[(0.0, 0.0), (0.0, 3.0), (3.0, 3.0), (3.0, 0.0), (2.0, 0.0), (0.0, 0.0)]
>>> pp2.interiors[0].coords[:]
[(2.0, 1.0), (2.0, 2.0), (1.0, 2.0), (1.0, 1.0), (2.0, 1.0)]
``` | Untested, but it appears that Shapely have added a function to support this now.
<https://shapely.readthedocs.io/en/latest/manual.html#validation.make_valid> |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | Shapely implemented a solution for this. Through pip you can use any shapely version >= 1.8a3 and import this way:
```py
from shapely.validation import make_valid
```
The current version of shapely available via pip and conda includes the `make_valid` function. If you need to install an older version of shapely, you... | This is my first attempt at a fix geometry function. I had to handle the special case where a polygons are converted to multipolygons, where `make_valid` doesn't work b/c `len(make_valid(feature)) !=1`.
```py
from shapely.validation import make_valid
def fix_geom(in_feature):
# avoid changing original geodf
... |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | I found a solution that works for the specific case given:
```
>>> pp2 = pp.buffer(0)
>>> pp2.is_valid
True
>>> pp2.exterior.coords[:]
[(0.0, 0.0), (0.0, 3.0), (3.0, 3.0), (3.0, 0.0), (2.0, 0.0), (0.0, 0.0)]
>>> pp2.interiors[0].coords[:]
[(2.0, 1.0), (2.0, 2.0), (1.0, 2.0), (1.0, 1.0), (2.0, 1.0)]
``` | Shapely implemented a solution for this. Through pip you can use any shapely version >= 1.8a3 and import this way:
```py
from shapely.validation import make_valid
```
The current version of shapely available via pip and conda includes the `make_valid` function. If you need to install an older version of shapely, you... |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | I found a solution that works for the specific case given:
```
>>> pp2 = pp.buffer(0)
>>> pp2.is_valid
True
>>> pp2.exterior.coords[:]
[(0.0, 0.0), (0.0, 3.0), (3.0, 3.0), (3.0, 0.0), (2.0, 0.0), (0.0, 0.0)]
>>> pp2.interiors[0].coords[:]
[(2.0, 1.0), (2.0, 2.0), (1.0, 2.0), (1.0, 1.0), (2.0, 1.0)]
``` | simplest solution
```
new_polygon = pp.buffer(0)
new_polygon.is_valid
```
maybe it would be work. |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | Shapely implemented a solution for this. Through pip you can use any shapely version >= 1.8a3 and import this way:
```py
from shapely.validation import make_valid
```
The current version of shapely available via pip and conda includes the `make_valid` function. If you need to install an older version of shapely, you... | Untested, but it appears that Shapely have added a function to support this now.
<https://shapely.readthedocs.io/en/latest/manual.html#validation.make_valid> |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | I found a solution that works for the specific case given:
```
>>> pp2 = pp.buffer(0)
>>> pp2.is_valid
True
>>> pp2.exterior.coords[:]
[(0.0, 0.0), (0.0, 3.0), (3.0, 3.0), (3.0, 0.0), (2.0, 0.0), (0.0, 0.0)]
>>> pp2.interiors[0].coords[:]
[(2.0, 1.0), (2.0, 2.0), (1.0, 2.0), (1.0, 1.0), (2.0, 1.0)]
``` | This is my first attempt at a fix geometry function. I had to handle the special case where a polygons are converted to multipolygons, where `make_valid` doesn't work b/c `len(make_valid(feature)) !=1`.
```py
from shapely.validation import make_valid
def fix_geom(in_feature):
# avoid changing original geodf
... |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | simplest solution
```
new_polygon = pp.buffer(0)
new_polygon.is_valid
```
maybe it would be work. | This is my first attempt at a fix geometry function. I had to handle the special case where a polygons are converted to multipolygons, where `make_valid` doesn't work b/c `len(make_valid(feature)) !=1`.
```py
from shapely.validation import make_valid
def fix_geom(in_feature):
# avoid changing original geodf
... |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | Shapely implemented a solution for this. Through pip you can use any shapely version >= 1.8a3 and import this way:
```py
from shapely.validation import make_valid
```
The current version of shapely available via pip and conda includes the `make_valid` function. If you need to install an older version of shapely, you... | I have used the .buffer(0) method a lot, but it gave different results on Windows and on Linux. Therefore if you encounter such a problem, remember that:
**Warning**: The .buffer(0) function of shapely may behave different on different operating systems, i.e. Windows and Linux. I had examples, where on Linux an empty ... |
20,833,359 | I came across this [post](https://stackoverflow.com/questions/9428780/how-to-start-a-bundle-on-boot-in-apache-karaf) but it doesn't quite answer my question. I am using blueprint to set up a H2 database in Karaf and it requires that I first install H2 driver and OSGi enterprise package because it contains JDBC library.... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20833359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149002/"
] | Untested, but it appears that Shapely have added a function to support this now.
<https://shapely.readthedocs.io/en/latest/manual.html#validation.make_valid> | This is my first attempt at a fix geometry function. I had to handle the special case where a polygons are converted to multipolygons, where `make_valid` doesn't work b/c `len(make_valid(feature)) !=1`.
```py
from shapely.validation import make_valid
def fix_geom(in_feature):
# avoid changing original geodf
... |
16,718 | I am proof-reading a short CV that details an employee's volunteer achievements. It will form part of an application for a committee position. The following sentence makes my brain itch, but I am having trouble deciding:
1. Why it sounds wrong (something with the tense, I think)
2. How it *should* be written
>
> I a... | 2011/03/17 | [
"https://english.stackexchange.com/questions/16718",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/1009/"
] | Perhaps
>
> I was fortunate to be named chair of this board shortly after I joined.
>
>
>
Or, if you don't want to emphasize how lucky you were,
>
> I was named chair of this board shortly after I joined.
>
>
> | If it is tense/aspect that you are after, then maybe:
>
> I am fortunate to have been named as chair of this board shortly after I had joined.
>
>
>
The simple past of 'I joined' doesn't stick it in sequence very definitively (the 'shortly after' does of course). |
16,718 | I am proof-reading a short CV that details an employee's volunteer achievements. It will form part of an application for a committee position. The following sentence makes my brain itch, but I am having trouble deciding:
1. Why it sounds wrong (something with the tense, I think)
2. How it *should* be written
>
> I a... | 2011/03/17 | [
"https://english.stackexchange.com/questions/16718",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/1009/"
] | Perhaps
>
> I was fortunate to be named chair of this board shortly after I joined.
>
>
>
Or, if you don't want to emphasize how lucky you were,
>
> I was named chair of this board shortly after I joined.
>
>
> | I was fortunate to be named chair of the board shortly after I joined. |
16,718 | I am proof-reading a short CV that details an employee's volunteer achievements. It will form part of an application for a committee position. The following sentence makes my brain itch, but I am having trouble deciding:
1. Why it sounds wrong (something with the tense, I think)
2. How it *should* be written
>
> I a... | 2011/03/17 | [
"https://english.stackexchange.com/questions/16718",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/1009/"
] | Perhaps
>
> I was fortunate to be named chair of this board shortly after I joined.
>
>
>
Or, if you don't want to emphasize how lucky you were,
>
> I was named chair of this board shortly after I joined.
>
>
> | It sounds like you have [the worm](http://www.sourcetext.com/grammarian/less-than-words-can-say/01.htm). This sentence has an overly formal sound to it. Try this:
>
> Fortunately, I became chair of the board once I joined.
>
>
> |
36,805,422 | What could be a possible example use of destroy method in a real world application? Why would a running application want to destroy its beans? If the beans are created by the spring container for the web application by, say, ContextLoaderListener, then how can these beans be recreated, because the container already sta... | 2016/04/23 | [
"https://Stackoverflow.com/questions/36805422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1539343/"
] | One example would be a `DataSource` or any resource that needs clean up. you might have something like this:
```
@Bean(destroyMethod = "close")
DataSource dataSource() {
....
}
```
This can be especially important in environments with multiple classloaders like an application server to prevent memory leaks.
It is ... | bellow is my views:
>
> What could be a possible example use of destroy method in a real world application?
>
>
>
For most applications, maybe we focus on real businesses mostly, so we won't often meet the scenes where need to define **destroy method**. But when you meet some basic components or middlewares, you ... |
36,805,422 | What could be a possible example use of destroy method in a real world application? Why would a running application want to destroy its beans? If the beans are created by the spring container for the web application by, say, ContextLoaderListener, then how can these beans be recreated, because the container already sta... | 2016/04/23 | [
"https://Stackoverflow.com/questions/36805422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1539343/"
] | One example would be a `DataSource` or any resource that needs clean up. you might have something like this:
```
@Bean(destroyMethod = "close")
DataSource dataSource() {
....
}
```
This can be especially important in environments with multiple classloaders like an application server to prevent memory leaks.
It is ... | I have seen beans in a Spring application that either directly or indirectly started non daemon threads. Then it became impossible to stop the process without killing the process. This affected some Jenkins jobs that handled automated testing. So there are plenty of real world examples especially in a DevOps world |
36,805,422 | What could be a possible example use of destroy method in a real world application? Why would a running application want to destroy its beans? If the beans are created by the spring container for the web application by, say, ContextLoaderListener, then how can these beans be recreated, because the container already sta... | 2016/04/23 | [
"https://Stackoverflow.com/questions/36805422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1539343/"
] | bellow is my views:
>
> What could be a possible example use of destroy method in a real world application?
>
>
>
For most applications, maybe we focus on real businesses mostly, so we won't often meet the scenes where need to define **destroy method**. But when you meet some basic components or middlewares, you ... | I have seen beans in a Spring application that either directly or indirectly started non daemon threads. Then it became impossible to stop the process without killing the process. This affected some Jenkins jobs that handled automated testing. So there are plenty of real world examples especially in a DevOps world |
15,524,099 | I have a strange bug when i use **Math.floor** function on double values incremented of **0.1** each time.
It happens only with an increment of 0.1 and start at value 5
Exemple : math.floor(4) return **4** but math.floor(5) return **4** !!!
You can try it yourself, with this simple piece of code :
```
for i=3,7,0.1... | 2013/03/20 | [
"https://Stackoverflow.com/questions/15524099",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029976/"
] | I don't really understand what you are trying to do, but global variables are almost definitely not the way to go. just pass the variable as a parameter:
```
function test()
n1 = [1 2 3];
for x=1:10
n1 = f_up(n1,x);
end
end
function arg3 = f_up(arg1,arg2)
arg3 = [arg1 ... | EDIT: Consider this question for a discussion of your actual problem: [How to modify an array in function?](https://stackoverflow.com/questions/4137905/how-to-modify-an-array-in-function)
I think what you want to do is *call by reference*, the usage of a global variable is *unnecessary*.
You have a variable `x`, you... |
33,614,355 | I would like some help with this regex in Javascript I'm working with where users type a ticket number into chat.
I am working with the following possibilities and the regex `TTN-\d{1,4}?([0-9]{1,9})`.
The number of digits possible is 10 but sometimes users will not include the leading zeroes so I need to be sure t... | 2015/11/09 | [
"https://Stackoverflow.com/questions/33614355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/875203/"
] | Use word boundaries.
```
TTN-(\d{1,10})\b
```
`\d{1,10}` matches 1 to 10 digit chars.
`\b` word boundary which matches between a word character and a non-word character. | Don't allow a digit after up to 10.
`TTN-(\d{1,10})(?!\d)` |
22,423,274 | My problem is that after I launch my app on emulator, it writes "unfortunately, appname has stopped". Eclipse doesnt show that there are any mistakes. I know I can somehow fix them using LogCat, but unfortunately Im totally new to eclipse and Im not sure how exactly to do it. So tell me plese what are my mistakes, and ... | 2014/03/15 | [
"https://Stackoverflow.com/questions/22423274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3389712/"
] | ```
ComponentInfo{com.gosha.bux/com.gosha.bux.MainActivity}: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
```
Solution 1:
Replace Button with ImageButton
```
ImageButton first = (ImageButton)findViewById(R.id.button1);
```
Solution 2:
In your Layout change ImageB... | try:
```
ImageButton first = (ImageButton)findViewById(R.id.button1);
```
If this doesnt work try to refresh your project. |
22,423,274 | My problem is that after I launch my app on emulator, it writes "unfortunately, appname has stopped". Eclipse doesnt show that there are any mistakes. I know I can somehow fix them using LogCat, but unfortunately Im totally new to eclipse and Im not sure how exactly to do it. So tell me plese what are my mistakes, and ... | 2014/03/15 | [
"https://Stackoverflow.com/questions/22423274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3389712/"
] | ```
ComponentInfo{com.gosha.bux/com.gosha.bux.MainActivity}: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
```
Solution 1:
Replace Button with ImageButton
```
ImageButton first = (ImageButton)findViewById(R.id.button1);
```
Solution 2:
In your Layout change ImageB... | ```
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gosha.bux/com.gosha.bux.MainActivity}: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
```
suggests that you're casting an `ImageButton` to a `Button`. Is it possible that your `R.id.button1` is... |
22,423,274 | My problem is that after I launch my app on emulator, it writes "unfortunately, appname has stopped". Eclipse doesnt show that there are any mistakes. I know I can somehow fix them using LogCat, but unfortunately Im totally new to eclipse and Im not sure how exactly to do it. So tell me plese what are my mistakes, and ... | 2014/03/15 | [
"https://Stackoverflow.com/questions/22423274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3389712/"
] | ```
ComponentInfo{com.gosha.bux/com.gosha.bux.MainActivity}: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
```
Solution 1:
Replace Button with ImageButton
```
ImageButton first = (ImageButton)findViewById(R.id.button1);
```
Solution 2:
In your Layout change ImageB... | change this code
```
Button first;
setContentView(R.layout.activity_main);
first = (Button)findViewById(R.id.button1);
```
to
```
ImageButton first;
setContentView(R.layout.activity_main);
first = (ImageButton)findViewById(R.id.button1);
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.