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 |
|---|---|---|---|---|---|
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | For 2 variables I believe the following expression to be correct. If it is incorrect then I should like to know!
$$f(x,y) = \sum\_{m=0}^{\infty} \sum\_{n=0}^{\infty} \beta\_{m,n} (x-x\_0)^m (y-y\_0)^n$$
$$\beta\_{m,n} = \frac{1}{n! m!} \left[ \frac{\partial^{m+n}}{\partial x^m \partial y^n} \ f(x,y) \right]\_{(x=x\_0... | You need to understand gradient vector to understand this article, although it is quite useful and can direct you to formulate the taylor series formula more concisely: <http://www.math.ucdenver.edu/~esulliva/Calculus3/Taylor.pdf>. |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | One can think about Taylor's theorem in calculus as applying in the following cases:
1. Scalar-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}$
2. Vector-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}^n$
3. Scalar-valued functions of a vector varia... | For 2 variables I believe the following expression to be correct. If it is incorrect then I should like to know!
$$f(x,y) = \sum\_{m=0}^{\infty} \sum\_{n=0}^{\infty} \beta\_{m,n} (x-x\_0)^m (y-y\_0)^n$$
$$\beta\_{m,n} = \frac{1}{n! m!} \left[ \frac{\partial^{m+n}}{\partial x^m \partial y^n} \ f(x,y) \right]\_{(x=x\_0... |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | For 3 variables:
$$f(x,y,z)=f(x\_0,y\_0,z\_0)$$
$$+\frac{\partial f\_0}{\partial x}(x-x\_0)+\frac{\partial f\_0}{\partial y}(y-y\_0)+\frac{\partial f\_0}{\partial z}(z-z\_0)\quad \Rightarrow Order 1$$
$$+\frac{1}{2} \bigg(\frac{\partial^2 f\_0}{\partial x^2}(x-x\_0)^2+\frac{\partial^2 f\_0}{\partial y^2}(y-y\_0)^2+\fr... | You need to understand gradient vector to understand this article, although it is quite useful and can direct you to formulate the taylor series formula more concisely: <http://www.math.ucdenver.edu/~esulliva/Calculus3/Taylor.pdf>. |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | For 3 variables:
$$f(x,y,z)=f(x\_0,y\_0,z\_0)$$
$$+\frac{\partial f\_0}{\partial x}(x-x\_0)+\frac{\partial f\_0}{\partial y}(y-y\_0)+\frac{\partial f\_0}{\partial z}(z-z\_0)\quad \Rightarrow Order 1$$
$$+\frac{1}{2} \bigg(\frac{\partial^2 f\_0}{\partial x^2}(x-x\_0)^2+\frac{\partial^2 f\_0}{\partial y^2}(y-y\_0)^2+\fr... | Let's suppose the function we're to investigate is a C(k+1) function within its open domain which includes a as an internal point. The purpose is to somehow find "the best" (polynomial) approximation to the function, at points like x, inside an open sphere around our reference point a, about which we know the value of ... |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | For 2 variables I believe the following expression to be correct. If it is incorrect then I should like to know!
$$f(x,y) = \sum\_{m=0}^{\infty} \sum\_{n=0}^{\infty} \beta\_{m,n} (x-x\_0)^m (y-y\_0)^n$$
$$\beta\_{m,n} = \frac{1}{n! m!} \left[ \frac{\partial^{m+n}}{\partial x^m \partial y^n} \ f(x,y) \right]\_{(x=x\_0... | Let's suppose the function we're to investigate is a C(k+1) function within its open domain which includes a as an internal point. The purpose is to somehow find "the best" (polynomial) approximation to the function, at points like x, inside an open sphere around our reference point a, about which we know the value of ... |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | One can think about Taylor's theorem in calculus as applying in the following cases:
1. Scalar-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}$
2. Vector-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}^n$
3. Scalar-valued functions of a vector varia... | Let's suppose the function we're to investigate is a C(k+1) function within its open domain which includes a as an internal point. The purpose is to somehow find "the best" (polynomial) approximation to the function, at points like x, inside an open sphere around our reference point a, about which we know the value of ... |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | One can think about Taylor's theorem in calculus as applying in the following cases:
1. Scalar-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}$
2. Vector-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}^n$
3. Scalar-valued functions of a vector varia... | It is enough to understand the case $f:\ {\mathbb R}^n\to {\mathbb R}$, and we expand $f$ at $x=0$. So we are interested in polynomials of low degree $d$ in the variables $x\_1$, $\ldots$, $x\_n$ that approximate $f$ in the neighborhood of $0\in{\mathbb R}^n$.
The best polynomial of degree $\leq0$ for this purpose is ... |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | For 3 variables:
$$f(x,y,z)=f(x\_0,y\_0,z\_0)$$
$$+\frac{\partial f\_0}{\partial x}(x-x\_0)+\frac{\partial f\_0}{\partial y}(y-y\_0)+\frac{\partial f\_0}{\partial z}(z-z\_0)\quad \Rightarrow Order 1$$
$$+\frac{1}{2} \bigg(\frac{\partial^2 f\_0}{\partial x^2}(x-x\_0)^2+\frac{\partial^2 f\_0}{\partial y^2}(y-y\_0)^2+\fr... | For 2 variables I believe the following expression to be correct. If it is incorrect then I should like to know!
$$f(x,y) = \sum\_{m=0}^{\infty} \sum\_{n=0}^{\infty} \beta\_{m,n} (x-x\_0)^m (y-y\_0)^n$$
$$\beta\_{m,n} = \frac{1}{n! m!} \left[ \frac{\partial^{m+n}}{\partial x^m \partial y^n} \ f(x,y) \right]\_{(x=x\_0... |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | It is enough to understand the case $f:\ {\mathbb R}^n\to {\mathbb R}$, and we expand $f$ at $x=0$. So we are interested in polynomials of low degree $d$ in the variables $x\_1$, $\ldots$, $x\_n$ that approximate $f$ in the neighborhood of $0\in{\mathbb R}^n$.
The best polynomial of degree $\leq0$ for this purpose is ... | For 2 variables I believe the following expression to be correct. If it is incorrect then I should like to know!
$$f(x,y) = \sum\_{m=0}^{\infty} \sum\_{n=0}^{\infty} \beta\_{m,n} (x-x\_0)^m (y-y\_0)^n$$
$$\beta\_{m,n} = \frac{1}{n! m!} \left[ \frac{\partial^{m+n}}{\partial x^m \partial y^n} \ f(x,y) \right]\_{(x=x\_0... |
331,337 | I am in confidence with Taylor expansion of function $f\colon R \to R$, but I when my professor started to use higher order derivatives and multivariate Taylor expansion of $f\colon R^n \to R$ and $f\colon R^n \to R^m$ I felt lost.
*Can somean explain to me from scratch multivariate Taylor?*
In particular I don't und... | 2013/03/15 | [
"https://math.stackexchange.com/questions/331337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/66897/"
] | One can think about Taylor's theorem in calculus as applying in the following cases:
1. Scalar-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}$
2. Vector-valued functions of a scalar variable, i.e. $f : \mathbb{R} \rightarrow \mathbb{R}^n$
3. Scalar-valued functions of a vector varia... | You need to understand gradient vector to understand this article, although it is quite useful and can direct you to formulate the taylor series formula more concisely: <http://www.math.ucdenver.edu/~esulliva/Calculus3/Taylor.pdf>. |
3,652,331 | So let me start by saying that the weird thing about this error is that the application is running, and the error bubbles to the event log, but it's intermittent. Sometimes it's 2 hours between it happening, sometimes a few minutes, sometimes half an hour. Does not appear to be tied directly to requests (and requests d... | 2010/09/06 | [
"https://Stackoverflow.com/questions/3652331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53788/"
] | Does this also happen on Application start up or is it always at some time in the future after the application has started?
Check [Unhandled IIS Exception - How can I track it down](https://stackoverflow.com/questions/1799376/unhandled-iis-exception-how-can-i-track-it-down) (which has a **very** similar stack trace) w... | I have gotten similar errors and found that the real problem is not being reported. The accepted answer here is specific to ASP.NET (which is fine since that is what the question was about), but I was having the issue with a WPF browser application (which doesn't have a web.config file) and I found another way to see w... |
45,325,039 | In the following program, When I click on Add button in the options menu a dialog is opened wherein the user enters the data which is then shown in the ListView.
There are a number of problems with his code.
1) age.setText in the Custom Adapter causes the app to crash.Commenting out the age.settext line, it works well... | 2017/07/26 | [
"https://Stackoverflow.com/questions/45325039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7885436/"
] | You can use the `Range` object to insert text at a specific position. [msdn](https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.range.aspx)
```
doc1.Range(0, 0).Text = "Hello World";
```
If you have a template and the position to insert the text is always at the same location, you could also use ... | You can use the following to insert a string into another string in a specific position.
```
doc1.Content.Text = doc1.Content.Text.Insert(10, "Merge?");
```
Source: <https://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx> |
45,325,039 | In the following program, When I click on Add button in the options menu a dialog is opened wherein the user enters the data which is then shown in the ListView.
There are a number of problems with his code.
1) age.setText in the Custom Adapter causes the app to crash.Commenting out the age.settext line, it works well... | 2017/07/26 | [
"https://Stackoverflow.com/questions/45325039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7885436/"
] | For sake of simplicity, first add the bookmark in MS Word as follow:
Select the region where you want to add the text, Then go to Insert > Bookmark in Word.
[](https://i.stack.imgur.com/3eGzV.png)
Then give the name to the bookmark as follow:
[![en... | You can use the following to insert a string into another string in a specific position.
```
doc1.Content.Text = doc1.Content.Text.Insert(10, "Merge?");
```
Source: <https://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx> |
426,700 | I have a very strange problem with a NFS mount. I have a Synology NAS serving the home directories for a set of linux machines (Archlinux for the moment). The used protocol is NFS V3.
When I log into the machines using my main user, I can see that I have write permission to my home folder:
```
$ ls -ld ~
drwx------ 2... | 2018/02/26 | [
"https://unix.stackexchange.com/questions/426700",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/40241/"
] | You are root when you run this test. Depending on the server settings, this will forbid you to write to that folder. A normal user will not have that problem. | I recently had the same issue.
I am using a Synology NAS, and the problem has been resolved after updating the DSM (operating system) to the latest. Hope it helps the ones struggling with the same problem. |
46,010,819 | In my project, I want to display battery information in details. With `UIDevice` I can get battery level easily, but my demand is much more that just that. I want to obtain such battery health ,cycle count, voltage and even more details about the battery. (the more the better!! ). I really need some advice, thanks! | 2017/09/02 | [
"https://Stackoverflow.com/questions/46010819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7775634/"
] | You should use the `@Table` annotation. The problem is that you register two entities with the same name instead to bind them to same tables.
```
@Entity
@Table(name = "user")
public class Human
```
And then:
```
@Entity
@Table(name = "user")
public class Robot
``` | You are using same table for two different classes, it will get mixed up. How hibernate knows that user table is of human or robot.
Also both classes can have different properties.
Either create two different table or create a super class of `User` and extend `Human` and `Robot` classes from it. Put common attributes ... |
33,900,253 | For improving the performance of my android app i decided to re write calculation parts in c++ and use JNI. here is the problem :
My c++ method generates very large amount of objects (2k to 10k) in a multiple level loop. An object is being created in the deepest level and stored in a vector of jobject's for the later ... | 2015/11/24 | [
"https://Stackoverflow.com/questions/33900253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2975750/"
] | You could create global references of your objects using `NewGlobalRef` put those in the vector, then delete the local references. This way you can keep your objects in a vector as long as you don't run out of memory. Make sure you don't forget to delete those global references with `DeleteGlobalRef` once you don't nee... | OYou're saving the local reference in `Vector,` deleting it, but then using it out of `Vector` later on. You can't do that. You can't delete it until you're really finished with it.
Maybe you should look into `PushLocalFrame()` and friends if you're running out of local references.
Or use a Java collection instead of... |
12,207,656 | I'm currently almost at the end of a long journey into rails testing, but I'm banging my head on how to get request specs working with subdomains.
In development, I'm using pow with urls such as: `http://teddanson.myapp.dev/account` which is all fine and dandy.
In testing, I let capybara do it's thing which returns l... | 2012/08/31 | [
"https://Stackoverflow.com/questions/12207656",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/472259/"
] | You can use xip.io to test subdomains in Capybara/RSpec, as described here: <https://web.archive.org/web/20171222062651/http://chrisaitchison.com/2013/03/17/testing-subdomains-in-rails/> | Unfortunately you cannot use subdomain in capybara's test but I have a workaround for this problem.
I have helper class for resolving a subdomain from the request, see:
```
class SubdomainResolver
class << self
# Returns the current subdomain
def current_subdomain_from(request)
if Rails.env.test? and r... |
4,534,513 | Let $x\_n$ be a sequence of positive real numbers, which is not convergent. ($x\_n$ does not converge to a finite number, nor to infinity). Define
$$ A\_n = \frac{x\_1 + x\_2 + \cdots + x\_n}{n} \quad \text{ and }\quad G\_n = \sqrt[n]{x\_1x\_2...x\_n}.$$
>
> Does the convergence of $A\_n$ imply the convergence of $G... | 2022/09/19 | [
"https://math.stackexchange.com/questions/4534513",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/104576/"
] | You did the steps wrongly at "... then $0.3 = r^3$ ..."
It does not matter whether the variable is on the left or on the right. It is just a convention to have the variable on the left so that it is easier to read.
Observe how I do it with both cases where the variables on the left / on the right:
1. Variable on the... | If you multiply both sides by $1/200$ you get
$$
\frac{60}{200}=\frac{1}{r^3}\tag{1}
$$
Think to
$$
4=\frac{8}{2}
$$
which is a true equality; if you multiply both sides by $1/8$, you get
$$
\frac{4}{8}=\frac{1}{2}
$$
which is still true, not
$$
\frac{4}{8}=2
$$
which is clearly false.
Now our ($1$) becomes
$$
\frac{1... |
71,119,053 | #Write a function named add\_one\_to\_all that takes in a list of numbers and adds one to each of the original numbers
```
assert add_one_to_all([0, 0, 0]) == [1, 1, 1]
assert add_one_to_all([1, 2, 3]) == [2, 3, 4]
assert add_one_to_all([6, 7, 8]) == [7, 8, 9]
```
I've tried this
```
def my_list ([x,y,z]):
new_l... | 2022/02/14 | [
"https://Stackoverflow.com/questions/71119053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18207593/"
] | ```
def add_one_to_all(my_list):
return [x+1 for x in my_list]
``` | You can use `map`
```
l = [1, 2, 3]
print(list(map(lambda x:x+1, l)))
```
result
```
[2, 3, 4]
``` |
71,119,053 | #Write a function named add\_one\_to\_all that takes in a list of numbers and adds one to each of the original numbers
```
assert add_one_to_all([0, 0, 0]) == [1, 1, 1]
assert add_one_to_all([1, 2, 3]) == [2, 3, 4]
assert add_one_to_all([6, 7, 8]) == [7, 8, 9]
```
I've tried this
```
def my_list ([x,y,z]):
new_l... | 2022/02/14 | [
"https://Stackoverflow.com/questions/71119053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18207593/"
] | ```
def add_one_to_all(my_list):
return [x+1 for x in my_list]
``` | ```
def add_one_to_all(integer):
return integer+1
int_list = [1, 2, 3, 4, 5]
# Adding one on each integer
# using list comprehension.
output_list = [add_one_to_all(i) for i in int_list]
print(output_list)
```
>
> The output will be **[2,3,4,5,6]**
>
>
> |
7,608,694 | here is my code :
this is my application class >>>
```
import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.routing.Router;
import firstSteps.UserResource;
public class FirstStepsApplication extends Application {
@Override
public synchronized Restlet createRoot() {
Rou... | 2011/09/30 | [
"https://Stackoverflow.com/questions/7608694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/824774/"
] | In Restlet 2.1 (try M7 or above), it is possible to dispatch two HTTP GET calls to two Java methods in the same resource class. This is done by leveraging query parameters like this:
```
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;
/**
* Resource which has only one representation.
*... | Some time has passed since my last experience with Restlet, anyway, if you are implementing a fully REST API, I would expect the two to be separate resources if they really need to be. Otherwise, a resource should be mapped to exactly one representation, IMHO.
What is the benefit of having two URIs mapped to one reso... |
25,093,239 | I have this JSON file:
```
{"__v":4,"_id":"53dbeedb1a6550ee08c55c05","name":"Quatro formaggi","ingredients":["53c791b6e4b04af47f662f98","53c791b6e4b04af47f662f98","53c791b6e4b04af47f662f98","53c791b6e4b04af47f662f98"]}
```
I want get every ingredients. If I write:
```
{{pizza.ingredients}}
```
I get:
```
["53c7... | 2014/08/02 | [
"https://Stackoverflow.com/questions/25093239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3405595/"
] | Your (1) has nothing to do with (2) and (3).
And there are other places where you can bind controllers (e.g. a directive's `controller` property).
Each way is serves a different purpose, so go with the one that suits your situation.
* If you have a directive and want to give it a specific controller, use the Dir... | Im quite new too but Ill try to explain in a more layman way.
1 For each .js file you have (which may contain one or more controller defined), you need a corresponding entry into the script for #1 there. Its not the controller itself, more like to allow script to recognise that this .js file is part of the set of fil... |
25,093,239 | I have this JSON file:
```
{"__v":4,"_id":"53dbeedb1a6550ee08c55c05","name":"Quatro formaggi","ingredients":["53c791b6e4b04af47f662f98","53c791b6e4b04af47f662f98","53c791b6e4b04af47f662f98","53c791b6e4b04af47f662f98"]}
```
I want get every ingredients. If I write:
```
{{pizza.ingredients}}
```
I get:
```
["53c7... | 2014/08/02 | [
"https://Stackoverflow.com/questions/25093239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3405595/"
] | Your (1) has nothing to do with (2) and (3).
And there are other places where you can bind controllers (e.g. a directive's `controller` property).
Each way is serves a different purpose, so go with the one that suits your situation.
* If you have a directive and want to give it a specific controller, use the Dir... | I've added comments to one of the answers, but aside from syntax this may is more of a design question. Here is my *opinion*
Firstly, (1) is irrelevant to the conversation.
(2) is the preferred approach when specifying the controller for the view as it decouples the controller from the view itself. This can be useful... |
5,002,429 | Revisiting MySQL, and trying to change the structure of the table. I want to change two rows from a varchar(30) to higher.
I have googled it, and tried what appears to be the correct statement but I'm getting a syntax error:
```
ALTER TABLE 'compdetails' CHANGE 'compName' varchar(60) not null;
```
This statement h... | 2011/02/15 | [
"https://Stackoverflow.com/questions/5002429",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376083/"
] | For those interested in an answer from the Doug Lea on this topic, he recently explained the reason for `readValueUnderLock`
This is in response to someone who had the question:
>
> In the ConcurrentHashMap the get
> method does not require
> "readValueUnderLock" because a racing
> remove does not make the value ... | As far as I understand Memory Model, write to volatile variable is guaranteed to be visible by all subsequent (as defined by *synchronization order*) reads of that variable.
However, nothing guarantees that read of `e.value` in `get()` is subsequent to write of `value` in the constructor (since there are no *synchron... |
5,002,429 | Revisiting MySQL, and trying to change the structure of the table. I want to change two rows from a varchar(30) to higher.
I have googled it, and tried what appears to be the correct statement but I'm getting a syntax error:
```
ALTER TABLE 'compdetails' CHANGE 'compName' varchar(60) not null;
```
This statement h... | 2011/02/15 | [
"https://Stackoverflow.com/questions/5002429",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/376083/"
] | For those interested in an answer from the Doug Lea on this topic, he recently explained the reason for `readValueUnderLock`
This is in response to someone who had the question:
>
> In the ConcurrentHashMap the get
> method does not require
> "readValueUnderLock" because a racing
> remove does not make the value ... | >
> I confused at HashEntry comment, as
> JSR-133, once HashEntry is
> constructed, all final fields will be
> visible to all other threads, value
> field is volatile, so I think it
> visible to other threads too??? .
>
>
>
Other threads will see value as well but... The assigment of the entry (into the Objec... |
1,379,167 | i have a .txt file, where i have numbers such as-
```
99.69599
100.7113
101.7196
123.93
```
but whenever i am exporting them to excel, they become like this-
```
9.969.599
1.007.113
1.017.196
123.93
```
please note that the numbers in the .txt file in the US English format but the excel is in German format. s... | 2018/11/28 | [
"https://superuser.com/questions/1379167",
"https://superuser.com",
"https://superuser.com/users/968038/"
] | OK, I found the problem. I was using an `https://` url for the origin instead of an ssh url (`git@gitlab.com:...`). After switching to an ssh url the ssh key was used.
To view current remotes: `git remote -v`
To switch a remote: `git remote set-url origin git@gitlab.com:XXXXX` | Use this command:
```
ssh-copy-id username@server.domain.com
```
Change the user to your username, and target to your destination, so it will copy your ssh key to the target system. |
1,518,974 | Let $A\subset X$ be connected. Then I want to conclude that $\bar A$ is connected.
So I was trying to do the same thing as in the question of this post [The closure of a connected set is connected](https://math.stackexchange.com/questions/678032/the-closure-of-a-connected-set-is-connected#)
The thing is that I don't f... | 2015/11/08 | [
"https://math.stackexchange.com/questions/1518974",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/162343/"
] | Your transfer function is incorrect. Assuming that $y(n)$ is the output sequence and $x(n)$ is the input sequence, the transfer function is given by
$$H(z)=\frac{Y(z)}{X(z)}=0.634\frac{1-z^{-2}}{1-0.268z^{-2}}\tag{1}$$
The poles are the values of $z$ for which $(1)$ becomes infinity, or, equivalently, for which the d... | Apply Z-transform to the equation, gives:
$Y(z)=0.634X(z)-0.634z^{-2}X(z)+0.268z^{-2}Y(z)$
or:
$Y(z)\left(1-0.268z^{-2} \right)=0.634X(z)\left(1-z^{-2} \right)$
Now computing $H(z)=\frac{Y(z)}{X(z)}$,
$H(z)=\frac{Y(z)}{X(z)}=\frac{0.634\left(1-z^{-2}\right)}{1-0.268z^{-2}}$
For finding the poles, you simply need ... |
24,210,992 | I’m trying to set up a website using Spring.
I already managed to read data from a database I've set up, but now encountered a problem when trying to update rows in it. I'm using the `merge()` function of the `EntityManager`.
I don't get any errors or exceptions, it just wont update the data on the DB.
I'll try to giv... | 2014/06/13 | [
"https://Stackoverflow.com/questions/24210992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3723355/"
] | Windows Azure Storage supports geo-replication for Blobs, Tables and Queues. Data in the storage account is made durable by replicating transactions across different storage nodes in the same region (LRS) or a secondary region (GRS). GRS is the default redundancy option when creating a storage account. Refer to <http:/... | I am not sure of the exact use case of why you need to backup azure table and blob. You can backup All the above services without downtime; might be there would be slight glitch or bottleneck performance with SQL database durning back.
The single shot answer is to write a custom script which would read the data from a... |
17,603,701 | I have some items that I want to show to the user in a WPF window, but I want to hide the details of each item until the user selects/expands the item. I'd like to achieve Windows-Explorer-esque functionality, where the item Header is always displayed, and the item Details (as an `ItemsControl`) are displayed when the ... | 2013/07/11 | [
"https://Stackoverflow.com/questions/17603701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1964319/"
] | It can be done using `System.XML.Linq;`
```
var xmlDoc = xDocument.Load("text.xml");
var items = xmlDoc.Element("values").Elements("Item").Select(i => new {
ID = i.Attribute("ID").Value,
Type = i.Attribute("Type").Value,
Value = i.Attribute("Value").Value
});
foreach(var _item in items)
{
//write your logic
}
``... | ```
var doc = XDocument.Parse("<xml . ../>");
foreach (var item in doc.Element("Values").Elements("Item").OrderBy(x=>x.Attribute("ID").Value))
{
var type = item.Attribute("Type").Value;
if (type=="Notification")
{
// processing code here
}
}
``` |
66,545,950 | I am trying to label the outliers in my boxplot using the text function so I can find out from which class the outliers are coming from. I've stored the rownames of my data in variable "rownames" using names(vehData) to get the row names. When I apply this however, I get an error.
ERROR: **Error in which(removeOutlier... | 2021/03/09 | [
"https://Stackoverflow.com/questions/66545950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14723580/"
] | If it is the outliers in the 2nd boxplot, it would be:
```
bxpdat <- boxplot(removeOutliers1)
text(bxpdat$group, bxpdat$out,
bxpdat$names[bxpdat$group],
pos = 4)
```
[](https://i.stack.imgur.com/m4bor.png)
Maybe looks better like this, ... | I understood the question differently to @StupidWolf. I thought the goal was to replace points indicating outliers with the text of the vehicle class (bus, van or saab). If you simply print the variable name (e.g. Skew.maxis), then you might as well have simply plotted the outliers as points. Unless I'm missing somethi... |
26,663,208 | I have an image database. With an image table with two `bytea` columns. I would like to query the table and see these columns to be able to see whether or not these entries are storing images or not. As they are nullable columns.
Currently when I query the DB using psql command line, my whole command line screen goes ... | 2014/10/30 | [
"https://Stackoverflow.com/questions/26663208",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2743131/"
] | you can use the `encode` function:
```
select encode(bytea_column, 'hex')
from image;
```
If you only want to see the first bytes, just use the `left()` function on that:
```
select left(encode(bytea_column, 'hex'), 40)
from image;
```
More details in the manual:
<http://www.postgresql.org/docs/current/static/... | You can toggle expanded formatting mode with the following command
```
\x
``` |
26,663,208 | I have an image database. With an image table with two `bytea` columns. I would like to query the table and see these columns to be able to see whether or not these entries are storing images or not. As they are nullable columns.
Currently when I query the DB using psql command line, my whole command line screen goes ... | 2014/10/30 | [
"https://Stackoverflow.com/questions/26663208",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2743131/"
] | you can use the `encode` function:
```
select encode(bytea_column, 'hex')
from image;
```
If you only want to see the first bytes, just use the `left()` function on that:
```
select left(encode(bytea_column, 'hex'), 40)
from image;
```
More details in the manual:
<http://www.postgresql.org/docs/current/static/... | If you are not trying to interpret binary data yourself, why not just do:
```
select length(img1), length(img2) from Image
```
or
```
select img1 is null, img2 is null from Image
``` |
58,440,839 | I want to recreate the same design as the second image below using CSS grid. I got a problem with the alignment, of course because of the two spans the inputs are not aligned like they should be. I am almost there with CSS grid but i can't figure it out. Is there a way to do it with grid or is there another solution fo... | 2019/10/17 | [
"https://Stackoverflow.com/questions/58440839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9043877/"
] | This is a little of a variation on @Brice's answer, because in his version:
1. you need to adjust for each variation of the label text
2. if the font is rendered different, it will break (zoom, differences between platforms, etc).
This version solves it, but the idea to use absolute positioning to escape the flow is ... | Because the spans are different values, your `.grade-input` divs are becoming different widths and that is throwing off your alignment.
EDITED to get inputs aligned exactly centered:
If you make the spans `position: absolute;`, then you would be able to just align the inputs.
Try below HTML:
```
<div className="gr... |
71,755,708 | How can I do something like `select * from T1 inner join T2 on (T1.ID=T2.ID OR T1.ID2=T2.ID)`
When I execute this code, it seems to fall in a infinity loop so I guess I'm wrong.
In other words, how can I match one of two columns from T1 to one column from T2
T1
```
ID ID2
1 10
2 20
```
T2
```
ID value
1 dumm... | 2022/04/05 | [
"https://Stackoverflow.com/questions/71755708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13346068/"
] | You ***cannot*** reference an Object *parent* that way (Object(value) ← Array ← Object), and not even from an Object's parent Object.
What you can do instead is:
* Create two **Classes**, one for the parent and one for the child.
* When adding a child to the parent, just make a *"linked list"*, by referencing the p... | ```
const linkItems = [
{
id: 1,
name: 'Home Page',
urlParent: '/home',
get subItems(){
console.log(this.name);
return ([
(() => {
console.log(this);
return {
subId: 1,
name: 'Project 1',
section: '#project1',
urlParentFromOute... |
2,927,194 | I have following query:
```
var result = (
from role in db.Roles
join user in db.Users on role.RoleID equals user.RoleID
where
user.CreatedByUserID == userID
orderby user.FirstName ascending
... | 2010/05/28 | [
"https://Stackoverflow.com/questions/2927194",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/168535/"
] | I think found solution [here](https://stackoverflow.com/questions/2767143/linq-join-with-count):
```
var result = (
from role in db.Roles
join user in db.Users on role.RoleID equals user.RoleID
join deal in db.Deals on user.UserID equals deal.SalesAgentID into deals ... | If you would [create an association](http://msdn.microsoft.com/en-us/library/bb629295.aspx), you could write the query as
```
IQueryable<UserViewModel> result =
from user in db.Users
where user.CreatedByUserID == userID
orderby user.FirstName ascending
select new UserViewModel
{
UserID = user.UserID, ... |
46,197,841 | I have a little problem using findAll in my component. It concerns the value it returns at the end.
```
users: Ember.computed(function() {
return this.get('store').findAll('user');
}),
```
In my case, I want to get the name of the first object. So in my handlebar:
```
users.firstObject.name
```
'users' is a class... | 2017/09/13 | [
"https://Stackoverflow.com/questions/46197841",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6358270/"
] | `this.customer` is an array not an object. access the `customer_delivery_city_address` property by index.
```
this.cus_city = this.customer[0].customer_delivery_city_address;
console.log("City Address: " +this.cus_city)
``` | I would do it in this way.
```
customer: any;
getCustomer() {
return this.http.get('url').map((res: Response) => res.json());
}
loadCustomer(){
this.customer = [];
this.getCustomer().subscribe(d => {
for (var i = 0; i < d.length; i++) {
this.customer.push(d[i]);
}
}, err => {console.log(err)})
}
```
//in vie... |
46,197,841 | I have a little problem using findAll in my component. It concerns the value it returns at the end.
```
users: Ember.computed(function() {
return this.get('store').findAll('user');
}),
```
In my case, I want to get the name of the first object. So in my handlebar:
```
users.firstObject.name
```
'users' is a class... | 2017/09/13 | [
"https://Stackoverflow.com/questions/46197841",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6358270/"
] | I think the response which is coming is an array. You should try this:
```
this.customer[0].customer_delivery_city_address
``` | I would do it in this way.
```
customer: any;
getCustomer() {
return this.http.get('url').map((res: Response) => res.json());
}
loadCustomer(){
this.customer = [];
this.getCustomer().subscribe(d => {
for (var i = 0; i < d.length; i++) {
this.customer.push(d[i]);
}
}, err => {console.log(err)})
}
```
//in vie... |
45,086,903 | I have the following code block that basically checks for the existance of a entity in the DB and loads it to context for updating or in case it does not exist adds the new entity.
```
using (var db = new Entities.DB.DConn())
{
//...
foreach (Account account in accounts)
{
bool isNewRecord = false... | 2017/07/13 | [
"https://Stackoverflow.com/questions/45086903",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034022/"
] | Working with disconnected entities has been left by the designers of the EF for the developers using it. Thus there is no "proper" way - everything depends on the usage case and the entity model.
Since you seem to be forcing update of the existing records (by setting the `DateModified` to DateTime.UtcNow), there is no... | There is some way to improve performance. By example, using @Ivan solution to retrieve more than one account at a time to reduce the number of database round-trip
However, the SaveChanges methods will still make one database round-trip for every entity you need to Add or Update which is **INSANELY** slow.
---
**Disc... |
45,086,903 | I have the following code block that basically checks for the existance of a entity in the DB and loads it to context for updating or in case it does not exist adds the new entity.
```
using (var db = new Entities.DB.DConn())
{
//...
foreach (Account account in accounts)
{
bool isNewRecord = false... | 2017/07/13 | [
"https://Stackoverflow.com/questions/45086903",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034022/"
] | Working with disconnected entities has been left by the designers of the EF for the developers using it. Thus there is no "proper" way - everything depends on the usage case and the entity model.
Since you seem to be forcing update of the existing records (by setting the `DateModified` to DateTime.UtcNow), there is no... | We can make Ivan's answer even better performing using upserting (updating or inserting) all the accounts in one call.
I'm using Free package named EFCore.BulkExtensions that includes BulkInsertOrUpdate(list) method: <https://github.com/borisdj/EFCore.BulkExtensions>
(This package is listed in Microsoft ef extensions... |
45,086,903 | I have the following code block that basically checks for the existance of a entity in the DB and loads it to context for updating or in case it does not exist adds the new entity.
```
using (var db = new Entities.DB.DConn())
{
//...
foreach (Account account in accounts)
{
bool isNewRecord = false... | 2017/07/13 | [
"https://Stackoverflow.com/questions/45086903",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034022/"
] | We can make Ivan's answer even better performing using upserting (updating or inserting) all the accounts in one call.
I'm using Free package named EFCore.BulkExtensions that includes BulkInsertOrUpdate(list) method: <https://github.com/borisdj/EFCore.BulkExtensions>
(This package is listed in Microsoft ef extensions... | There is some way to improve performance. By example, using @Ivan solution to retrieve more than one account at a time to reduce the number of database round-trip
However, the SaveChanges methods will still make one database round-trip for every entity you need to Add or Update which is **INSANELY** slow.
---
**Disc... |
59,996,448 | I run Google Ads on my Google-App-Engine-hosted website (www.bigriddles.com), and they tell me I need to have an "ads.txt" file served from the root domain (i.e. <http://bigriddles.com/ads.txt>, as opposed to <http://www.bigriddles.com/ads.txt>).
My DNS is hosted on Gandi, and I created their "ALIAS" record (which I t... | 2020/01/31 | [
"https://Stackoverflow.com/questions/59996448",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12816973/"
] | `Object.keys` returns an array. You can iterate the array to build a new string, or simply join it:
`categories += options.join('<br>')`
**EDIT:** There are a few errors in your code that are preventing this from working:
1. Only have one onclick attribute on your button: `onclick="showCategories()"`
2. The option v... | You can add an event listener to your dropdown options and filter your menu options with the selected value. Then, it's just a matter of building up your elements and appending them to the list.
```js
const dessert = {
store: "Baskin Robbins",
inventory: {
"Ice cream": {
0: {
... |
55,599,741 | I'm creating a stored procedure that uses two multi-value parameters:
```
@Class AS VARCHAR(5),
@Service AS VARCHAR(5)
(…)
WHERE B.UTRCLS IN (@Class) AND B.UTSVC IN (@Service)
```
The procedure works fine when both parameters only contain one value. However, when either or both use multiple values, it throws an ... | 2019/04/09 | [
"https://Stackoverflow.com/questions/55599741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11063543/"
] | If you only have one location to redirect to, check out Andrew1325's answer. If there are multiple route-to-redirect match-ups, [this thread](https://github.com/nuxt/nuxt.js/issues/112) has some ideas.
The way I do it is with "anonymous" middleware, like so:
In /pages/browse/index.js
```js
<script>
export default {... | To redirect automatically or under certain conditions you need to use **middleware**. This can be setup like this:
```
//browse/index.js
<template>
//no need for content as redirecting
</template>
<script>
export default {
middleware: 'redirect'
}
</script>
```
and your middleware file...
```
//middleware/redi... |
55,599,741 | I'm creating a stored procedure that uses two multi-value parameters:
```
@Class AS VARCHAR(5),
@Service AS VARCHAR(5)
(…)
WHERE B.UTRCLS IN (@Class) AND B.UTSVC IN (@Service)
```
The procedure works fine when both parameters only contain one value. However, when either or both use multiple values, it throws an ... | 2019/04/09 | [
"https://Stackoverflow.com/questions/55599741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11063543/"
] | To redirect automatically or under certain conditions you need to use **middleware**. This can be setup like this:
```
//browse/index.js
<template>
//no need for content as redirecting
</template>
<script>
export default {
middleware: 'redirect'
}
</script>
```
and your middleware file...
```
//middleware/redi... | Big ups to [@parker\_codes](https://stackoverflow.com/questions/55599694/how-to-redirect-to-child-route-in-nuxt#answer-55601274), there is a little deficiency is his implementation which is **circular redirection** a.k.a forever redirect loop.
To solve this, add some checks in the parent component. This is because `Nu... |
55,599,741 | I'm creating a stored procedure that uses two multi-value parameters:
```
@Class AS VARCHAR(5),
@Service AS VARCHAR(5)
(…)
WHERE B.UTRCLS IN (@Class) AND B.UTSVC IN (@Service)
```
The procedure works fine when both parameters only contain one value. However, when either or both use multiple values, it throws an ... | 2019/04/09 | [
"https://Stackoverflow.com/questions/55599741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11063543/"
] | If you only have one location to redirect to, check out Andrew1325's answer. If there are multiple route-to-redirect match-ups, [this thread](https://github.com/nuxt/nuxt.js/issues/112) has some ideas.
The way I do it is with "anonymous" middleware, like so:
In /pages/browse/index.js
```js
<script>
export default {... | Big ups to [@parker\_codes](https://stackoverflow.com/questions/55599694/how-to-redirect-to-child-route-in-nuxt#answer-55601274), there is a little deficiency is his implementation which is **circular redirection** a.k.a forever redirect loop.
To solve this, add some checks in the parent component. This is because `Nu... |
371,464 | I need to get the names of files which are starting with a string testfile. Also i want to create a XML file in the same location and write these file names into the XML.
```
<path>
<dir>
<file>testfile1</file>
</dir>
<dir>
<file>testfile2</file>
</dir>
<path>
``` | 2011/12/25 | [
"https://superuser.com/questions/371464",
"https://superuser.com",
"https://superuser.com/users/109580/"
] | As @slhck said, the shell isn't really the right tool for writing XML (although it's not as bad as trying to parse XML in the shell...), but it's not too hard to do a quick&dirty script:
```
targetdir="/path/to/dir/of/files"
prefix="testfile"
outfile="$targetdir/out.xml"
# Write the opening tag(s):
echo "<path>" >"$o... | It is possible for the bash shell to create an XML file containing the names of files matching a pattern (in this case `testfile*`):
```
#!/bin/bash
XML_LIST="$HOME/xml.list"
touch $XML_LIST
#find files matching the regex
find /home/ -name "testfile*" -print0 | xargs -n1 -0 >> /tmp/temp_filelist
echo "<path>" > $XM... |
18,888,756 | i need to implement some intersting behavior for menu on my website.
on a mainpage menu div must be pinned to bottom of the window and when user scrolls down - menu goes up and stays pinned to top of the window.
and when user scrolls back to top - menu goes down and stays pinned bottom.
and unfortunately i don't have... | 2013/09/19 | [
"https://Stackoverflow.com/questions/18888756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/978119/"
] | **DEMO: <http://jsfiddle.net/M3KLB/1/>**
HTML
----
```
<ul id="menu" class="bottom">
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
</ul>
```
CSS
---
```
#menu {
left: 0;
background-color: red;
width: 100px;
}
#menu.bottom {
position: absolute;
bottom: 0;
}
#men... | Basically, position 'fixed' on the menu - fixed to the bottom.
Then put in a handler that detects when the window is scrolled
```
$(window).scroll(function(){
do stuff . . .
});
```
You can work out the page position
```
if( pagePosVar != 0){
do animate . . . (menu to top)
}else{
do animate . . . (men... |
67,395,982 | My Spring boot application has REST endpoints and has scheduled tasks. Which AWS service should I use?
I was considering beanstalk, but there I have to choose a web or worker environment. Similar selection is required in Heroku also.
My application can withstand crashes, if it can spin up automatically.
Can you sugg... | 2021/05/05 | [
"https://Stackoverflow.com/questions/67395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077917/"
] | When I used other endpoints, The issue was fixed. You can try the below endpoints.
**BSC RPC Endpoints:**
```
https://data-seed-prebsc-1-s1.binance.org:8545/
https://data-seed-prebsc-2-s1.binance.org:8545/
https://data-seed-prebsc-1-s2.binance.org:8545/
https://data-seed-prebsc-2-s2.binance.org:8545/
https://data-see... | ```js
bsc: {
networkCheckTimeout: 999999,
provider: () => new HDWalletProvider(mnemonic, `https://data-seed-prebsc-1-s1.binance.org:8545`),
network_id: 97, // Ropsten's id
gas: 5500000, // Ropsten has a lower block limit than mainnet
confirmations: 10, // # of confs to wait between deployments. (default: 0)
... |
67,395,982 | My Spring boot application has REST endpoints and has scheduled tasks. Which AWS service should I use?
I was considering beanstalk, but there I have to choose a web or worker environment. Similar selection is required in Heroku also.
My application can withstand crashes, if it can spin up automatically.
Can you sugg... | 2021/05/05 | [
"https://Stackoverflow.com/questions/67395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077917/"
] | I searched for more than a week. Finally, I found the answer [here](https://www.cnblogs.com/softfair/p/Truffle-migirate-deploy-contract-ESOCKETTIMEDOUT.html), Not only change the `pollingInterval`, but also do this: in the module `web3-provider-engine`, modify the `timeout` a bigger number. Remember that, the module ma... | ```js
bsc: {
networkCheckTimeout: 999999,
provider: () => new HDWalletProvider(mnemonic, `https://data-seed-prebsc-1-s1.binance.org:8545`),
network_id: 97, // Ropsten's id
gas: 5500000, // Ropsten has a lower block limit than mainnet
confirmations: 10, // # of confs to wait between deployments. (default: 0)
... |
67,395,982 | My Spring boot application has REST endpoints and has scheduled tasks. Which AWS service should I use?
I was considering beanstalk, but there I have to choose a web or worker environment. Similar selection is required in Heroku also.
My application can withstand crashes, if it can spin up automatically.
Can you sugg... | 2021/05/05 | [
"https://Stackoverflow.com/questions/67395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077917/"
] | When I used other endpoints, The issue was fixed. You can try the below endpoints.
**BSC RPC Endpoints:**
```
https://data-seed-prebsc-1-s1.binance.org:8545/
https://data-seed-prebsc-2-s1.binance.org:8545/
https://data-seed-prebsc-1-s2.binance.org:8545/
https://data-seed-prebsc-2-s2.binance.org:8545/
https://data-see... | The problem is that BSC produces blocks so quickly that it exceeds the default number of blocks Truffle is configured to wait for. You can solve this by adding the `networkCheckTimeout` and `timeoutBlocks` fields in your network config:
```json
bsc: {
networkCheckTimeout: 1000000,
timeoutBlocks: 200
}
``` |
67,395,982 | My Spring boot application has REST endpoints and has scheduled tasks. Which AWS service should I use?
I was considering beanstalk, but there I have to choose a web or worker environment. Similar selection is required in Heroku also.
My application can withstand crashes, if it can spin up automatically.
Can you sugg... | 2021/05/05 | [
"https://Stackoverflow.com/questions/67395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077917/"
] | I searched for more than a week. Finally, I found the answer [here](https://www.cnblogs.com/softfair/p/Truffle-migirate-deploy-contract-ESOCKETTIMEDOUT.html), Not only change the `pollingInterval`, but also do this: in the module `web3-provider-engine`, modify the `timeout` a bigger number. Remember that, the module ma... | The problem is that BSC produces blocks so quickly that it exceeds the default number of blocks Truffle is configured to wait for. You can solve this by adding the `networkCheckTimeout` and `timeoutBlocks` fields in your network config:
```json
bsc: {
networkCheckTimeout: 1000000,
timeoutBlocks: 200
}
``` |
67,395,982 | My Spring boot application has REST endpoints and has scheduled tasks. Which AWS service should I use?
I was considering beanstalk, but there I have to choose a web or worker environment. Similar selection is required in Heroku also.
My application can withstand crashes, if it can spin up automatically.
Can you sugg... | 2021/05/05 | [
"https://Stackoverflow.com/questions/67395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077917/"
] | When I used other endpoints, The issue was fixed. You can try the below endpoints.
**BSC RPC Endpoints:**
```
https://data-seed-prebsc-1-s1.binance.org:8545/
https://data-seed-prebsc-2-s1.binance.org:8545/
https://data-seed-prebsc-1-s2.binance.org:8545/
https://data-seed-prebsc-2-s2.binance.org:8545/
https://data-see... | I searched for more than a week. Finally, I found the answer [here](https://www.cnblogs.com/softfair/p/Truffle-migirate-deploy-contract-ESOCKETTIMEDOUT.html), Not only change the `pollingInterval`, but also do this: in the module `web3-provider-engine`, modify the `timeout` a bigger number. Remember that, the module ma... |
67,395,982 | My Spring boot application has REST endpoints and has scheduled tasks. Which AWS service should I use?
I was considering beanstalk, but there I have to choose a web or worker environment. Similar selection is required in Heroku also.
My application can withstand crashes, if it can spin up automatically.
Can you sugg... | 2021/05/05 | [
"https://Stackoverflow.com/questions/67395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077917/"
] | When I used other endpoints, The issue was fixed. You can try the below endpoints.
**BSC RPC Endpoints:**
```
https://data-seed-prebsc-1-s1.binance.org:8545/
https://data-seed-prebsc-2-s1.binance.org:8545/
https://data-seed-prebsc-1-s2.binance.org:8545/
https://data-seed-prebsc-2-s2.binance.org:8545/
https://data-see... | Best way I found to avoid this error is to
```
truffle compile
```
manually before migration.
Then, when migrate, to add the --compile-none option.
```
truffle migrate --network xxx --compile-none
``` |
67,395,982 | My Spring boot application has REST endpoints and has scheduled tasks. Which AWS service should I use?
I was considering beanstalk, but there I have to choose a web or worker environment. Similar selection is required in Heroku also.
My application can withstand crashes, if it can spin up automatically.
Can you sugg... | 2021/05/05 | [
"https://Stackoverflow.com/questions/67395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077917/"
] | I searched for more than a week. Finally, I found the answer [here](https://www.cnblogs.com/softfair/p/Truffle-migirate-deploy-contract-ESOCKETTIMEDOUT.html), Not only change the `pollingInterval`, but also do this: in the module `web3-provider-engine`, modify the `timeout` a bigger number. Remember that, the module ma... | Best way I found to avoid this error is to
```
truffle compile
```
manually before migration.
Then, when migrate, to add the --compile-none option.
```
truffle migrate --network xxx --compile-none
``` |
17,750,340 | I have some very complex XSD schemas to work with. By complex I mean that each of these XSD would correspont to about 20 classes / tables in a database, with each table having approximately 40 fields. And I have 18 different XSD like that to program.
What I'm trying to achieve is: Get a XML file defined by the XSD and... | 2013/07/19 | [
"https://Stackoverflow.com/questions/17750340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/447387/"
] | You can use generateDS to create django models from your XSD. You do this using the gends\_run\_gen\_django script, which is located under the django directory in the generateDS source. Here is some [documentation](http://www.rexx.com/~dkuhlman/generateDS.html#django-generating-models-and-forms) on that functionality. ... | Not sure if there is a way directly, but you could indirectly go from XSD to a SQL Server DB, and then import the DB from SQLAlchemy |
35,120,688 | I have a long Excel spreadsheet with names in 2 columns and I am trying to be able to count the number of times a name appears in column A with a particular name appearing in the same row in column B but I am getting caught up with formulas.
For example, if I have:
```
Col A, Col B
Wilson, Ted
Wilson, Alice
Poole, Fr... | 2016/01/31 | [
"https://Stackoverflow.com/questions/35120688",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4670655/"
] | I don't know the details of your code but it sounds like a job for condition variables: [cs.nmsu.edu/~jcook/Tools/pthreads/pthread\_cond.html](http://www.cs.nmsu.edu/~jcook/Tools/pthreads/pthread_cond.html) – Galik
I've just implemented the solution based upon the `pthread_cond_signal` and `pthread_cond_timedwait` and... | In sending a signal, you're doing the right thing.
The only thing that is missing is catching that signal. You have to replace the signal action with your own one. In the signal handler you can set a variable and check for it after sleep returns.
Look into `sigaction` |
31,097,716 | So I'm using the NavigationView provided by [Android Design Support Library](http://android-developers.blogspot.in/2015/05/android-design-support-library.html)

I can't seem to find examples on how to style it.
So far I have:
```
<android.support.d... | 2015/06/28 | [
"https://Stackoverflow.com/questions/31097716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2251156/"
] | I have answered to a similar question [Here](https://stackoverflow.com/a/31074133/23195420).
Basically what you need do is , use a `Color State List Resource`. For that , first create a new `xml` (e.g drawer\_item.xml) inside `color` directory (which should be inside `res` directory.) If you don't have a directory na... | To expand on @Sash\_KP's answer, for the `xml` in the `drawable` folder, you dont need the `@drawable/shape_rectangle` and `@drawable/shape_rectangle_check`. You can just use `@color/your_color`.
Also for `API >= 21`, I've noticed that the navigation menu items by default have a preset selector. You'll notice if you t... |
33,790,401 | I want to create a program that removes space between characters in a string.
Here is my code:
```
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
int main(){
char str[10]="I love you",temp[20];
int i,j;
for(i=0;str[i];i++){
if(str[i] ==" "){
}
... | 2015/11/18 | [
"https://Stackoverflow.com/questions/33790401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5578530/"
] | There are several problems with your program.
Though this initialization of a character array is valid in C
```
char str[10]="I love you",temp[20];
^^^^
```
nevertheless the array `str` will not contain the terminating zero of the string literal `"I love you"` because the string literal contains 11 chara... | You're using double quotes to reference a single character - comparing it to a single char[] element in your string, you should use single quotes:
```
if (str[i] == ' ')
```
Also, not 100% here so maybe someone can confirm - the inactive/empty if condition may throw up at least a warning, try changing it to:
```
if... |
33,790,401 | I want to create a program that removes space between characters in a string.
Here is my code:
```
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
int main(){
char str[10]="I love you",temp[20];
int i,j;
for(i=0;str[i];i++){
if(str[i] ==" "){
}
... | 2015/11/18 | [
"https://Stackoverflow.com/questions/33790401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5578530/"
] | There are several problems with your program.
Though this initialization of a character array is valid in C
```
char str[10]="I love you",temp[20];
^^^^
```
nevertheless the array `str` will not contain the terminating zero of the string literal `"I love you"` because the string literal contains 11 chara... | Welp this worked for me i just searched up a bit.
```
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include"stdafx.h"
int main(void)
{
char str[11] = "I love you", str2;
char *src, *dst;
for (src = dst = str; *src != '\0'; src++) {
*dst = *src;
if (*dst != ' ') dst++;
}
... |
25,386,296 | I am saving MapTiles to my internal cache which I retrieve using `getCacheDir()`. I have a few questions regarding the handling of the cache size.
1. How should I go about setting a maximum size for my cache directory before I start handling the deletion of files? With the newer devices a large cache isn't so much of ... | 2014/08/19 | [
"https://Stackoverflow.com/questions/25386296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/507313/"
] | 1. for how to handle the size, I guess the best approach is to check how much are you using:
* here it shows how to get free space [Get free space on internal memory](https://stackoverflow.com/questions/4595334/get-free-space-on-internal-memory)
* the class shown on this link `StatFs` can also tell you what is the t... | Regarding 1) In my applications I often use disc based image caches. I have always used a fixed cache size, which has worked fine so far. I don't know about your size requirements, but you could determine the total available disc size and calculate some ratio of that (see: [Getting all the total and available space on ... |
9,924,453 | I am developing a mobile social TV application on Android.I want to integrate Facebook with my application so that I can:
1. Share things on Facebook
2. Send request to friends on Facebook to join the application | 2012/03/29 | [
"https://Stackoverflow.com/questions/9924453",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1249713/"
] | You may use this.
[Facebook Android SDK](http://developers.facebook.com/docs/reference/androidsdk/)
But carefull about handling activity result. If you test integration in simulator you haven't installed facebook app. and sdk will show you a dialog with webview. But on a real phone if facebook app. is installed, auth... | you need to install an extension, similar to the core Android SDK, but no, here is what you need to do:
1.) go to <https://github.com/facebook/facebook-android-sdk>
2.) download the facebook directory ONLY! The other directories are only examples.
3.) Put the files from the src (you can copy the drawables too, if yo... |
26,165,211 | I am building an interactive educational small app, where I help kids discover the different parts of body.
<http://www.easypacelearning.com/images/TheWholeBody.jpg>
Technically, I want to know how can I select some parts in the image, to let users click on a portion of an image and link to a new more specific image... | 2014/10/02 | [
"https://Stackoverflow.com/questions/26165211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3378649/"
] | You can achieve this with an "[Image Map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map)". This is a long forgotten feature of HTML.
To create linkable areas in your image, you use the `<map/>` element along with [`<area/>` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area).
The ... | You can add elements to you image and position them absolute like this:
```
#eye {
position: absolute;
height: 10px; // size of area
width: 10px;
top: 20px; // position
left: 20px;
cursor: pointer; // make it "feel" clickable
// maybe you want to make a circle instead of a rectangle, y... |
35,577,965 | Having this html:
```
<div class="images_portfolio panel-widget-style">
<a href="imagelink"><img src="x.jpg" alt="" /></a>
<a href="imagelink"><img src="x.jpg" alt="" /></a>
<a href="imagelink"><img src="x.jpg" alt="" /></a>
<a href="imagelink"><img src="x.jpg" alt="" /></a>
<a href="imagelink"><img src="x.jpg" alt=""... | 2016/02/23 | [
"https://Stackoverflow.com/questions/35577965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2188778/"
] | Try using `width: 33,33333333%` and instead of `margin-right` use `padding-right`. Padding is offset inside the element that counts towards elements width. | You can achieve it with javascript for example
<https://jsfiddle.net/fx1azr4q/>
```
(function() {
var elements = document.getElementsByTagName('a');
[].forEach.call(elements, function (el) {
el.style.width = (100-elements.length)/elements.length + '%';
});
})();
``` |
73,112,252 | I've created a mat-form-field within an formArray, which allows me to display an image inside the option tag of the select box.[](https://i.stack.imgur.com/erRFe.png)
Now I want to display to the left side of the filled inputfields the an image of... | 2022/07/25 | [
"https://Stackoverflow.com/questions/73112252",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15996575/"
] | There is a much simpler approach:
1. create a new sheet with no filters present.
2. double click longitude and latitude fields, one after the other
3. After the Map is **AUTO GENERATED**, use your Business name field as a second layer of the Map
4. you can find more info here : <https://help.tableau.com/current/pro/de... | For maps, longitude goes on columns as the run vertically in a map. Likewise latitude goes on rows as those run horizontally. Then set the mark type to Map.
[](https://i.stack.imgur.com/cl6AS.png)
Now place your Business Name and Rating Value on the ... |
31,700,665 | I have been searching high and low for an answer on this and I am completly dumbfounded.
I am implementing simple click and page tracking in my Android app using GA, running this through GTM. All my "Screens" are visible in realtime in GA but I can't get "Events" to appear at all.
Well actually I can but the behaviou... | 2015/07/29 | [
"https://Stackoverflow.com/questions/31700665",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1659009/"
] | The Event Value should be a number, not a string. Shuffle the fields, for example - Action - Click on: {{GTM - Click Target}}, Label - {{GTM - Click Value}}, and leave the value empty, this will fix your problem. | Make sure, you have correctly setted up Click listener.
Enable when defines when is listener available and where is applied to the all DOM elements.
Fire ON defines conditions, so in your case it could be **{{event}} equals gtm.click** or **{{event}} equals gtm.linkClick** .
This is the most common pitfall when sett... |
70,060,775 | I'm trying to reverse this linked-list but after giving input it gives output **Segmentation fault (core dumped)** while printing the list.
This only happened when I declare 4th pointer before that it was working fine when there were only three pointers head, newcode, temp.
```
#include <stdio.h>
#include <stdlib.h>
... | 2021/11/22 | [
"https://Stackoverflow.com/questions/70060775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17021070/"
] | So I figured out how to to upgrade to the latest version of node js. First you need to remove the older version of node with this syntax:
```
sudo apt-get purge --auto-remove nodejs
```
Install `npm` with:
```
sudo apt install npm
```
For me it already installed the latest version of node js, however if it did no... | Consider using [nvm](https://github.com/nvm-sh/nvm) and specifying the version you would like to use:
```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
nvm install 13.10.1
```
You can try clearing you cache if you want to edit your global node [version](https://stackoverflow.com/que... |
70,060,775 | I'm trying to reverse this linked-list but after giving input it gives output **Segmentation fault (core dumped)** while printing the list.
This only happened when I declare 4th pointer before that it was working fine when there were only three pointers head, newcode, temp.
```
#include <stdio.h>
#include <stdlib.h>
... | 2021/11/22 | [
"https://Stackoverflow.com/questions/70060775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17021070/"
] | ---
The `Node.js v10.19.0` Conundrum
================================
---
>
> "I am going to answer this question in reference to Ubuntu, because I know about the `apt` package maintainer, and I feel that even if you don't use Ubuntu as your distro, so long as your a Linux user, you have still used `apt`/`apt-get`.... | Consider using [nvm](https://github.com/nvm-sh/nvm) and specifying the version you would like to use:
```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
nvm install 13.10.1
```
You can try clearing you cache if you want to edit your global node [version](https://stackoverflow.com/que... |
70,060,775 | I'm trying to reverse this linked-list but after giving input it gives output **Segmentation fault (core dumped)** while printing the list.
This only happened when I declare 4th pointer before that it was working fine when there were only three pointers head, newcode, temp.
```
#include <stdio.h>
#include <stdlib.h>
... | 2021/11/22 | [
"https://Stackoverflow.com/questions/70060775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17021070/"
] | I also updated node js to 16.5.1 version but still showing 10.19.0 version. A simple command worked for me:
```
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
```
Here, 12.x with version.For 16th version installation:
```
curl -fsSL https://deb.nodesource.com/setup_... | Consider using [nvm](https://github.com/nvm-sh/nvm) and specifying the version you would like to use:
```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
nvm install 13.10.1
```
You can try clearing you cache if you want to edit your global node [version](https://stackoverflow.com/que... |
70,060,775 | I'm trying to reverse this linked-list but after giving input it gives output **Segmentation fault (core dumped)** while printing the list.
This only happened when I declare 4th pointer before that it was working fine when there were only three pointers head, newcode, temp.
```
#include <stdio.h>
#include <stdlib.h>
... | 2021/11/22 | [
"https://Stackoverflow.com/questions/70060775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17021070/"
] | So I figured out how to to upgrade to the latest version of node js. First you need to remove the older version of node with this syntax:
```
sudo apt-get purge --auto-remove nodejs
```
Install `npm` with:
```
sudo apt install npm
```
For me it already installed the latest version of node js, however if it did no... | I also updated node js to 16.5.1 version but still showing 10.19.0 version. A simple command worked for me:
```
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
```
Here, 12.x with version.For 16th version installation:
```
curl -fsSL https://deb.nodesource.com/setup_... |
70,060,775 | I'm trying to reverse this linked-list but after giving input it gives output **Segmentation fault (core dumped)** while printing the list.
This only happened when I declare 4th pointer before that it was working fine when there were only three pointers head, newcode, temp.
```
#include <stdio.h>
#include <stdlib.h>
... | 2021/11/22 | [
"https://Stackoverflow.com/questions/70060775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17021070/"
] | ---
The `Node.js v10.19.0` Conundrum
================================
---
>
> "I am going to answer this question in reference to Ubuntu, because I know about the `apt` package maintainer, and I feel that even if you don't use Ubuntu as your distro, so long as your a Linux user, you have still used `apt`/`apt-get`.... | I also updated node js to 16.5.1 version but still showing 10.19.0 version. A simple command worked for me:
```
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
```
Here, 12.x with version.For 16th version installation:
```
curl -fsSL https://deb.nodesource.com/setup_... |
8,617,794 | I'm trying to reference two primary keys from two different tables, but the problem is that they don't match due to its character length.
For an example , `person.personid = '1234'` and `department.personid = '12345'`.
Is there an SQL statement in which I can use to match the first 4 or 5 characters of the primary k... | 2011/12/23 | [
"https://Stackoverflow.com/questions/8617794",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1113616/"
] | You shouldn't exit after exploring the first child. You don't need the `if` statement in front of the `for` loop.
```
private nNode recursiveSearch(data gi,nNode node){
if (node.getdata()==gi)
return node;
nNode[] children = node.getChildren();
nNode res = null;
for (int i = 0; res == null && ... | In your code if recursiveSearch(gi, children[i]) returned null then i+1 not searched, modify:
```
private nNode recursiveSearch(data gi,nNode node){
if (node.getdata()==gi)
return node;
nNode[] children = node.getChildren();
nNode temp;
if (children.length>0)
for (i... |
19,639,764 | I just need some clarification.
I need to get my PHP page to move from one page to another once the 'submit' button is clicked. I presumed it was
```
$_SESSION['ID'] = $row['ID'];
header("location:newpage.php");
}
```
Any help/advice is greatly appreciated to these newbie!! | 2013/10/28 | [
"https://Stackoverflow.com/questions/19639764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729578/"
] | If you want to move to other page after clicking the submit button. It will be better to add action tag to your form.
Example:
```
<form method="GET" action="newpage.php">
<input type="submit" value="Send me to new page" />
</form>
``` | `header()` only works prior to any output. You can't use it in an interactive way like this. Try [zaynetro's suggestion](https://stackoverflow.com/a/19639953/2057919) and see if that helps. |
19,639,764 | I just need some clarification.
I need to get my PHP page to move from one page to another once the 'submit' button is clicked. I presumed it was
```
$_SESSION['ID'] = $row['ID'];
header("location:newpage.php");
}
```
Any help/advice is greatly appreciated to these newbie!! | 2013/10/28 | [
"https://Stackoverflow.com/questions/19639764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729578/"
] | If you want to move to other page after clicking the submit button. It will be better to add action tag to your form.
Example:
```
<form method="GET" action="newpage.php">
<input type="submit" value="Send me to new page" />
</form>
``` | You could output an redirect from javascript once your php is done (assuming your form processor is on the same page with the html) . For example:
```
$_SESSION['ID'] = $row['ID'];
if($_SESSION['ID']){
?>
<script type="text/javascript">
window.location = 'newpage.php';
... |
11,548,387 | Here is a piece of code i am trying to write. Here i want to retrieve data from the database, store that into an array and then json\_ecode it and set is as output. But i keep on getting this error "Trying to get property of non-object".
Here is the code
```
$data['query'] = $this->db->get('forms');
foreach($data['q... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11548387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1212207/"
] | Make a shortcut. I don't know the browser you are targeting, but here's a link for IE
<http://support.microsoft.com/kb/168124> | Well it depends on which platform your website is built upon.
Assuming you're using `ASP.NET`. You will find that the file "making the server go live" is some executable in the `IIS` folder (Assuming your friends have `IIS` installed...). Using a batch file, you can make it automatically start the server according t... |
52,941,226 | I have an application that all the radiologists generates their reports by logging into the application. But I does not want user to login with their user id and password. when a user enters url it should not open a login page . I tried returning true when a user enters an URL like below.
```
<?php if($app->isLoggedI... | 2018/10/23 | [
"https://Stackoverflow.com/questions/52941226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Although Nova does not provide a `->height()` method, when you generate a Nova card it creates `resources/js/components/Card.vue` automatically ([see Nova card documentation](https://nova.laravel.com/docs/1.0/customization/cards.html#assets))
The Card.vue file allows you to modify the Vue template for the card elemen... | As of now you can only adjust the width of the Card from the Card's php file using the `->width()` method.
When you set the card width to `1/2` contents from the card seems to overflow. I solved the issue by adding the class `h-auto` to the `<card>` inside the `Card.vue`. |
52,941,226 | I have an application that all the radiologists generates their reports by logging into the application. But I does not want user to login with their user id and password. when a user enters url it should not open a login page . I tried returning true when a user enters an URL like below.
```
<?php if($app->isLoggedI... | 2018/10/23 | [
"https://Stackoverflow.com/questions/52941226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Although Nova does not provide a `->height()` method, when you generate a Nova card it creates `resources/js/components/Card.vue` automatically ([see Nova card documentation](https://nova.laravel.com/docs/1.0/customization/cards.html#assets))
The Card.vue file allows you to modify the Vue template for the card elemen... | I solved this by adding this to my nova theme:
```
.card-panel {
height: auto !important;
min-height: 150px;
}
```
Solution originally posted here:
<https://github.com/laravel/nova-issues/issues/1014#issuecomment-451355417> |
52,941,226 | I have an application that all the radiologists generates their reports by logging into the application. But I does not want user to login with their user id and password. when a user enters url it should not open a login page . I tried returning true when a user enters an URL like below.
```
<?php if($app->isLoggedI... | 2018/10/23 | [
"https://Stackoverflow.com/questions/52941226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | As of now you can only adjust the width of the Card from the Card's php file using the `->width()` method.
When you set the card width to `1/2` contents from the card seems to overflow. I solved the issue by adding the class `h-auto` to the `<card>` inside the `Card.vue`. | I solved this by adding this to my nova theme:
```
.card-panel {
height: auto !important;
min-height: 150px;
}
```
Solution originally posted here:
<https://github.com/laravel/nova-issues/issues/1014#issuecomment-451355417> |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | Set the singleLine property on your EditText widget to true:
```
<EditText
android:singleLine="true"
android:id="@+id/myEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/addItemHint"
android:imeOptions="actionDone"
/>
``` | ```
android:inputType="textMultiLine"
```
adding this property in edittext will solve the problem |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | Set the singleLine property on your EditText widget to true:
```
<EditText
android:singleLine="true"
android:id="@+id/myEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/addItemHint"
android:imeOptions="actionDone"
/>
``` | ```
android:inputType="textImeMultiLine"
```
In my case this have solved the problem! |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | Set the singleLine property on your EditText widget to true:
```
<EditText
android:singleLine="true"
android:id="@+id/myEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/addItemHint"
android:imeOptions="actionDone"
/>
``` | `android:singleLine="true"` is depricated, use
```
android:maxLines="1"
android:inputType="text"
android:imeOptions="actionNext"
``` |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | Set the singleLine property on your EditText widget to true:
```
<EditText
android:singleLine="true"
android:id="@+id/myEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/addItemHint"
android:imeOptions="actionDone"
/>
``` | If you want to single line
The easy way is `android:inputType="text"`
Or you can use `android:MaxLine="1"`
If you want to Multiline don't insert those codes. |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | ```
android:inputType="textMultiLine"
```
adding this property in edittext will solve the problem | ```
android:inputType="textImeMultiLine"
```
In my case this have solved the problem! |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | ```
android:inputType="textMultiLine"
```
adding this property in edittext will solve the problem | `android:singleLine="true"` is depricated, use
```
android:maxLines="1"
android:inputType="text"
android:imeOptions="actionNext"
``` |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | ```
android:inputType="textMultiLine"
```
adding this property in edittext will solve the problem | If you want to single line
The easy way is `android:inputType="text"`
Or you can use `android:MaxLine="1"`
If you want to Multiline don't insert those codes. |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | `android:singleLine="true"` is depricated, use
```
android:maxLines="1"
android:inputType="text"
android:imeOptions="actionNext"
``` | ```
android:inputType="textImeMultiLine"
```
In my case this have solved the problem! |
20,474,321 | I have a simple todolist app I'm creating whereby new todo items are added via an EditText View. So I'm trying to have it **submit the new item** to the list **when I press the enter key**. For some reason though **it just enters a new line instead**. I have also noticed that it **works fine** when I use the enter key ... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20474321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129647/"
] | `android:singleLine="true"` is depricated, use
```
android:maxLines="1"
android:inputType="text"
android:imeOptions="actionNext"
``` | If you want to single line
The easy way is `android:inputType="text"`
Or you can use `android:MaxLine="1"`
If you want to Multiline don't insert those codes. |
32,396,826 | In application, I need to find out current (maximum) bandwidth of current network connection (WLAN/3G/4G).
How can this be done?
Uploading small file, like 20kb or so would not be an option, since, I might get network speed that is not the same for 5MB, 20MB or 50MB files since effective network upload/download speed... | 2015/09/04 | [
"https://Stackoverflow.com/questions/32396826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2755422/"
] | The `dateFormat` of the `NSDateFormatter` (`yyyy-MM-dd'T'HH:mm:ss.SSS`) doesn't match string you get `1995-01-01T00:00:00`.
You need to remove the extra `.SSS` => `yyyy-MM-dd'T'HH:mm:ss` to have a match. | Wouldn't the if statement expression always return false?
```
object["json"]["dateOfBirth"].stringValue as? NSDate
```
You are specifically getting a string and then try to cast it to an NSDate. Pretty sure that will always fail.
In your other example you are specifically parsing the string to a date when you set i... |
11,857,819 | ```
private void LoadImageList()
{
string filepath = Application.StartupPath + @"\Content\Textures\Tiles\PlatformTiles.png";
Bitmap tileSheet = new Bitmap(filepath);
int tilecount = 0;
for (int y = 0; y < tileSheet.Height / TileGrid.TileHeight; y++)
{
for (in... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11857819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/950949/"
] | I solved the issue by implementing the instructions exactly what is told here... <http://libmailcore.com/>...
no need to build framework... just include the files in your project as told by the link I've mentioned and you are done... | I can only speak to that "config.h" error:
Turns out you have to have MailCore in a folder with no spaces in the directory path.
See: <https://github.com/mronge/MailCore/issues/35>
I moved the folder to `/Users/bill/Documents/dev/lib/MailCore` and was able to build the project there. Leaving MailCore at that locati... |
28,130,711 | this is probably an easy answer and having to do something to do with global variables maybe? how can i get a user inputted data from one function and have it able to be called and outputted with other functions in the same program. For example:
```
hydro = False
def main():
medium = input("soil or hydro")... | 2015/01/24 | [
"https://Stackoverflow.com/questions/28130711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4490565/"
] | vCard files have mimetypes of
```
text/vcard
```
You'd need to add that as one of the accepted\_file\_mime\_types. If it's not that, it could be any of the following mimetypes which are now [deprecated](http://en.wikipedia.org/wiki/VCard).
```
text/x-vcard
text/directory;profile=vCard
text/directory
```
*Edit*... | Try a MIME type of `text/vcard`. `text/x-vcard` is deprecated. |
4,776,130 | What is difference between:
```
SELECT * FROM news WHERE cat_id IN (1, 2, 6, 8);
```
and create a loop:
```
foreach($cat as $key => $value){
$sql = "SELECT * FROM news WHERE cat_id = $value['id'];
}
``` | 2011/01/23 | [
"https://Stackoverflow.com/questions/4776130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/361635/"
] | The first example is far more efficient because only 1 sql query is run. The second example has x amount of queries, and is far slower.
I would say that you should **never** do it the second way and always the first way. | The first example runs only 1 query, while the second runs N queries.
Oh yeah, **never** do it the second way. |
4,776,130 | What is difference between:
```
SELECT * FROM news WHERE cat_id IN (1, 2, 6, 8);
```
and create a loop:
```
foreach($cat as $key => $value){
$sql = "SELECT * FROM news WHERE cat_id = $value['id'];
}
``` | 2011/01/23 | [
"https://Stackoverflow.com/questions/4776130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/361635/"
] | The first example runs only 1 query, while the second runs N queries.
Oh yeah, **never** do it the second way. | I think just for some circumstances, when you want to extract data from DB in **exact order** of input ids, you might want to use the second statement.
In this case, when you use the first query, the result might not in the order of input ids (1,2,6,8) if these ids are not in this order in DB. The first id that matche... |
4,776,130 | What is difference between:
```
SELECT * FROM news WHERE cat_id IN (1, 2, 6, 8);
```
and create a loop:
```
foreach($cat as $key => $value){
$sql = "SELECT * FROM news WHERE cat_id = $value['id'];
}
``` | 2011/01/23 | [
"https://Stackoverflow.com/questions/4776130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/361635/"
] | The first example is far more efficient because only 1 sql query is run. The second example has x amount of queries, and is far slower.
I would say that you should **never** do it the second way and always the first way. | I think just for some circumstances, when you want to extract data from DB in **exact order** of input ids, you might want to use the second statement.
In this case, when you use the first query, the result might not in the order of input ids (1,2,6,8) if these ids are not in this order in DB. The first id that matche... |
47,181,312 | Is it a array or object we creating in this line? I want to know the meaning of this line used in Javascript ?
```
document.getElementById("status").options[1]=new Option("OPEN","open");
```
I am using this for my Dynamic dropdown list | 2017/11/08 | [
"https://Stackoverflow.com/questions/47181312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7911326/"
] | The first problem is determining priority. In this case, you could use the largest `TypeId`, but that does not seem like a great idea. You could add another column to serve as a priority ordinal instead.
From there, it is a top 1 per group query:
using [**`top with ties`**](http://sqlmag.com/t-sql/use-top-filter-with... | Actually I don't think you don't need a join at all. But you have to take the max TypeID without respect to the TypeDescription, since these differences can defeat a Group By. So a workaround is to take the Max without TypeDescription initially, then subquery the result to get the TypeDescription.
```
SELECT dT.*
... |
11,304,985 | I am working on one android application,in which paid videos are contain, user will able to download that videos. But I am not sure where I am going to save it after downloaded. Since these are paid videos, So user can not copy and paste it. | 2012/07/03 | [
"https://Stackoverflow.com/questions/11304985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/833290/"
] | To use the retrievePeripheral API, you need to save the CBPeripheral UUID somewhere (I use CoreData). The retrievePeripheral call takes an NSArray of UUIDs as a parameter. Looks like you're not providing the saved UUID to your retrievePeripheral call. When your didRetrievePeripherals callback is called, you will get an... | I have the same problem and I think one solution:
when connection is lost, masterhave to scan for peripherials in the same way that we scan and connect, and slave have to pass to advertisin state and both have to recognice caractheristics services uuid's and caracteristics for the services again.
This is the way I goi... |
11,304,985 | I am working on one android application,in which paid videos are contain, user will able to download that videos. But I am not sure where I am going to save it after downloaded. Since these are paid videos, So user can not copy and paste it. | 2012/07/03 | [
"https://Stackoverflow.com/questions/11304985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/833290/"
] | To use the retrievePeripheral API, you need to save the CBPeripheral UUID somewhere (I use CoreData). The retrievePeripheral call takes an NSArray of UUIDs as a parameter. Looks like you're not providing the saved UUID to your retrievePeripheral call. When your didRetrievePeripherals callback is called, you will get an... | You should save the peripheral UUID (peripheral.identifier.UUIDString) when you successfully connect to the device. I am using NSUserDefaults to save the UUID.
When you want to connect to the device use the following method from CBCentralManager *retrievePeripheralsWithIdentifiers:* and pass as parameter the UUID. Thi... |
74,577,324 | I have a DataFrame with a column that contains a dictionary as follows:
```
df:
date dictionary
0 2021-01-01 00:00:00 + 00:00 'Total':{'USD':100, 'size':20}, 'country':{'USA': {'income': 20000}, 'fees': {'total': 55}}
1 2021-01-01 00:00:00 + 00:00 '... | 2022/11/25 | [
"https://Stackoverflow.com/questions/74577324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12244355/"
] | **1)**
The first possibility I see, is if your dataframe contains valid json strings like so:
```
df = pd.DataFrame({
'date': [
'2021-01-01 00:00:00',
'2021-01-01 00:00:00',
'2021-01-02 00:00:00',
],
'dictionary': [
'{"Total":{"USD":100, "size":20}, "country":{"USA": {"i... | A possible solution:
```
aux = pd.json_normalize(df.dictionary, sep='_')
(aux.filter(like='income').loc[0]
.index.str.extract(r'.*_(.*)_.*').join(aux['country_fees_total']).join(df)
.pivot(index='date', columns=0, values='country_fees_total').reset_index()
.rename_axis(None, axis=1))
```
Output:
```
... |
14,538,255 | Today, I got a compiler error when trying to use a lazy pattern when matching on an existential GADT constructor:
>
> An existential or GADT data constructor cannot be used inside a lazy (~) pattern
>
>
>
Why is that limitation? What "bad" stuff could happen, if it were allowed? | 2013/01/26 | [
"https://Stackoverflow.com/questions/14538255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1333025/"
] | Consider
```
data EQ a b where
Refl :: EQ a a
```
If we could define
```
transport :: Eq a b -> a -> b
transport ~Refl a = a
```
then we could have
```
transport undefined :: a -> b
```
and thus acquire
```
transport undefined True = True :: Int -> Int
```
and then a crash, rather than the more graceful f... | With "normal" data, you can skip checking the constructor during pattern-matching, on the understanding that when you try to use the data from the pattern, it might turn out to not exist, thus throwing an exception at you.
With a GADT, the *type signature* potentially changes depending on which constructor is present.... |
351,085 | I know of [How to remove an uninstalled package's dependencies?](https://askubuntu.com/questions/443/how-to-remove-an-uninstalled-packages-dependencies) and I tried
```
apt-get autoremove
```
but that does not remove dependencies that are recommended/suggested by other packages.
That is, if I install a package X th... | 2013/09/28 | [
"https://askubuntu.com/questions/351085",
"https://askubuntu.com",
"https://askubuntu.com/users/195582/"
] | Actually the command is:
```
sudo apt-get autoremove <Z>
```
But this has a trick! If any of the dependencies has some other previously installed packages that recommend/suggest them then apt would not remove them.
You didn't specified what package was but for example, if I were to install the IcedTea plugin, it wo... | Right, if you want to remove package `<Z>` with dependances just type:
```
sudo apt-get autoremove --purge <Z>
``` |
351,085 | I know of [How to remove an uninstalled package's dependencies?](https://askubuntu.com/questions/443/how-to-remove-an-uninstalled-packages-dependencies) and I tried
```
apt-get autoremove
```
but that does not remove dependencies that are recommended/suggested by other packages.
That is, if I install a package X th... | 2013/09/28 | [
"https://askubuntu.com/questions/351085",
"https://askubuntu.com",
"https://askubuntu.com/users/195582/"
] | If you want to remove recommended packages from your system, even if there are still some installed packages recommending (or suggesting) them, put the following in the file `/etc/apt/apt.conf.d/99_norecommends` (create it):
```
APT::Install-Recommends "false";
APT::AutoRemove::RecommendsImportant "false";
APT::AutoRe... | Right, if you want to remove package `<Z>` with dependances just type:
```
sudo apt-get autoremove --purge <Z>
``` |
351,085 | I know of [How to remove an uninstalled package's dependencies?](https://askubuntu.com/questions/443/how-to-remove-an-uninstalled-packages-dependencies) and I tried
```
apt-get autoremove
```
but that does not remove dependencies that are recommended/suggested by other packages.
That is, if I install a package X th... | 2013/09/28 | [
"https://askubuntu.com/questions/351085",
"https://askubuntu.com",
"https://askubuntu.com/users/195582/"
] | ### Overriding APT options
Unlike dependencies, automatically installed "recommended" or "suggested" packages may be ignored by `apt-get autoremove`.
As described elsewhere, this behavior of APT can be changed in the configuration.
Likewise, the configuration of the `apt-get` command can be temporarily changed throu... | Right, if you want to remove package `<Z>` with dependances just type:
```
sudo apt-get autoremove --purge <Z>
``` |
351,085 | I know of [How to remove an uninstalled package's dependencies?](https://askubuntu.com/questions/443/how-to-remove-an-uninstalled-packages-dependencies) and I tried
```
apt-get autoremove
```
but that does not remove dependencies that are recommended/suggested by other packages.
That is, if I install a package X th... | 2013/09/28 | [
"https://askubuntu.com/questions/351085",
"https://askubuntu.com",
"https://askubuntu.com/users/195582/"
] | If you want to remove recommended packages from your system, even if there are still some installed packages recommending (or suggesting) them, put the following in the file `/etc/apt/apt.conf.d/99_norecommends` (create it):
```
APT::Install-Recommends "false";
APT::AutoRemove::RecommendsImportant "false";
APT::AutoRe... | Actually the command is:
```
sudo apt-get autoremove <Z>
```
But this has a trick! If any of the dependencies has some other previously installed packages that recommend/suggest them then apt would not remove them.
You didn't specified what package was but for example, if I were to install the IcedTea plugin, it wo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.