qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
1,606,940 | >
> Find all solutions between $-2\pi$ and $2\pi$ of the following equation:
> $$\cos \theta = −\frac{1}{\sqrt{2}}$$
> Give all answers in radians.
>
>
>
Now I have drawn the graph between $−2\pi$ and $2\pi$.
Am I correct thinking that $\cos \theta = 2\pi - \theta$?
I am completely at a loss of where to draw ... | 2016/01/10 | [
"https://math.stackexchange.com/questions/1606940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/303221/"
] | Well, it helps to notice that the function doesn't exist for $x\le-1$.
Also, you may also notice that it doesn't exist for $\sin(x)=-1$, which results in $x\ne(2n-1)\pi, n=0,\pm1,\pm2,\pm3,\dots$
The best way I see tackling this is with L'Hospital's rule:
$$L=\lim\_{x\to 0}\frac{\sin(\ln(x+1))-\ln(\sin(x)+1)}{\sin^4... | Hint:
$\sin^4(\frac{x}{2})$~$(\frac{x}{2})^4$
$\sin(\ln(x+1)) = \ln(x+1)-\frac{\ln^3(x+1)}{6}+o(x^4)$ |
1,606,940 | >
> Find all solutions between $-2\pi$ and $2\pi$ of the following equation:
> $$\cos \theta = −\frac{1}{\sqrt{2}}$$
> Give all answers in radians.
>
>
>
Now I have drawn the graph between $−2\pi$ and $2\pi$.
Am I correct thinking that $\cos \theta = 2\pi - \theta$?
I am completely at a loss of where to draw ... | 2016/01/10 | [
"https://math.stackexchange.com/questions/1606940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/303221/"
] | It's easiest to use Taylor expansions about $x = 0$. First the denominator to leading order, so we can tell how many terms are needed:
$$
\sin\left(\frac{x}{2}\right)^4 = \frac{x^4}{16} + O(x^6)
$$
So we need expansions to this order also for the numerator:
$$
\sin(\ln(x+1)) = x-\frac{x^2}{2}+\frac{x^3}{6}-\frac{x^5}{1... | Well, it helps to notice that the function doesn't exist for $x\le-1$.
Also, you may also notice that it doesn't exist for $\sin(x)=-1$, which results in $x\ne(2n-1)\pi, n=0,\pm1,\pm2,\pm3,\dots$
The best way I see tackling this is with L'Hospital's rule:
$$L=\lim\_{x\to 0}\frac{\sin(\ln(x+1))-\ln(\sin(x)+1)}{\sin^4... |
1,606,940 | >
> Find all solutions between $-2\pi$ and $2\pi$ of the following equation:
> $$\cos \theta = −\frac{1}{\sqrt{2}}$$
> Give all answers in radians.
>
>
>
Now I have drawn the graph between $−2\pi$ and $2\pi$.
Am I correct thinking that $\cos \theta = 2\pi - \theta$?
I am completely at a loss of where to draw ... | 2016/01/10 | [
"https://math.stackexchange.com/questions/1606940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/303221/"
] | $$\begin{align}\sin{\log{(1+x)}} &= \sin{\left (x - \frac12 x^2 + \frac13 x^3 - \cdots \right )} \\ &= \left (x - \frac12 x^2 + \frac13 x^3 - \cdots \right ) - \frac16 \left (x - \frac12 x^2 + \frac13 x^3 - \cdots \right )^3 + \cdots \\ &= x - \frac12 x^2 + \frac16 x^3 + \left ( \frac32 \cdot \frac16 - \frac14 \right )... | Hint:
$\sin^4(\frac{x}{2})$~$(\frac{x}{2})^4$
$\sin(\ln(x+1)) = \ln(x+1)-\frac{\ln^3(x+1)}{6}+o(x^4)$ |
1,606,940 | >
> Find all solutions between $-2\pi$ and $2\pi$ of the following equation:
> $$\cos \theta = −\frac{1}{\sqrt{2}}$$
> Give all answers in radians.
>
>
>
Now I have drawn the graph between $−2\pi$ and $2\pi$.
Am I correct thinking that $\cos \theta = 2\pi - \theta$?
I am completely at a loss of where to draw ... | 2016/01/10 | [
"https://math.stackexchange.com/questions/1606940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/303221/"
] | It's easiest to use Taylor expansions about $x = 0$. First the denominator to leading order, so we can tell how many terms are needed:
$$
\sin\left(\frac{x}{2}\right)^4 = \frac{x^4}{16} + O(x^6)
$$
So we need expansions to this order also for the numerator:
$$
\sin(\ln(x+1)) = x-\frac{x^2}{2}+\frac{x^3}{6}-\frac{x^5}{1... | Hint:
$\sin^4(\frac{x}{2})$~$(\frac{x}{2})^4$
$\sin(\ln(x+1)) = \ln(x+1)-\frac{\ln^3(x+1)}{6}+o(x^4)$ |
1,606,940 | >
> Find all solutions between $-2\pi$ and $2\pi$ of the following equation:
> $$\cos \theta = −\frac{1}{\sqrt{2}}$$
> Give all answers in radians.
>
>
>
Now I have drawn the graph between $−2\pi$ and $2\pi$.
Am I correct thinking that $\cos \theta = 2\pi - \theta$?
I am completely at a loss of where to draw ... | 2016/01/10 | [
"https://math.stackexchange.com/questions/1606940",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/303221/"
] | It's easiest to use Taylor expansions about $x = 0$. First the denominator to leading order, so we can tell how many terms are needed:
$$
\sin\left(\frac{x}{2}\right)^4 = \frac{x^4}{16} + O(x^6)
$$
So we need expansions to this order also for the numerator:
$$
\sin(\ln(x+1)) = x-\frac{x^2}{2}+\frac{x^3}{6}-\frac{x^5}{1... | $$\begin{align}\sin{\log{(1+x)}} &= \sin{\left (x - \frac12 x^2 + \frac13 x^3 - \cdots \right )} \\ &= \left (x - \frac12 x^2 + \frac13 x^3 - \cdots \right ) - \frac16 \left (x - \frac12 x^2 + \frac13 x^3 - \cdots \right )^3 + \cdots \\ &= x - \frac12 x^2 + \frac16 x^3 + \left ( \frac32 \cdot \frac16 - \frac14 \right )... |
66,441,126 | I need to find persons who works at least 40 years and then I need to upgrade their salary by 50% also after this I need to display their Personname, current date, and updated salary what should I do, I tried but program give me a error?
```
CREATE TABLE date_table (PERSONNAME text, JOBNAME text, HRDATE date, SALARY i... | 2021/03/02 | [
"https://Stackoverflow.com/questions/66441126",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10618070/"
] | Postgres has an `age()` function which will return the interval between its argument and `now()`
Check if the age is > 40 years:
```
select age('1981-01-02'::date)> interval '40 years';
?column?
----------
t
(1 row)
```
Now use this in an update statement:
```
UPDATE date_table
SET salary = (salary * 1.5)::int... | There are some issues with your select statement, causing the error message:
* `empno_table` does not exists in the scope of the example you posted
* `date_part` gets two parameters: 1) the part of the date you want to show, in your case `year`; and 2) date or date column
* `HIREDATE` is not an existing column in the ... |
880,511 | Can I not distribute powers on complex numbers as I do with real numbers?
For example:
Consider
$$\left(\frac{1 + i}{1-i}\right)^n = 1$$
Distributing powers as in real numbers:
$$(1+i)^n = (1 - i)^n$$
Taking log both sides and eliminating $n$ I am left with
$2i = 0$ which is obviously incorrect. So I am lead to believ... | 2014/07/28 | [
"https://math.stackexchange.com/questions/880511",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/161104/"
] | **Hint:** Try writing: $$\frac{1+i}{1-i} = \frac{1+i}{1-i}\cdot\frac{1+i}{1+i}$$ | You can distribute powers. The problem in your reasoning is that you worked like if you were dealing with real numbers when taking logarithms.
As you can see here: <http://en.wikipedia.org/wiki/Complex_logarithm> the principal value of the complex logarithm is defined as:
$$log(z)=log(r)+i\theta$$
If $z=re^{i\theta}... |
880,511 | Can I not distribute powers on complex numbers as I do with real numbers?
For example:
Consider
$$\left(\frac{1 + i}{1-i}\right)^n = 1$$
Distributing powers as in real numbers:
$$(1+i)^n = (1 - i)^n$$
Taking log both sides and eliminating $n$ I am left with
$2i = 0$ which is obviously incorrect. So I am lead to believ... | 2014/07/28 | [
"https://math.stackexchange.com/questions/880511",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/161104/"
] | **Hint:** Try writing: $$\frac{1+i}{1-i} = \frac{1+i}{1-i}\cdot\frac{1+i}{1+i}$$ | Note that $1+i = \sqrt{2} e^{i\pi/4}$ and $1-i = \sqrt{2} e^{-i\pi/4}$, which means $$\frac{1+i}{1-i} = e^{i \pi/2} = i$$ |
880,511 | Can I not distribute powers on complex numbers as I do with real numbers?
For example:
Consider
$$\left(\frac{1 + i}{1-i}\right)^n = 1$$
Distributing powers as in real numbers:
$$(1+i)^n = (1 - i)^n$$
Taking log both sides and eliminating $n$ I am left with
$2i = 0$ which is obviously incorrect. So I am lead to believ... | 2014/07/28 | [
"https://math.stackexchange.com/questions/880511",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/161104/"
] | Two points:
1. The complex $\log$ function is much more complicated than the real $\log$. That is because $a^x=a^y$ does not imply that $x=y$ in the complex numbers.
2. $$\frac{1+i}{1-i} = i$$ | You can distribute powers. The problem in your reasoning is that you worked like if you were dealing with real numbers when taking logarithms.
As you can see here: <http://en.wikipedia.org/wiki/Complex_logarithm> the principal value of the complex logarithm is defined as:
$$log(z)=log(r)+i\theta$$
If $z=re^{i\theta}... |
880,511 | Can I not distribute powers on complex numbers as I do with real numbers?
For example:
Consider
$$\left(\frac{1 + i}{1-i}\right)^n = 1$$
Distributing powers as in real numbers:
$$(1+i)^n = (1 - i)^n$$
Taking log both sides and eliminating $n$ I am left with
$2i = 0$ which is obviously incorrect. So I am lead to believ... | 2014/07/28 | [
"https://math.stackexchange.com/questions/880511",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/161104/"
] | Two points:
1. The complex $\log$ function is much more complicated than the real $\log$. That is because $a^x=a^y$ does not imply that $x=y$ in the complex numbers.
2. $$\frac{1+i}{1-i} = i$$ | Note that $1+i = \sqrt{2} e^{i\pi/4}$ and $1-i = \sqrt{2} e^{-i\pi/4}$, which means $$\frac{1+i}{1-i} = e^{i \pi/2} = i$$ |
880,511 | Can I not distribute powers on complex numbers as I do with real numbers?
For example:
Consider
$$\left(\frac{1 + i}{1-i}\right)^n = 1$$
Distributing powers as in real numbers:
$$(1+i)^n = (1 - i)^n$$
Taking log both sides and eliminating $n$ I am left with
$2i = 0$ which is obviously incorrect. So I am lead to believ... | 2014/07/28 | [
"https://math.stackexchange.com/questions/880511",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/161104/"
] | Distributing powers is fine, as long as the exponent is an integer. Your problem is with the logarithms.
In fact the easiest way (I'm assuming that what you want is to solve for $n$) is to simplify the bit in brackets first:
$$\frac{1+i}{1-i}=\frac{1+i}{1-i}\frac{1+i}{1+i}=\frac{2i}{2}=i\ .$$
Therefore
$$\Bigl(\frac{1... | You can distribute powers. The problem in your reasoning is that you worked like if you were dealing with real numbers when taking logarithms.
As you can see here: <http://en.wikipedia.org/wiki/Complex_logarithm> the principal value of the complex logarithm is defined as:
$$log(z)=log(r)+i\theta$$
If $z=re^{i\theta}... |
880,511 | Can I not distribute powers on complex numbers as I do with real numbers?
For example:
Consider
$$\left(\frac{1 + i}{1-i}\right)^n = 1$$
Distributing powers as in real numbers:
$$(1+i)^n = (1 - i)^n$$
Taking log both sides and eliminating $n$ I am left with
$2i = 0$ which is obviously incorrect. So I am lead to believ... | 2014/07/28 | [
"https://math.stackexchange.com/questions/880511",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/161104/"
] | Distributing powers is fine, as long as the exponent is an integer. Your problem is with the logarithms.
In fact the easiest way (I'm assuming that what you want is to solve for $n$) is to simplify the bit in brackets first:
$$\frac{1+i}{1-i}=\frac{1+i}{1-i}\frac{1+i}{1+i}=\frac{2i}{2}=i\ .$$
Therefore
$$\Bigl(\frac{1... | Note that $1+i = \sqrt{2} e^{i\pi/4}$ and $1-i = \sqrt{2} e^{-i\pi/4}$, which means $$\frac{1+i}{1-i} = e^{i \pi/2} = i$$ |
34,914,467 | I've been created a datasource by Azure Search SDK.
The Datasource from Azure sql which is a View.
I tyr to setting the DataChangeDetectionPolicy and DataDeletionDetectionPolicy,
but i can't understand how to set this two property.
When i think this two property doesn't supported on the preview sdk,so i try to use ... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34914467",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4044747/"
] | Based on the [official article](https://azure.microsoft.com/en-us/documentation/articles/search-howto-connecting-azure-sql-database-to-azure-search-using-indexers-2015-02-28/), the way to create the datasource for SQL integration for Views is:
```
{
"name" : "myazuresqldatasource",
"type" : "azuresql",
"c... | The SDK does support data source creation. See <https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.search.models.datasource> |
5,353,466 | I am trying to read input from file into an array. I seem to have done the needful, yet the code is not working as it should. Please tell me where am i going wrong. This s my code:
```
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
fil1.open(ip_filename.c_str());
// to sto... | 2011/03/18 | [
"https://Stackoverflow.com/questions/5353466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/536169/"
] | This code works perfectly fine for me with pro.txt formatted like you show:
```
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
int num_rows = 4;
int num_cols = 4;
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
... | Usually the simplest way to do these kinds of things is to store the data in a flat array (or even better a `std::vector`), and the use simple arithmetics to access the elements by rows and columns. This makes things much simpler.
A wrapper for this could look like this:
```
template<int ColumnCount>
class MyMatrix {... |
5,353,466 | I am trying to read input from file into an array. I seem to have done the needful, yet the code is not working as it should. Please tell me where am i going wrong. This s my code:
```
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
fil1.open(ip_filename.c_str());
// to sto... | 2011/03/18 | [
"https://Stackoverflow.com/questions/5353466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/536169/"
] | This code works perfectly fine for me with pro.txt formatted like you show:
```
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
int num_rows = 4;
int num_cols = 4;
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
... | When using fstream, for robust coding, it is best to check error conditions with is\_open() after open() and fail() after operator<<().
Furthermore, prefer
```
while(getline(fil1, lineString))
{
...;
}
```
so you can check what line you're reading in and what is going wrong.
Happy checking... |
5,353,466 | I am trying to read input from file into an array. I seem to have done the needful, yet the code is not working as it should. Please tell me where am i going wrong. This s my code:
```
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
fil1.open(ip_filename.c_str());
// to sto... | 2011/03/18 | [
"https://Stackoverflow.com/questions/5353466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/536169/"
] | This code works perfectly fine for me with pro.txt formatted like you show:
```
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
int num_rows = 4;
int num_cols = 4;
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
... | As i see you want to load a matrix from a file. In file your values are stored as string separated by space. So you should load your file, read the file line by line, separate your string into a string array and the convert your values from string to int and store them into your matrix. |
5,353,466 | I am trying to read input from file into an array. I seem to have done the needful, yet the code is not working as it should. Please tell me where am i going wrong. This s my code:
```
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
fil1.open(ip_filename.c_str());
// to sto... | 2011/03/18 | [
"https://Stackoverflow.com/questions/5353466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/536169/"
] | This code works perfectly fine for me with pro.txt formatted like you show:
```
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
int num_rows = 4;
int num_cols = 4;
int pb[10][10];
int i,j,n;
string ip_filename = string("pro.txt");
ifstream fil1;
... | What is the status of the stream after each operation? You shouldn't be
reading without verifying. And you shouldn't be reading without having
verified that the open worked:
```
ifstream fill( ip_filename.c_str() );
if ( !fill ) {
// error handling, open failed...
}
```
After that, I would agree with the sugges... |
3,739,952 | How can I reload or set to default (using javascript or jquery) only a particular tag (or id) in my html page. For instance, if I want to set the following select option to default "selected", if something else is currently in selection, without reloading the entire page through javascript confirm() function as follows... | 2010/09/18 | [
"https://Stackoverflow.com/questions/3739952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/257656/"
] | Look very closely at the method you're calling: `presentModalViewController:` presents a **controller**, not a view.
The correct pattern is something like this:
```
MyViewController* myViewController = [[MyViewController alloc] initWithNibName:@"MyView" bundle:nil];
[self presentModalViewController:myViewController a... | Since iOS 6 you should use following method, because of deprections:
MyViewController\* myViewController = [[MyViewController alloc] initWithNibName:@"MyView" bundle:nil];
[self presentViewController:myViewController animated:YES completion:nil]; |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | Yes as @OceanLife says you Should Go with [compatible-screens](http://developer.android.com/guide/topics/manifest/compatible-screens-element.html) or [supports-screens](http://developer.android.com/guide/topics/manifest/supports-screens-element.html).
but I would like to add Something here.
if you are using
```
<su... | Try to add this on your android manifest file
```
<uses-sdk
android:minSdkVersion="6"
android:targetSdkVersion="8" />
<supports-screens
android:anyDensity="true"
android:largeScreens="false"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="false" />
``` |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | Try to add this on your android manifest file
```
<uses-sdk
android:minSdkVersion="6"
android:targetSdkVersion="8" />
<supports-screens
android:anyDensity="true"
android:largeScreens="false"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="false" />
``` | By using **Uses-Feature** it seems you can restrict the app distribution to only Landscape screen devices "tablets and tablets like devices".
Here is the code you will need in your manifest.xml:
```
<uses-feature android:name="android.hardware.screen.landscape"
android:required="true"
... |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | The google developer has very detail information on that so please check this link:
**[Distributing to Specific Screens](http://developer.android.com/guide/practices/screens-distribution.html)**
Quoting relevant parts below.
Handsets only:
>
> ### [Declaring an App is Only for Handsets](http://developer.android.... | Try to add this on your android manifest file
```
<uses-sdk
android:minSdkVersion="6"
android:targetSdkVersion="8" />
<supports-screens
android:anyDensity="true"
android:largeScreens="false"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="false" />
``` |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | Yes as @OceanLife says you Should Go with [compatible-screens](http://developer.android.com/guide/topics/manifest/compatible-screens-element.html) or [supports-screens](http://developer.android.com/guide/topics/manifest/supports-screens-element.html).
but I would like to add Something here.
if you are using
```
<su... | Try this :
You should use this `attribute` in your `mainfest` **android:largestWidthLimitDp="enter mobile pixel value which above you want restrict."**
```
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:larges... |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | Yes as @OceanLife says you Should Go with [compatible-screens](http://developer.android.com/guide/topics/manifest/compatible-screens-element.html) or [supports-screens](http://developer.android.com/guide/topics/manifest/supports-screens-element.html).
but I would like to add Something here.
if you are using
```
<su... | By using **Uses-Feature** it seems you can restrict the app distribution to only Landscape screen devices "tablets and tablets like devices".
Here is the code you will need in your manifest.xml:
```
<uses-feature android:name="android.hardware.screen.landscape"
android:required="true"
... |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | Yes as @OceanLife says you Should Go with [compatible-screens](http://developer.android.com/guide/topics/manifest/compatible-screens-element.html) or [supports-screens](http://developer.android.com/guide/topics/manifest/supports-screens-element.html).
but I would like to add Something here.
if you are using
```
<su... | The google developer has very detail information on that so please check this link:
**[Distributing to Specific Screens](http://developer.android.com/guide/practices/screens-distribution.html)**
Quoting relevant parts below.
Handsets only:
>
> ### [Declaring an App is Only for Handsets](http://developer.android.... |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | Try this :
You should use this `attribute` in your `mainfest` **android:largestWidthLimitDp="enter mobile pixel value which above you want restrict."**
```
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:larges... | By using **Uses-Feature** it seems you can restrict the app distribution to only Landscape screen devices "tablets and tablets like devices".
Here is the code you will need in your manifest.xml:
```
<uses-feature android:name="android.hardware.screen.landscape"
android:required="true"
... |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | The google developer has very detail information on that so please check this link:
**[Distributing to Specific Screens](http://developer.android.com/guide/practices/screens-distribution.html)**
Quoting relevant parts below.
Handsets only:
>
> ### [Declaring an App is Only for Handsets](http://developer.android.... | Try this :
You should use this `attribute` in your `mainfest` **android:largestWidthLimitDp="enter mobile pixel value which above you want restrict."**
```
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:larges... |
14,729,410 | i want to my app run only mobile device not in the
>
> tablet 10 and 7 inch
>
>
>
. but my app is run on both tablet size .please help me out | 2013/02/06 | [
"https://Stackoverflow.com/questions/14729410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1671153/"
] | The google developer has very detail information on that so please check this link:
**[Distributing to Specific Screens](http://developer.android.com/guide/practices/screens-distribution.html)**
Quoting relevant parts below.
Handsets only:
>
> ### [Declaring an App is Only for Handsets](http://developer.android.... | By using **Uses-Feature** it seems you can restrict the app distribution to only Landscape screen devices "tablets and tablets like devices".
Here is the code you will need in your manifest.xml:
```
<uses-feature android:name="android.hardware.screen.landscape"
android:required="true"
... |
19,438,827 | I am new in coding and i have a project to make and some minor problems I don't know how the circled things. I believe the top one can be made by croping the photo, but i want to find out if there's a html/css way and the margins that go after the content is a big mistery to me. If anyone would be so kind, i will appre... | 2013/10/17 | [
"https://Stackoverflow.com/questions/19438827",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2790848/"
] | I would recommend an already mapped CoreData store. Whether it have been previously mapped by your app or by an editor such as Core Data Editor.
In the app delegate you can preload the data. In `- (NSPersistentStoreCoordinator *)persistentStoreCoordinator`.
You can remove the current store:
```
NSError *error = nil;... | It depends on what kind of data you have. Really the only question that matters is which one fits your data better, because either works fine for writing code to import the data.
If your data contains entities of multiple types with relationships, SQLite will map that better than CSV. If not, use whatever you personal... |
3,667,954 | I read several similar posts but I don't see my fault.
index.php looks like:
```
<head>
<title>Demo Title</title>
</head>
<body>
<?php
require_once "footer.php";
?>
</body>
```
footer.php looks like:
```
<?php
/*
* _$ Rev. : 08 Sep 2010 14:52:26 $_
* footer.php
*/
$host = $_SERVER['SERVER_NAME'];
$param =... | 2010/09/08 | [
"https://Stackoverflow.com/questions/3667954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/181725/"
] | $\_SERVER is an array which contains a bunch of fields relating to the server config. It does not contain an element named "http://".$host.$param, so trying to open that as a filename will result in the fopen call failing, and thus going to the die() statement.
More likely what you wanted to do was just open the file ... | try this:
`$file = @ fopen($url,"r") or die ("Can't open HTTP_REFERER.");` |
3,667,954 | I read several similar posts but I don't see my fault.
index.php looks like:
```
<head>
<title>Demo Title</title>
</head>
<body>
<?php
require_once "footer.php";
?>
</body>
```
footer.php looks like:
```
<?php
/*
* _$ Rev. : 08 Sep 2010 14:52:26 $_
* footer.php
*/
$host = $_SERVER['SERVER_NAME'];
$param =... | 2010/09/08 | [
"https://Stackoverflow.com/questions/3667954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/181725/"
] | try this:
`$file = @ fopen($url,"r") or die ("Can't open HTTP_REFERER.");` | Try
```
<?php
$dom = new DOMDocument();
$host = $_SERVER['SERVER_NAME'];
$param = $_SERVER ['REQUEST_URI'];
$url = "http://".$host.$param;
echo 'getting title for page: "' . $url . '"';
$dom->loadHTML($url);
$dom->getElementsByTagName('title');
if ($dom->length)
{
$title = $dom->item(0);
echo $title;
}
e... |
3,667,954 | I read several similar posts but I don't see my fault.
index.php looks like:
```
<head>
<title>Demo Title</title>
</head>
<body>
<?php
require_once "footer.php";
?>
</body>
```
footer.php looks like:
```
<?php
/*
* _$ Rev. : 08 Sep 2010 14:52:26 $_
* footer.php
*/
$host = $_SERVER['SERVER_NAME'];
$param =... | 2010/09/08 | [
"https://Stackoverflow.com/questions/3667954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/181725/"
] | try this:
`$file = @ fopen($url,"r") or die ("Can't open HTTP_REFERER.");` | I can see your trying to track the referral's title
You need to use `$_SERVER['HTTP_REFERER'];` to get that
what you want to do is something like this
```
$referrer = (!empty($_SERVER['HTTP_REFERER']) && !substr($_SERVER['SERVER_NAME']) ? $_SERVER['HTTP_REFERER'] : false);
if($referrer)
{
try
... |
3,667,954 | I read several similar posts but I don't see my fault.
index.php looks like:
```
<head>
<title>Demo Title</title>
</head>
<body>
<?php
require_once "footer.php";
?>
</body>
```
footer.php looks like:
```
<?php
/*
* _$ Rev. : 08 Sep 2010 14:52:26 $_
* footer.php
*/
$host = $_SERVER['SERVER_NAME'];
$param =... | 2010/09/08 | [
"https://Stackoverflow.com/questions/3667954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/181725/"
] | $\_SERVER is an array which contains a bunch of fields relating to the server config. It does not contain an element named "http://".$host.$param, so trying to open that as a filename will result in the fopen call failing, and thus going to the die() statement.
More likely what you wanted to do was just open the file ... | Try
```
<?php
$dom = new DOMDocument();
$host = $_SERVER['SERVER_NAME'];
$param = $_SERVER ['REQUEST_URI'];
$url = "http://".$host.$param;
echo 'getting title for page: "' . $url . '"';
$dom->loadHTML($url);
$dom->getElementsByTagName('title');
if ($dom->length)
{
$title = $dom->item(0);
echo $title;
}
e... |
3,667,954 | I read several similar posts but I don't see my fault.
index.php looks like:
```
<head>
<title>Demo Title</title>
</head>
<body>
<?php
require_once "footer.php";
?>
</body>
```
footer.php looks like:
```
<?php
/*
* _$ Rev. : 08 Sep 2010 14:52:26 $_
* footer.php
*/
$host = $_SERVER['SERVER_NAME'];
$param =... | 2010/09/08 | [
"https://Stackoverflow.com/questions/3667954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/181725/"
] | $\_SERVER is an array which contains a bunch of fields relating to the server config. It does not contain an element named "http://".$host.$param, so trying to open that as a filename will result in the fopen call failing, and thus going to the die() statement.
More likely what you wanted to do was just open the file ... | I can see your trying to track the referral's title
You need to use `$_SERVER['HTTP_REFERER'];` to get that
what you want to do is something like this
```
$referrer = (!empty($_SERVER['HTTP_REFERER']) && !substr($_SERVER['SERVER_NAME']) ? $_SERVER['HTTP_REFERER'] : false);
if($referrer)
{
try
... |
37,307,100 | I have this code included in my main.js:
```
var stripe = require("/cloud/stripe.js")("sk_test_*********");
//create customer
Parse.Cloud.define('createCustomer', function (req, res) {
stripe.customers.create({
description: req.params.fullName,
source: req.params.token
//email: req.params.email
}, fun... | 2016/05/18 | [
"https://Stackoverflow.com/questions/37307100",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6352529/"
] | Have you added Stripe to the requirements of your `package.json` file for your node project? If so, you should be able to reference it using the term `require('stripe')` as opposed to what you're doing. | I'll tell you what worked for me, I racked my brain on this for a day. Instead of using Cloud Code to make a charge, create a route on index.js. Something like this in index.js
```
var stripe = require('stripe')('sk_test_****');
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({
extended: fal... |
22,137,698 | I use a while loop to echo member data to display each member's listing. I then use Jquery to filter the listings according to value(s) which are echoed from the `items` field. (i.e. the `items` field may contain "item1 item3 item10").This works well!!! Here's the code I have now.
```
<?php
$area = "Richmond";
$db_con... | 2014/03/03 | [
"https://Stackoverflow.com/questions/22137698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2574871/"
] | I'm implemented exception handling and had to read through GCC's exception handling code. I'm not exactly sure what the standard guarantees, but I know what happens here. In GCC if an exception is not handled then no stack unwinding will be done. The ABI definition for stack unwinding on Unix-like systems just ends the... | As you quoted:
>
> The process of calling destructors **for automatic objects** constructed on the path from a try block to a throw-expression is called “stack unwinding.”
>
>
>
This includes both objects and "subobjects" (which are just automatic objects enclosed in other objects). So, the destruction of subobje... |
22,137,698 | I use a while loop to echo member data to display each member's listing. I then use Jquery to filter the listings according to value(s) which are echoed from the `items` field. (i.e. the `items` field may contain "item1 item3 item10").This works well!!! Here's the code I have now.
```
<?php
$area = "Richmond";
$db_con... | 2014/03/03 | [
"https://Stackoverflow.com/questions/22137698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2574871/"
] | Your interpretation is (obviously) correct, and neither Clang nor GCC conform to the standard in this scenario.
This was subject of [**CWG issue #1774**](http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1774):
>
> The current wording of 15.5.1 [except.terminate] paragraph 2 affords
> implementations a... | As you quoted:
>
> The process of calling destructors **for automatic objects** constructed on the path from a try block to a throw-expression is called “stack unwinding.”
>
>
>
This includes both objects and "subobjects" (which are just automatic objects enclosed in other objects). So, the destruction of subobje... |
22,137,698 | I use a while loop to echo member data to display each member's listing. I then use Jquery to filter the listings according to value(s) which are echoed from the `items` field. (i.e. the `items` field may contain "item1 item3 item10").This works well!!! Here's the code I have now.
```
<?php
$area = "Richmond";
$db_con... | 2014/03/03 | [
"https://Stackoverflow.com/questions/22137698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2574871/"
] | Your interpretation is (obviously) correct, and neither Clang nor GCC conform to the standard in this scenario.
This was subject of [**CWG issue #1774**](http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1774):
>
> The current wording of 15.5.1 [except.terminate] paragraph 2 affords
> implementations a... | I'm implemented exception handling and had to read through GCC's exception handling code. I'm not exactly sure what the standard guarantees, but I know what happens here. In GCC if an exception is not handled then no stack unwinding will be done. The ABI definition for stack unwinding on Unix-like systems just ends the... |
2,183,194 | Can anyone tell me how to read the text in an image by using vc++ | 2010/02/02 | [
"https://Stackoverflow.com/questions/2183194",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264223/"
] | The technology you are looking for is called "OCR", or ["Optical Character Recognition"](http://en.wikipedia.org/wiki/Optical_character_recognition).
Check out this codeproject entry:
<http://www.codeproject.com/KB/recipes/OCRwithMODI.aspx>
It may help.
Alternatively, [this google search](http://www.google.co.uk/s... | I've got no solution, but got this from a Google hit.
<http://sourceforge.net/projects/paintlib/>
Your question might be better answered if you augmented it with more information. I.e. Why do you want to do this? What image types are you wanting to read?
Give us a background of the requirements, or even motivation. ... |
402,314 | In a way following on from [reading a windows \*.dmp file](https://stackoverflow.com/questions/158534/reading-a-windows-dmp-file)
Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not h... | 2008/12/31 | [
"https://Stackoverflow.com/questions/402314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37558/"
] | What are you using to debug the minidump? I.e., WinDBG or Visual Studio? And how was the minidump generated?
There should be enough information in the minidump to resolve system dll symbols correctly. Are you using a local download of symbols or <http://msdl.microsoft.com/>?
Update: You should be able to add the publ... | Try following the instructions at [this kb article](http://support.microsoft.com/kb/311503), and make sure your symbol path is configured correctly, that WinDbg has access to it, and that the ntdll symbols (for example) are actually downloaded to your symbol cache. The article also provides instructions on how to manua... |
402,314 | In a way following on from [reading a windows \*.dmp file](https://stackoverflow.com/questions/158534/reading-a-windows-dmp-file)
Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not h... | 2008/12/31 | [
"https://Stackoverflow.com/questions/402314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37558/"
] | If you are using WinDbg (part of the [Debugging Tools for Windows](http://www.microsoft.com/whdc/devtools/debugging/default.mspx) package), then it's simple to have it pull the right symbols for you from Microsoft automatically. Configure the symbol path using the ".symfix" (or ".symfix+", to simply append to your exis... | Try following the instructions at [this kb article](http://support.microsoft.com/kb/311503), and make sure your symbol path is configured correctly, that WinDbg has access to it, and that the ntdll symbols (for example) are actually downloaded to your symbol cache. The article also provides instructions on how to manua... |
402,314 | In a way following on from [reading a windows \*.dmp file](https://stackoverflow.com/questions/158534/reading-a-windows-dmp-file)
Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not h... | 2008/12/31 | [
"https://Stackoverflow.com/questions/402314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37558/"
] | If you're typing "`Set _NT_SYMBOL_PATH = srv...`" into a command prompt, there are two things to consider:
* `cmd.exe`'s `set` command does not ignore whitespace, so this defines a variable called "`_NT_SYMBOL_PATH`", not "`_NT_SYMBOL_PATH`".
* You must start the debugger as a child of that command prompt. However, yo... | Try following the instructions at [this kb article](http://support.microsoft.com/kb/311503), and make sure your symbol path is configured correctly, that WinDbg has access to it, and that the ntdll symbols (for example) are actually downloaded to your symbol cache. The article also provides instructions on how to manua... |
402,314 | In a way following on from [reading a windows \*.dmp file](https://stackoverflow.com/questions/158534/reading-a-windows-dmp-file)
Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not h... | 2008/12/31 | [
"https://Stackoverflow.com/questions/402314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37558/"
] | If you are using WinDbg (part of the [Debugging Tools for Windows](http://www.microsoft.com/whdc/devtools/debugging/default.mspx) package), then it's simple to have it pull the right symbols for you from Microsoft automatically. Configure the symbol path using the ".symfix" (or ".symfix+", to simply append to your exis... | What are you using to debug the minidump? I.e., WinDBG or Visual Studio? And how was the minidump generated?
There should be enough information in the minidump to resolve system dll symbols correctly. Are you using a local download of symbols or <http://msdl.microsoft.com/>?
Update: You should be able to add the publ... |
402,314 | In a way following on from [reading a windows \*.dmp file](https://stackoverflow.com/questions/158534/reading-a-windows-dmp-file)
Having received a dump file from random customer, running the debug session to see the crash, you often find it is in a MS or other third party library. The next issue is that you may not h... | 2008/12/31 | [
"https://Stackoverflow.com/questions/402314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37558/"
] | If you are using WinDbg (part of the [Debugging Tools for Windows](http://www.microsoft.com/whdc/devtools/debugging/default.mspx) package), then it's simple to have it pull the right symbols for you from Microsoft automatically. Configure the symbol path using the ".symfix" (or ".symfix+", to simply append to your exis... | If you're typing "`Set _NT_SYMBOL_PATH = srv...`" into a command prompt, there are two things to consider:
* `cmd.exe`'s `set` command does not ignore whitespace, so this defines a variable called "`_NT_SYMBOL_PATH`", not "`_NT_SYMBOL_PATH`".
* You must start the debugger as a child of that command prompt. However, yo... |
90,642 | I am looking at organizing a small conference next summer and I would like by all means to avoid concurrent dates with any major or highly-overlapping conference on the same or related topics. I thought that it would be really useful if there was an online directory where I can check a calendar of upcoming scientific c... | 2017/06/08 | [
"https://academia.stackexchange.com/questions/90642",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/14695/"
] | The first resource that springs to mind is the [COMS directory](https://www.conference-service.com/), which lists conferences in the scientific disciplines (physics, chemistry, maths, life sciences etc). I don't know how comprehensive the listings are, but I think most major conferences should be listed there. You can ... | [**PaperCrowd**](https://www.papercrowd.com/?utm_source=academicstackexchange) is a new research conference directory that may help.
- Researchers can search for conferences based on research interests, topics, keywords location. They can follow events of interest.
- Organizers can add their events in a couple of ... |
43,907,235 | I have not typical situation in my app. I have main activity, then I open activity A, from activity A I can open activity B, from activity B I can open activity A etc.
I looked in Android monitor in this case and every time application memory was increased. App crashed, for example, in 150 activity's and 90mb memory. ... | 2017/05/11 | [
"https://Stackoverflow.com/questions/43907235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5127677/"
] | You can use `Intent.FLAG_ACTIVITY_REORDER_TO_FRONT` when starting an `Activity`. This will move an existing instance of this `Activity` (if one already exists in the stack) to the front without creating a new instance of that `Activity`. If you do this beware that `onCreate()` will not be called on the instance a secon... | finish() can be called to kill (destroy) an Activity instance.
finish: [enter link description here](https://developer.android.com/reference/android/app/Activity.html#finish%28%29)
You can also examine Lifecycle: [enter link description here](https://developer.android.com/reference/android/app/Activity.html#ActivityLi... |
43,907,235 | I have not typical situation in my app. I have main activity, then I open activity A, from activity A I can open activity B, from activity B I can open activity A etc.
I looked in Android monitor in this case and every time application memory was increased. App crashed, for example, in 150 activity's and 90mb memory. ... | 2017/05/11 | [
"https://Stackoverflow.com/questions/43907235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5127677/"
] | Use **singleTop** as an attribute of `<activity>` tag inside **AndroidManifest.xml** file list this:
>
> **singleTop** Activity instance could be created as many as we want. Only
> difference is if there already is an Activity instance with the same
> type at the top of stack in the caller Task, there would not be ... | finish() can be called to kill (destroy) an Activity instance.
finish: [enter link description here](https://developer.android.com/reference/android/app/Activity.html#finish%28%29)
You can also examine Lifecycle: [enter link description here](https://developer.android.com/reference/android/app/Activity.html#ActivityLi... |
43,907,235 | I have not typical situation in my app. I have main activity, then I open activity A, from activity A I can open activity B, from activity B I can open activity A etc.
I looked in Android monitor in this case and every time application memory was increased. App crashed, for example, in 150 activity's and 90mb memory. ... | 2017/05/11 | [
"https://Stackoverflow.com/questions/43907235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5127677/"
] | You can use `Intent.FLAG_ACTIVITY_REORDER_TO_FRONT` when starting an `Activity`. This will move an existing instance of this `Activity` (if one already exists in the stack) to the front without creating a new instance of that `Activity`. If you do this beware that `onCreate()` will not be called on the instance a secon... | Use **singleTop** as an attribute of `<activity>` tag inside **AndroidManifest.xml** file list this:
>
> **singleTop** Activity instance could be created as many as we want. Only
> difference is if there already is an Activity instance with the same
> type at the top of stack in the caller Task, there would not be ... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | As Brian points out, 'the fold' is a rather antiquated concept ([see UX Myths: people don't scroll](http://uxmyths.com/post/654047943/myth-people-dont-scroll)) that has, for the most part, been remedied by time.
What's brought the problem back is this trend to have single page web sites that act more like full-screen... | This is an issue of the "Fold". Particularly, "above the fold" which is a term borrowed from print-newspaper terminology. You are displaying "above the fold" content and want a user to know there is content "below the fold" to vertically scroll to. The fold is considered an antiquated concept by some because the broad ... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | I personally prefer non-obtrusive solutions like showing an edge of the next section of the content.
Here it's shown with cards: it's obvious there is something on the right, and users flick almost unconsciously. No cognitive load whatsoever.
[](htt... | As Brian points out, 'the fold' is a rather antiquated concept ([see UX Myths: people don't scroll](http://uxmyths.com/post/654047943/myth-people-dont-scroll)) that has, for the most part, been remedied by time.
What's brought the problem back is this trend to have single page web sites that act more like full-screen... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | I personally prefer non-obtrusive solutions like showing an edge of the next section of the content.
Here it's shown with cards: it's obvious there is something on the right, and users flick almost unconsciously. No cognitive load whatsoever.
[](htt... | Well, you have two paths: **implicit** or **explicit**.
An implicit approach would be to rely on implied affordances and user's past experiences. Thus, you could rely on the user noticing the scroll bar denotes additional content, or simply make your screen height's value `90vh`. Needless to say these approaches aren'... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | I personally prefer non-obtrusive solutions like showing an edge of the next section of the content.
Here it's shown with cards: it's obvious there is something on the right, and users flick almost unconsciously. No cognitive load whatsoever.
[](htt... | This is an issue of the "Fold". Particularly, "above the fold" which is a term borrowed from print-newspaper terminology. You are displaying "above the fold" content and want a user to know there is content "below the fold" to vertically scroll to. The fold is considered an antiquated concept by some because the broad ... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | I personally prefer non-obtrusive solutions like showing an edge of the next section of the content.
Here it's shown with cards: it's obvious there is something on the right, and users flick almost unconsciously. No cognitive load whatsoever.
[](htt... | Another alternative is to make the main call to action in the banner area scroll down to the content below, or to use a second call to action to initiate the scroll:
[](https://i.stack.imgur.com/AT40V.png)
In this example, “Buy it now” is the primary... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | **Cut off some content at the bottom of the screen**. This will tell users there is more without the need for icons and text.

[download bmml source](/plugins/mockups/download?image=http%3a%2f%2fi.stack.imgur.com%2f3je7C.png) – Wireframes created with [Balsamiq Mockups](h... | This is an issue of the "Fold". Particularly, "above the fold" which is a term borrowed from print-newspaper terminology. You are displaying "above the fold" content and want a user to know there is content "below the fold" to vertically scroll to. The fold is considered an antiquated concept by some because the broad ... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | Well, you have two paths: **implicit** or **explicit**.
An implicit approach would be to rely on implied affordances and user's past experiences. Thus, you could rely on the user noticing the scroll bar denotes additional content, or simply make your screen height's value `90vh`. Needless to say these approaches aren'... | This is an issue of the "Fold". Particularly, "above the fold" which is a term borrowed from print-newspaper terminology. You are displaying "above the fold" content and want a user to know there is content "below the fold" to vertically scroll to. The fold is considered an antiquated concept by some because the broad ... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | **Cut off some content at the bottom of the screen**. This will tell users there is more without the need for icons and text.

[download bmml source](/plugins/mockups/download?image=http%3a%2f%2fi.stack.imgur.com%2f3je7C.png) – Wireframes created with [Balsamiq Mockups](h... | Well, you have two paths: **implicit** or **explicit**.
An implicit approach would be to rely on implied affordances and user's past experiences. Thus, you could rely on the user noticing the scroll bar denotes additional content, or simply make your screen height's value `90vh`. Needless to say these approaches aren'... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | I personally prefer non-obtrusive solutions like showing an edge of the next section of the content.
Here it's shown with cards: it's obvious there is something on the right, and users flick almost unconsciously. No cognitive load whatsoever.
[](htt... | **Cut off some content at the bottom of the screen**. This will tell users there is more without the need for icons and text.

[download bmml source](/plugins/mockups/download?image=http%3a%2f%2fi.stack.imgur.com%2f3je7C.png) – Wireframes created with [Balsamiq Mockups](h... |
87,413 | I've been designing a website for one of my clients and I have a cover image on the landing screen. It's basically a 100vh + 100vw image.
I wanted to know what is a good way to show the users that there's content underneath the main image. For some reason, I'm not a fan of the arrow pointing downwards, would you guys... | 2015/11/26 | [
"https://ux.stackexchange.com/questions/87413",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/76318/"
] | As Brian points out, 'the fold' is a rather antiquated concept ([see UX Myths: people don't scroll](http://uxmyths.com/post/654047943/myth-people-dont-scroll)) that has, for the most part, been remedied by time.
What's brought the problem back is this trend to have single page web sites that act more like full-screen... | Well, you have two paths: **implicit** or **explicit**.
An implicit approach would be to rely on implied affordances and user's past experiences. Thus, you could rely on the user noticing the scroll bar denotes additional content, or simply make your screen height's value `90vh`. Needless to say these approaches aren'... |
57,974,797 | ```
I have 3 tables:
1. users
-- _id
-- firstname
3. roles
-- _id
-- user_id
-- alias // admin, hr etc..
2. userroles
-- user_id
-- role_id
```
Here is the query I tried.
```
SELECT u._id, u.firstname, u.lastname, array_agg(r.alias) as roles
FROM users u
LEFT OUTER JOIN userroles ur ON (u._id = ur.user_id)
LEFT ... | 2019/09/17 | [
"https://Stackoverflow.com/questions/57974797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2741936/"
] | The result of `parseInt()` is going to be either a number or `NaN`, so you can use `||`:
```
const my_v = parseInt(jQuery("#id").val()) || 0;
```
Now, in general I would caution anyone against using `parseInt()`, because (by design) it accepts strings like "123hello world" as valid numbers (`123` in this case). You ... | Sure using an IIFE:
```
(n => !isNaN(n) ? n : 0)(parseInt(jQuery('#id').val()))
```
But seriously, usea local variable. |
57,974,797 | ```
I have 3 tables:
1. users
-- _id
-- firstname
3. roles
-- _id
-- user_id
-- alias // admin, hr etc..
2. userroles
-- user_id
-- role_id
```
Here is the query I tried.
```
SELECT u._id, u.firstname, u.lastname, array_agg(r.alias) as roles
FROM users u
LEFT OUTER JOIN userroles ur ON (u._id = ur.user_id)
LEFT ... | 2019/09/17 | [
"https://Stackoverflow.com/questions/57974797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2741936/"
] | Sure using an IIFE:
```
(n => !isNaN(n) ? n : 0)(parseInt(jQuery('#id').val()))
```
But seriously, usea local variable. | If you have already a stringed integer value, you could just take a number or zero as default value.
```
const my_v = +jQuery('#id').val() || 0;
```
If not, get first the value and then the integer part.
```
const my_v = Math.floor(+jQuery('#id').val() || 0);
``` |
57,974,797 | ```
I have 3 tables:
1. users
-- _id
-- firstname
3. roles
-- _id
-- user_id
-- alias // admin, hr etc..
2. userroles
-- user_id
-- role_id
```
Here is the query I tried.
```
SELECT u._id, u.firstname, u.lastname, array_agg(r.alias) as roles
FROM users u
LEFT OUTER JOIN userroles ur ON (u._id = ur.user_id)
LEFT ... | 2019/09/17 | [
"https://Stackoverflow.com/questions/57974797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2741936/"
] | The result of `parseInt()` is going to be either a number or `NaN`, so you can use `||`:
```
const my_v = parseInt(jQuery("#id").val()) || 0;
```
Now, in general I would caution anyone against using `parseInt()`, because (by design) it accepts strings like "123hello world" as valid numbers (`123` in this case). You ... | If you have already a stringed integer value, you could just take a number or zero as default value.
```
const my_v = +jQuery('#id').val() || 0;
```
If not, get first the value and then the integer part.
```
const my_v = Math.floor(+jQuery('#id').val() || 0);
``` |
57,974,797 | ```
I have 3 tables:
1. users
-- _id
-- firstname
3. roles
-- _id
-- user_id
-- alias // admin, hr etc..
2. userroles
-- user_id
-- role_id
```
Here is the query I tried.
```
SELECT u._id, u.firstname, u.lastname, array_agg(r.alias) as roles
FROM users u
LEFT OUTER JOIN userroles ur ON (u._id = ur.user_id)
LEFT ... | 2019/09/17 | [
"https://Stackoverflow.com/questions/57974797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2741936/"
] | The result of `parseInt()` is going to be either a number or `NaN`, so you can use `||`:
```
const my_v = parseInt(jQuery("#id").val()) || 0;
```
Now, in general I would caution anyone against using `parseInt()`, because (by design) it accepts strings like "123hello world" as valid numbers (`123` in this case). You ... | With one `const` you can declare more than one variable.
```
const idValue = parseInt(jQuery('#id').val()), my_v = isNaN(idValue) ? 0 : idValue;
``` |
57,974,797 | ```
I have 3 tables:
1. users
-- _id
-- firstname
3. roles
-- _id
-- user_id
-- alias // admin, hr etc..
2. userroles
-- user_id
-- role_id
```
Here is the query I tried.
```
SELECT u._id, u.firstname, u.lastname, array_agg(r.alias) as roles
FROM users u
LEFT OUTER JOIN userroles ur ON (u._id = ur.user_id)
LEFT ... | 2019/09/17 | [
"https://Stackoverflow.com/questions/57974797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2741936/"
] | With one `const` you can declare more than one variable.
```
const idValue = parseInt(jQuery('#id').val()), my_v = isNaN(idValue) ? 0 : idValue;
``` | If you have already a stringed integer value, you could just take a number or zero as default value.
```
const my_v = +jQuery('#id').val() || 0;
```
If not, get first the value and then the integer part.
```
const my_v = Math.floor(+jQuery('#id').val() || 0);
``` |
67,227,239 | I have an RDS file that is uploaded and then download via `curl::curl_fetch_memory()` (via `httr`) - this gives me a raw vector in R.
Is there a way to read that raw vector representing the RDS file to return the original R object? Or does it always have to be written to disk first?
I have a setup similar to below:
... | 2021/04/23 | [
"https://Stackoverflow.com/questions/67227239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3878063/"
] | By default, RDS file streams are gzipped. To read a raw connection you need to manually wrap it into a [`gzcon`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/gzcon.html):
```
con = rawConnection(obj)
result = readRDS(gzcon(con))
```
This works even when the stream *isn’t* gzipped. But unfortunately it fai... | I had exactly the same problem, and for me, the above answer with `gzcon` did not work, however, I could directly load the raw object into R's memory using the `rawConnection`:
```
load(rawConnection(obj))
``` |
50,771,376 | After updating Android Studio, I found some red rows in my project.
What I have.
I call this method:
```
if (Build.VERSION.SDK_INT < 21) {
orangeProgressBar(progressBar);
}
```
Using of red `ContextCompat.getColor()`:
[](https://i.stack.imgur.... | 2018/06/09 | [
"https://Stackoverflow.com/questions/50771376",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6793265/"
] | I had the same problem after updating the Android Studio but the below solution worked for me:
Deleting the `.gradle` and `.build` folder from your respective project directory structure and rebuild the project.I'm not so sure about what it does but i think it deleted all the previous build caches other build related ... | Deleting the .gradle and .idea did not work for me.
What worked was the following:
In Android Studio close all projects
In the Welcome To Android Studio Screen:
* remove all the projects by clicking the X in the top right corner, or right click, choose "Remove Selected From Welcome Screen"
* Close Android Studio
* R... |
126,387 | <http://stegosploit.info/>
I looking into having users upload their images directly to AWS S3 to save on costs (rather than going through a traditional server and re-encoded with mozjpeg), but this would theoretically open up the stegosploit vulnerability based on what I've read.
The part that I don't understand is: ... | 2016/06/07 | [
"https://security.stackexchange.com/questions/126387",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/113770/"
] | To answer the question: The website admin must be in on the exploit.
The encoding technique is there to obfuscate the actual exploit scripts, thus flying under the radar from current detection methods. It still requires HTML/Javascript to be on the webpage in order to decode and run the exploit.
That is to say, if I ... | There are two parts on <http://stegosploit.info/>
The first one is about hosting the javascript exploit in an image file loaded through canvas. As such, it's not really interesting since in order to be exploited, the attacker would already need to be able to insert javascript into the webpage.
The second part involve... |
2,426,872 | If $\mathcal {A}$ : $\mathbb R^2 \rightarrow \mathbb R^3$ is a linear transformation such that:
* $\mathcal{A}(1,1)=(0,1,2)$
* $\mathcal{A}(-1,1)=(2,1,0)$
Then the standard matrix of $\mathcal {A}$ is? | 2017/09/12 | [
"https://math.stackexchange.com/questions/2426872",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/479663/"
] | $\mathcal{A}(\mathbf{e\_1}) = \mathcal{A}(1,0) = \dfrac12\mathcal{A}(1,1)-\dfrac12\mathcal{A}(-1,1) = (-1,0,1)$.
$\mathcal{A}(\mathbf{e\_2}) = \mathcal{A}(0,1) = \dfrac12\mathcal{A}(1,1)+\dfrac12\mathcal{A}(-1,1) = (1,1,1)$.
Therefore, the matrix representation of $\mathcal{A}$ is $\begin{bmatrix} \mathcal{A}(\mathbf... | To complement Kenny Lau's answer, here's a longer, perhaps more routine way to do essentially the same thing. You need to find the matrix for $\mathcal{A}$ from the standard basis $B\_2$ in $\mathbb{R}^2$ to the standard basis $B\_3$ in $\mathbb{R}^3$. That is, you want,
$$\mathcal{M}(\mathcal{A}, B\_2, B\_3).$$
What y... |
28,501 | We're building a site which will have certain content pages accessible only to logged in Drupal users.
I'd like users to be able to create their own Drupal accounts with access to those pages, but only those who have been pre-approved, who exist as contacts in CiviCRM, and are part of a 'web site users' group.
What's... | 2019/02/15 | [
"https://civicrm.stackexchange.com/questions/28501",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/6140/"
] | A couple of thoughts.
If you want this to be a response to an action - eg you folk send out a mailing - then you can do this via a webform - send out a link with checksum to a webform and upon submitting the webform you can trigger Drupal Rules (we usually do this by giving them a civicrm Tag) and this can also instan... | I wrote a [plugin for Joomla](https://github.com/aydun/CiviCRM-JoomlaReg) that does this - it integrates into the Joomla account registration process and requires new accounts to match a CiviCRM record. Probably wouldn't be hard to create a Drupal version using the same approach. |
28,501 | We're building a site which will have certain content pages accessible only to logged in Drupal users.
I'd like users to be able to create their own Drupal accounts with access to those pages, but only those who have been pre-approved, who exist as contacts in CiviCRM, and are part of a 'web site users' group.
What's... | 2019/02/15 | [
"https://civicrm.stackexchange.com/questions/28501",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/6140/"
] | I operate a similar system.
Thing to do is either A) create the contacts in Drupal manually or B) write a code thing (scheduled task / hook etc) which, upon them being approved in some way (e.g. added to the Group) creates an account in Drupal and mails them the details. | I wrote a [plugin for Joomla](https://github.com/aydun/CiviCRM-JoomlaReg) that does this - it integrates into the Joomla account registration process and requires new accounts to match a CiviCRM record. Probably wouldn't be hard to create a Drupal version using the same approach. |
66,483,115 | I'm building a html page from a model. Added to the page is a a form that somehow seems to interfere with the model I'm using to build the page.
I get this error message:
Exception Type: ValueError at /bidding
Exception Value: Field 'id' expected a number but got 'bidding'.
HTML (listing.html)
```
{% extends "auctio... | 2021/03/04 | [
"https://Stackoverflow.com/questions/66483115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9729756/"
] | You should swap the patterns, such that if you access `bidding/`, then it first will look at the path for the `bidding` view, and only if the path does not match look further, so:
```
urlpatterns = [
# ↓ first bidding
path(**'bidding/'**, views.bidding, name='bidding'),
path('<str:listing>/', views.l... | >
>
> ```
> def listing(request, listing):
> return render(request, "auctions/listing.html",{
> "listing" : Listing.objects.filter(id=listing)
> })
>
> ```
>
>
This view function takes a second parameter, listing which is delivered by the URL:
>
> path("<str:listing>", views.listing, name="listing"... |
66,483,115 | I'm building a html page from a model. Added to the page is a a form that somehow seems to interfere with the model I'm using to build the page.
I get this error message:
Exception Type: ValueError at /bidding
Exception Value: Field 'id' expected a number but got 'bidding'.
HTML (listing.html)
```
{% extends "auctio... | 2021/03/04 | [
"https://Stackoverflow.com/questions/66483115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9729756/"
] | You should swap the patterns, such that if you access `bidding/`, then it first will look at the path for the `bidding` view, and only if the path does not match look further, so:
```
urlpatterns = [
# ↓ first bidding
path(**'bidding/'**, views.bidding, name='bidding'),
path('<str:listing>/', views.l... | ```
urlpatterns = [
path("<str:listing>", views.listing, name="listing"),//This line is the culprit
path("bidding", views.bidding, name="bidding")
]
```
Change the first path to look as follows, which shall coerce the input to an integer.
```
path("<int:listing>", views.listing, name="listing")
``` |
52,714,668 | I am trying to get a report from my created tables. The thing is I have 3 different button to trigger 3 different modal right now. This approach works but I think it is unnecessary to create them seperately. I want only one modal with auto routed to related "Action". I think it will be solved with jquery but I can't se... | 2018/10/09 | [
"https://Stackoverflow.com/questions/52714668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10366733/"
] | It looks like your bash gets confused by DOS line endings. [This post](https://stackoverflow.com/questions/6373888/converting-newline-formatting-from-mac-to-windows) goes into some detail on how to handle those on MacOS | The error suggests that the mvnw file is not there. Go to your maven project which you need to build and then run mvnw like bellow by pointing to the path of mvnw.
sh /home/user/maven-wrapper-master/mvnw clean install
Or else copy the mvnw file into the maven project directory. |
52,714,668 | I am trying to get a report from my created tables. The thing is I have 3 different button to trigger 3 different modal right now. This approach works but I think it is unnecessary to create them seperately. I want only one modal with auto routed to related "Action". I think it will be solved with jquery but I can't se... | 2018/10/09 | [
"https://Stackoverflow.com/questions/52714668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10366733/"
] | I had the same error as you, installing mvn wrapper in the following way worked for me.
```
mvn -N io.takari:maven:wrapper
```
Then cd to the folder where pom.xml file is, and then re-run the ./mvnw command | The error suggests that the mvnw file is not there. Go to your maven project which you need to build and then run mvnw like bellow by pointing to the path of mvnw.
sh /home/user/maven-wrapper-master/mvnw clean install
Or else copy the mvnw file into the maven project directory. |
52,714,668 | I am trying to get a report from my created tables. The thing is I have 3 different button to trigger 3 different modal right now. This approach works but I think it is unnecessary to create them seperately. I want only one modal with auto routed to related "Action". I think it will be solved with jquery but I can't se... | 2018/10/09 | [
"https://Stackoverflow.com/questions/52714668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10366733/"
] | It looks like your bash gets confused by DOS line endings. [This post](https://stackoverflow.com/questions/6373888/converting-newline-formatting-from-mac-to-windows) goes into some detail on how to handle those on MacOS | I tried `dos2unix filename` it works. For using this command we have to install dos2unix
This is the link for install
[https://symwisedownload.symantec.com//resources/sites/SYMWISE/content/live/SOLUTIONS/228000/TECH228385/en\_US/dos2unix-5.3.3-0.pkg?**gda**=1539204692\_786de4ebe956ae8f24de673f5398dd64](https://symwi... |
52,714,668 | I am trying to get a report from my created tables. The thing is I have 3 different button to trigger 3 different modal right now. This approach works but I think it is unnecessary to create them seperately. I want only one modal with auto routed to related "Action". I think it will be solved with jquery but I can't se... | 2018/10/09 | [
"https://Stackoverflow.com/questions/52714668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10366733/"
] | I had the same error as you, installing mvn wrapper in the following way worked for me.
```
mvn -N io.takari:maven:wrapper
```
Then cd to the folder where pom.xml file is, and then re-run the ./mvnw command | I tried `dos2unix filename` it works. For using this command we have to install dos2unix
This is the link for install
[https://symwisedownload.symantec.com//resources/sites/SYMWISE/content/live/SOLUTIONS/228000/TECH228385/en\_US/dos2unix-5.3.3-0.pkg?**gda**=1539204692\_786de4ebe956ae8f24de673f5398dd64](https://symwi... |
30,642,725 | I want to get newest posts first, and try the following:
```
db.posts.find({"date": {"$lt": tomorrow, "$gte":
today}}).sort({'date':pymongo.DESCENDING})
```
(without **sort**, I get the oldest posts first fine)
I am getting this error
```
TypeError: if no direction is specified, key_or_list must b... | 2015/06/04 | [
"https://Stackoverflow.com/questions/30642725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1164501/"
] | This is not the correct format of parameters for the `sort` function. The correct syntax would look something like this:
```
db.posts.find(...).sort('date',pymongo.DESCENDING)
```
Here is a link to the relevant documentation for the `sort` function:
<http://api.mongodb.org/python/current/api/pymongo/cursor.html#pymo... | In PyMongo you can try also this if there is an error for .sort('date', pymongo.DESCENDING)
```
db.posts.find().sort('date', -1)
``` |
46,228,420 | I found from lots of resources that JDBC is a typical example of Bridge design pattern. But they usually didn't tell the details, so I would like to know the details. According to my understanding:
* `Driver` interface is the *bridge* between the `DriverManager` and the concrete JDBC driver classes
* `Connection` inte... | 2017/09/14 | [
"https://Stackoverflow.com/questions/46228420",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1928863/"
] | The [Bridge pattern](https://en.wikipedia.org/wiki/Bridge_pattern), as defined by the "Gang of Four", means *decoupling an abstraction from its implementation so that the two can vary independently*. In this context, it's not so much about bridging different classes together. Instead, the pattern illustrates the [Open/... | It isn't.
The Bridge pattern requires a concrete implementation of one API that maps to a concrete implementation of another API. It is rarely used: in fact I've used it exactly once in the 20+ years since the GoF book appeared, and I regretted that occasion.
JDBC provides abstract definitions of an API (interfaces) ... |
4,283,341 | My attempt at a solution using the substitution method:
$$u=\sin^2x\\du=2\sin x\cos xdx\\du=2u^{\frac12}{(1-\sin^2x)}^{\frac12}dx\\du=2u^{\frac12}{(1-u)}^{\frac12}dx\\\int\_0^{2\pi}e^{\sin^2x}dx\\\int\_0^1e^{u}\frac{1}{2u^{\frac12}{(1-u)}^{\frac12}}du$$
I have no idea how to solve it.
thanks in advance. | 2021/10/21 | [
"https://math.stackexchange.com/questions/4283341",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/982935/"
] | **1. Solution with contour integraton**
Do the following substitution
$$ \sin x = \frac{z-z^{-1}}{2i}$$
$$ dx = \frac{dz}{iz}$$
Hence
$$I= \int\_{0}^{2\pi} e^{\sin^2 x} dx = \frac{1}{i} \oint\_{|z|=1} \frac{e^{\left(\frac{z^2-1}{2iz}\right)^2}}{z} dz$$
Your integral become a contour integral around the unit compl... | According to Wolfram, it is
$$\int\_{0}^{2\pi} e^{[\sin x]^2}\ dx = 2\sqrt{e} \pi I\_0\left(\frac{1}{2}\right)$$
I think there isn't really a good "trick" for this beyond just recognizing that the modified Bessel functions have well-known integral identities involving integrands of a broadly similar shape in that the... |
504,760 | please help with this.
I found this in textbook.
Not derived from any differential equation.
Also found the answer $$ \frac{1}{\sqrt{\pi}\sqrt{t}} + e^t \* erf(\sqrt{t}) $$
(but don't know how) | 2013/09/25 | [
"https://math.stackexchange.com/questions/504760",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/48255/"
] | $$\frac{1}{\sqrt{s}-1}=\frac{\sqrt{s}+1}{s-1}=\frac{\sqrt{s}}{s-1}+\frac{1}{s-1}=\frac{s}{\sqrt{s}(s-1)}+\frac{1}{s-1}=\frac{1}{\sqrt{s}(s-1)}+\frac{1}{\sqrt{s}}+\frac{1}{s-1}$$
And we know that $$\mathcal{L}(\text{erf}(\sqrt{t}))=\frac{1}{s\sqrt{s+1}},~\mathcal{L}(e^{at}f(t))=\mathcal{L}(f(t))|\_{s\to s-1},~\mathcal{... | Start from Babak's observation that
$$\frac{1}{\sqrt{s}-1} = \frac{\sqrt{s}}{s-1} + \frac{1}{s-1}$$
The ILT of the second term is simply $e^t$. For the first term, consider the following integral:
$$\oint\_C dz \,e^{z t} \frac{\sqrt{z}}{z-1}$$
where $C$ is as follows:
 [function.mail]: Failed to connect to mailserver at >"localhost" port 25, verify your "SMTP... | 2012/11/06 | [
"https://Stackoverflow.com/questions/13252629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1803103/"
] | It seems your problem is that Gmail is not an open relay, meaning it requires authentication with an account in order to accept outgoing mail. See the Gmail page [Problems sending mail](http://support.google.com/mail/bin/answer.py?hl=en&answer=78775). At the very least, you'll need to supply account information, and I ... | Check to see if your hosting services is blocking port 465 |
13,252,629 | I've implemented the yii-user module in a new php project and everything works fine. But when i register, the program should sent an activation email , but when i press the register button i get the following error:
>
> mail() [function.mail]: Failed to connect to mailserver at >"localhost" port 25, verify your "SMTP... | 2012/11/06 | [
"https://Stackoverflow.com/questions/13252629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1803103/"
] | It seems your problem is that Gmail is not an open relay, meaning it requires authentication with an account in order to accept outgoing mail. See the Gmail page [Problems sending mail](http://support.google.com/mail/bin/answer.py?hl=en&answer=78775). At the very least, you'll need to supply account information, and I ... | I solved it by just installing and running this little program : <http://smtp4dev.codeplex.com/>
This program sits in the system tray and does not deliver the received messages and the webapp runs just fine!
Thanks all for your help! |
238,818 | **Introduction:** Let's assume we have a 2-form $\alpha=(1/2)\sum\_{j,k=1}^n a\_{jk}\ e\_j\wedge e\_k$, where $n=2m$, and $a\_{jk}\in\mathbb C$. We know that $\alpha^{\wedge m}=\alpha\wedge\alpha\dots\wedge\alpha\ (m\ {\rm times}) = n!\ ({\rm Pf}\ A)\cdot e\_1\wedge\dots\wedge e\_n$, where ${\rm Pf}\ A$ is the Pfaffian... | 2016/05/14 | [
"https://mathoverflow.net/questions/238818",
"https://mathoverflow.net",
"https://mathoverflow.net/users/91644/"
] | For two 2-forms I can offer you a blueprint of an algorithm. Details would have to be filled in.
Consider two skewsymmetric $n\times n$-matrices $A$ and $B$. The task is to compute $\operatorname{Pf}(sA+tB)$ since this gives all $\alpha^p\wedge\beta^{m-p}$ simultaneously.
Let's assume first that $A$ is invertible. Th... | Since the two forms in the definition of "multilinear Pfaffian" commute one can use polarization and write down explicit formula. See e.g. (7) of <https://arxiv.org/abs/1309.1275> This formula, however, has $2^m$ terms. |
347,221 | I am a computer programmer and after a project with Image processing which runs on ARM Embedded system board. Specification says it needs 12V 1 Amp Supply. I have a computer SMPS which gives me 5v and 12v constant supply and rated as 450 watt. Also it is written it can draw upto 24A current so here I cam confused. Can ... | 2017/12/29 | [
"https://electronics.stackexchange.com/questions/347221",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/173141/"
] | The PSU rating just means that up to 24 A is available to be drawn from the 12 V supply. Your board will draw what it needs from the 12 V rail, up to 1 A from what you've said.
However, that means that the PSU will supply up to 24 A into an overload or short circuit from your board or 12 V connections coming out of it... | Yes. But you shouldn't. An ATX power supply is for finished and tested products.
This supply is 24 times more powerful than your requirements. It also does not have any protections for prototype work. It only has protections for itself.
If you accidentally make a short, you will see sparks, flames and/or smoke. And... |
347,221 | I am a computer programmer and after a project with Image processing which runs on ARM Embedded system board. Specification says it needs 12V 1 Amp Supply. I have a computer SMPS which gives me 5v and 12v constant supply and rated as 450 watt. Also it is written it can draw upto 24A current so here I cam confused. Can ... | 2017/12/29 | [
"https://electronics.stackexchange.com/questions/347221",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/173141/"
] | The PSU rating just means that up to 24 A is available to be drawn from the 12 V supply. Your board will draw what it needs from the 12 V rail, up to 1 A from what you've said.
However, that means that the PSU will supply up to 24 A into an overload or short circuit from your board or 12 V connections coming out of it... | The current is completely based on your load, so if you have a voltage source with maximum 24A current, it means based on the load that you are using it can provide currents from miliamps to maximum 24 amps. therefore if you need 24V and 1A there is no difference using a 24V-1A power supply or 24V-100A power supply.
**... |
71,313,598 | I encontered a problem when I test my project, any help would be greatly appreciated.
All my code can be found in here: <https://github.com/Karlus44/smartcontract-lottery>
When I type the command brownie test
my script tests/test\_lottery\_unit.py is exectuted, and my different tests are submitted.
Here some quotes of ... | 2022/03/01 | [
"https://Stackoverflow.com/questions/71313598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13754843/"
] | Check your `fund_with_link` function. Check the amount that you have mentioned. It must be `amount = 0.1 * 10**18`.
As mentioned here, <https://docs.chain.link/docs/vrf-contracts/v1/> , the fee for, say, Rinkeby test network is `0.1 LINK`. | If you're having a virtual machine check with your ganache port and IP in the settings of your Ethereum VM. If you're running `brownie-compile` and the code is working, then that's the issue. |
71,313,598 | I encontered a problem when I test my project, any help would be greatly appreciated.
All my code can be found in here: <https://github.com/Karlus44/smartcontract-lottery>
When I type the command brownie test
my script tests/test\_lottery\_unit.py is exectuted, and my different tests are submitted.
Here some quotes of ... | 2022/03/01 | [
"https://Stackoverflow.com/questions/71313598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13754843/"
] | Check your `fund_with_link` function. Check the amount that you have mentioned. It must be `amount = 0.1 * 10**18`.
As mentioned here, <https://docs.chain.link/docs/vrf-contracts/v1/> , the fee for, say, Rinkeby test network is `0.1 LINK`. | Check whether the fee you have entered in brownie-config.yaml is 0.1 LINK. This should solve the problem. |
22,965,513 | I have a form that I want to validate using JQuery.
When the user leaves the form field without entering anything the class of that input changes to show an error by becoming red.
I have created a jsfiddle file
<http://jsfiddle.net/mTCvk/>
The problem I am having is that the it will only work on the first text inp... | 2014/04/09 | [
"https://Stackoverflow.com/questions/22965513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1078385/"
] | It's a DOM issue. It needs to check the `:text` child for that specific element
```
$(document).ready(function(){
$('.text-input').focusout(function () {
if ($(this).find(":text").val().length == 0) {
$(this).removeClass("text-input").addClass("text-input-error");
} else {
$(this).r... | It's easy, you have selected the first input type text found : `$(":text").val()`.. You must select the input type type on the .text-input blured :
```
$(":text", $(this)).val()... // First :text, on $(this) parent
```
<http://jsfiddle.net/mTCvk/1/>
PS : for your class management, don't delete .text-input juste add... |
22,965,513 | I have a form that I want to validate using JQuery.
When the user leaves the form field without entering anything the class of that input changes to show an error by becoming red.
I have created a jsfiddle file
<http://jsfiddle.net/mTCvk/>
The problem I am having is that the it will only work on the first text inp... | 2014/04/09 | [
"https://Stackoverflow.com/questions/22965513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1078385/"
] | It's a DOM issue. It needs to check the `:text` child for that specific element
```
$(document).ready(function(){
$('.text-input').focusout(function () {
if ($(this).find(":text").val().length == 0) {
$(this).removeClass("text-input").addClass("text-input-error");
} else {
$(this).r... | You can use this:
```
$(":text").focusout(function () {
if ($(this).val().length == 0) {
$(this).parent().removeClass("text-input").addClass("text-input-error");
} else {
$(this).parent().removeClass("text-input-error").addClass("text-input");
}
});
``` |
22,965,513 | I have a form that I want to validate using JQuery.
When the user leaves the form field without entering anything the class of that input changes to show an error by becoming red.
I have created a jsfiddle file
<http://jsfiddle.net/mTCvk/>
The problem I am having is that the it will only work on the first text inp... | 2014/04/09 | [
"https://Stackoverflow.com/questions/22965513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1078385/"
] | It's a DOM issue. It needs to check the `:text` child for that specific element
```
$(document).ready(function(){
$('.text-input').focusout(function () {
if ($(this).find(":text").val().length == 0) {
$(this).removeClass("text-input").addClass("text-input-error");
} else {
$(this).r... | Use following code....
```
$('.text-input, .text-input-error').focusout(function () {
if ($(this).find(':text').val().length == 0) {
$(this).removeClass("text-input").addClass("text-input-error");
} else {
$(this).removeClass("text-input-error").addClass("text-input");
}
});
``` |
22,965,513 | I have a form that I want to validate using JQuery.
When the user leaves the form field without entering anything the class of that input changes to show an error by becoming red.
I have created a jsfiddle file
<http://jsfiddle.net/mTCvk/>
The problem I am having is that the it will only work on the first text inp... | 2014/04/09 | [
"https://Stackoverflow.com/questions/22965513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1078385/"
] | It's a DOM issue. It needs to check the `:text` child for that specific element
```
$(document).ready(function(){
$('.text-input').focusout(function () {
if ($(this).find(":text").val().length == 0) {
$(this).removeClass("text-input").addClass("text-input-error");
} else {
$(this).r... | I changed your code to use the .on method, and gave it the event blur. Then we create a variable for the closest text-input class (which would be its parent text-input div). Rather than checking the .length, we just check to see if it is an empty string. You would also need to wrap your textarea in the save text-input ... |
16,459,537 | I'm currently using jQuery to animate the resizing of a banner.
There's a div button that does this upon clicking.
What I'm trying to do is get the button to change its text from "hide banner" to "show banner" depending
```
<div id="banner_animate" class="banner">
<div id="minimize" class="small_button">hide banne... | 2013/05/09 | [
"https://Stackoverflow.com/questions/16459537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | in your `$("#minimize").click` you can use `$(this).text()`:
```
$("#minimize").click(function() {
if ($(this).text() == 'hide banner') {
$("#banner_animate").animate({height: "40px"}, 500);
$(this).text('show banner');
} else {
$("#banner_animate").animate({height: "200px"}, 500);
$(th... | Try this:
```
$("#minimize").click(function () {
var new_height = 200;
if ($("#banner_animate").height() == 200) new_height = 40;
$("#banner_animate").animate({
height: new_height + "px"
}, 500);
$(this).text(function (_, oldText) {
return oldText === 'Hide banner' ? 'Show banne... |
16,459,537 | I'm currently using jQuery to animate the resizing of a banner.
There's a div button that does this upon clicking.
What I'm trying to do is get the button to change its text from "hide banner" to "show banner" depending
```
<div id="banner_animate" class="banner">
<div id="minimize" class="small_button">hide banne... | 2013/05/09 | [
"https://Stackoverflow.com/questions/16459537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | in your `$("#minimize").click` you can use `$(this).text()`:
```
$("#minimize").click(function() {
if ($(this).text() == 'hide banner') {
$("#banner_animate").animate({height: "40px"}, 500);
$(this).text('show banner');
} else {
$("#banner_animate").animate({height: "200px"}, 500);
$(th... | ```
$("#minimize").click(function() {
if($(this).html()=="hide banner"){
$(this).html("show");
}
else {
$(this).html("hide banner");
}
var new_height = 200;
if ($("#banner_animate").height() == 200) new_height = 40;
$("#banner_animate").animate({
height: new_height + "px"
}... |
16,459,537 | I'm currently using jQuery to animate the resizing of a banner.
There's a div button that does this upon clicking.
What I'm trying to do is get the button to change its text from "hide banner" to "show banner" depending
```
<div id="banner_animate" class="banner">
<div id="minimize" class="small_button">hide banne... | 2013/05/09 | [
"https://Stackoverflow.com/questions/16459537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Try this:
```
$("#minimize").click(function () {
var new_height = 200;
if ($("#banner_animate").height() == 200) new_height = 40;
$("#banner_animate").animate({
height: new_height + "px"
}, 500);
$(this).text(function (_, oldText) {
return oldText === 'Hide banner' ? 'Show banne... | ```
$("#minimize").click(function() {
if($(this).html()=="hide banner"){
$(this).html("show");
}
else {
$(this).html("hide banner");
}
var new_height = 200;
if ($("#banner_animate").height() == 200) new_height = 40;
$("#banner_animate").animate({
height: new_height + "px"
}... |
23,233,470 | According to [this](https://github.com/clojure-emacs/cider):
>
> The built-in completion logic in CIDER relies on the library clojure-complete, so you'll have to have it your classpath for completion to work. If you're connecting to an nREPL server started from lein (e.g. you invoked M-x cider-jack-in) - there's noth... | 2014/04/23 | [
"https://Stackoverflow.com/questions/23233470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3758484/"
] | Check whether you have `php5-curl` installed
```
dpkg -l | grep 'php5-curl'
```
If isn't installed,
```
apt-get install php5-curl
```
Ensure the path in `extension_dir` exists, and contains curl.so, if not, change to the correct path.
```
php -i | grep extension_dir
```
Ensure the `/etc/php5/mods-available/cur... | To enable curl on Windows uncomment
```
;extension=php_curl.dll
;to
extension=php_curl.dll
``` |
458,965 | Suppose I have an environment where there isn't a shell running, so I can't use redirection, pipes, here-documents or other shell-isms, but I *can* launch a command (through [`execvp`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html) or some similar way). I want to write an arbitrary string to a nam... | 2018/07/27 | [
"https://unix.stackexchange.com/questions/458965",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/157128/"
] | If you know of any other non-empty file on the system, then with [POSIX `sed`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html):
```
sed -e 's/.*/hello world/' -e 'wtarget' -e q otherfile
```
With GNU `sed` and just your own non-empty file, you can use:
```
sed -i.bak -e '$ihello world' -e 'd' fo... | You could use `awk`:
```
awk 'BEGIN {print "Hello" > "/tmp/file"}'
```
When an `awk` program consists of only a `BEGIN` statement, it just interprets that statement and doesn't process any input.
You can even parameterise this
```
awk -v text="World" -v file="/tmp/main" 'BEGIN {print text > file}'
```
Though wit... |
6,516,472 | I'm looking for something like `format()` in other programming languages in MySQL query. The expected result is text that has values from other fields.
For example, something like
`select formatted from table where formatted=stringformat('some text {0}, {1} some text.', field1, field2)` | 2011/06/29 | [
"https://Stackoverflow.com/questions/6516472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/300528/"
] | how about:
```
SELECT CONCAT('some text ', field1, ', ', field2, ' some text.') FROM table;
``` | ### create a column in query and give it any alias to get result in. see this example.
SELECT ('some text, ' + tb.Col1 + ', ' + tb.Col2) AS ColName
FROM
MyTable tb |
51,354,074 | I have the GridView like
[](https://i.stack.imgur.com/Y4jgC.png)
i choose one row and show up menu edit, when i edit the selected row.
How i get cell coloumn "Ket" focused and enable to edit that like :
[](https://i.stack.imgur.com/HhIvB.png)
Click *other software tab*,
[](https://i.stack.imgur.com/i65J9.png)
Uncheck **<http://ppa.launchpad.net/upubuntu-co... | There are no package for trusty in the upubuntu.com web repository:
on the command line you can switch it of by
```
sudo apt-add-repository --remove ppa:upubuntu-com/web
sudo apt-get update
```
See [Upubuntu Launchpad dists](http://ppa.launchpad.net/upubuntu-com/web/ubuntu/dists)
only natty, oneiric, precise and q... |
38,334 | Let's take a hypothetical sentence pronounced by a hypothetical person who speaks, say, of events that are more than 100 years in the past:
>
> "The civil war period was very violent. In those days, you **could have been killed** for any trifle."
>
>
>
Would this sentence be grammatical and logical if both the s... | 2014/11/02 | [
"https://ell.stackexchange.com/questions/38334",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/2127/"
] | There are two situations here: A. Hypothetical B. Reality
In hypothetical situations, you do not exist or you did not exist. Like in your example, the person to whom you are speaking to was not there in the civil war times - So your sentence
>
> "In those days you could be killed" is actually correct.
>
>
> ... | CORRECT: Back then, you (or one) could be killed for any trifle.
>
> There was very dangerous at that times because you would be looted,
> taken a beating and even gone home in a box...
>
>
>
**It was very dangerous in those times; you could be robbed, beaten, or even sent home in a box.**
"could have been kill... |
38,334 | Let's take a hypothetical sentence pronounced by a hypothetical person who speaks, say, of events that are more than 100 years in the past:
>
> "The civil war period was very violent. In those days, you **could have been killed** for any trifle."
>
>
>
Would this sentence be grammatical and logical if both the s... | 2014/11/02 | [
"https://ell.stackexchange.com/questions/38334",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/2127/"
] | Compare the following sentences:
**Present time**
1. It's very dangerous in Metropolis right now. You can be beaten up for just looking at someone the wrong way.
2. It's very dangerous in Metropolis right now. You could be beaten up for just looking at someone the wrong way.
Sentence (1) presents being beaten up as ... | There are two situations here: A. Hypothetical B. Reality
In hypothetical situations, you do not exist or you did not exist. Like in your example, the person to whom you are speaking to was not there in the civil war times - So your sentence
>
> "In those days you could be killed" is actually correct.
>
>
> ... |
38,334 | Let's take a hypothetical sentence pronounced by a hypothetical person who speaks, say, of events that are more than 100 years in the past:
>
> "The civil war period was very violent. In those days, you **could have been killed** for any trifle."
>
>
>
Would this sentence be grammatical and logical if both the s... | 2014/11/02 | [
"https://ell.stackexchange.com/questions/38334",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/2127/"
] | Compare the following sentences:
**Present time**
1. It's very dangerous in Metropolis right now. You can be beaten up for just looking at someone the wrong way.
2. It's very dangerous in Metropolis right now. You could be beaten up for just looking at someone the wrong way.
Sentence (1) presents being beaten up as ... | CORRECT: Back then, you (or one) could be killed for any trifle.
>
> There was very dangerous at that times because you would be looted,
> taken a beating and even gone home in a box...
>
>
>
**It was very dangerous in those times; you could be robbed, beaten, or even sent home in a box.**
"could have been kill... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.