qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
11,474,060 | I have a C# Class Library which is COM visible and being called from a Visual Studio 6 application. One of the methods needs to return a string. I have tried this two ways:
```
public void GetString(out string sText)
{
sText = MemberStringVariable;
}
```
When I call the above from VC6 I get an exception thrown.
... | 2012/07/13 | [
"https://Stackoverflow.com/questions/11474060",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/716999/"
] | If you are trying to invoke an override from inside your initializer, it is not going to work. The reason for it is easy to understand: since the override belongs to a subclass, and because the superclass instance initialization needs to be complete before the subclass initialization can start, calling a derived method... | Did you forget to intialize the child method with:
```
-(void) SetupStuff{ // This is the child class implementation
[super SetupStuff];
}
```
in objective-c you have to call manually the parent methods, even if they are overwriting pre-existent methods. |
23,577,878 | I use a table for an invoice form and want to add/remove dynamically columns with taxes.
My Selectbox:
```
<select id="tax" class="form-control tax" onchange="SetTax();">
<option value="tax-none" selected="selected">No</option>
<option value="1 Tax">1 Tax</option>
<option value="2 Taxes" selected="selected">2 Tax... | 2014/05/10 | [
"https://Stackoverflow.com/questions/23577878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3542250/"
] | You are looking for **required** of Codeigniter Server Side Validation
```
$this->form_validation->set_rules('username', 'Username', 'required');
```
Complete Documentation [Form validation codeigniter](http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html)
If you want Client Side validation [jQ... | You can prevent actual submit only on client side with JavaScript, however with that approach you cannot be sure form is not submitted (because one can mess with client side script). Instead you must validate submitted values. |
23,577,878 | I use a table for an invoice form and want to add/remove dynamically columns with taxes.
My Selectbox:
```
<select id="tax" class="form-control tax" onchange="SetTax();">
<option value="tax-none" selected="selected">No</option>
<option value="1 Tax">1 Tax</option>
<option value="2 Taxes" selected="selected">2 Tax... | 2014/05/10 | [
"https://Stackoverflow.com/questions/23577878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3542250/"
] | You are looking for **required** of Codeigniter Server Side Validation
```
$this->form_validation->set_rules('username', 'Username', 'required');
```
Complete Documentation [Form validation codeigniter](http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html)
If you want Client Side validation [jQ... | I seems your MySQL code is outside the if else statement of the validation. Be sure to put it in the right place.
Here's the missing data on your sample.
```
if ($this->form_validation->run() == FALSE){
}else{
// Be sure to put your database insert code here...
$data['name'] = set_value('name');
$data['e... |
54,921,314 | Currently, `placeholder="Your best email"` is not being styled by style:`inputText`.
On inspecting element, the `user agent stylesheet` is being used for `input, textarea, select, button {}`.
Below is my code:
```
import React from "react";
import {css} from "@emotion/core";
const inputText = css`
::placeholder {... | 2019/02/28 | [
"https://Stackoverflow.com/questions/54921314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6566268/"
] | If you are able to use window functions then use `ROW_NUMBER() OVER (PARTITION BY type)`. It'll assign row numbers for each type:
```
TableName.find_by_sql(
select *, row_number() over (partition by type order by (select null)) rn
from table_name
order by rn, type
)
```
Output:
```
| id | name | type | rn ... | If i understood correctly you need query like following.
```
SELECT t.name,
t1.type
FROM (SELECT DISTINCT name
FROM yourtable) t
CROSS JOIN (SELECT DISTINCT type
FROM yourtable)t1
``` |
4,608,443 | $X$ and $Y$ are independent random variables, each having the same, *finite*, support. In particular, $Y$ is the max of $n$ i.i.d. random variables, each independent of $X$ and *following the same distribution as* $X$. That is, if $f(x):=Pr(X=x)$, the CDF of $Y$ is given by $Pr(Y \leq y)= F(y)^n$.
My question is, is i... | 2022/12/30 | [
"https://math.stackexchange.com/questions/4608443",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/341146/"
] | Let $n=1$ and
$$X,Y\sim
\begin{cases}
1000, \text{ with probability } p=0.98 \\
0, \text{ with probability } q=0.01\\
-1, \text{ with probability } r=0.01
\end{cases}.
$$
Then
$$\mathbb{E}(X|X\geq Y)= \frac{1000p-r^2}{p+q(1-p)+r^2}=\frac{1000(0.98)-0.01^2}{0.98+0.01(1-0.98)+0.01^2}\approx 999.69,$$
and
$$\mathbb{E}(... | I'm not sure if this is correct, as it looks very easy, and I might very well be misunderstanding the underlying notation that you are using. But here it is anyway:
Let $y \in Y(\Omega)$,
$$\mathbb{E}(X \mid X \geq Y)(y) \space = \space \mathbb{E}(X \space \mid X \geq y) = \mathbb{E}(X \space \mid X = y) + \space \mat... |
4,608,443 | $X$ and $Y$ are independent random variables, each having the same, *finite*, support. In particular, $Y$ is the max of $n$ i.i.d. random variables, each independent of $X$ and *following the same distribution as* $X$. That is, if $f(x):=Pr(X=x)$, the CDF of $Y$ is given by $Pr(Y \leq y)= F(y)^n$.
My question is, is i... | 2022/12/30 | [
"https://math.stackexchange.com/questions/4608443",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/341146/"
] | Let $n=1$ and
$$X,Y\sim
\begin{cases}
1000, \text{ with probability } p=0.98 \\
0, \text{ with probability } q=0.01\\
-1, \text{ with probability } r=0.01
\end{cases}.
$$
Then
$$\mathbb{E}(X|X\geq Y)= \frac{1000p-r^2}{p+q(1-p)+r^2}=\frac{1000(0.98)-0.01^2}{0.98+0.01(1-0.98)+0.01^2}\approx 999.69,$$
and
$$\mathbb{E}(... | For completeness, I'll add the proof that a support of size $3$ is minimal for the counterexample, respectively that the strong claim holds for binary supports.
**Claim**: For $X,Y$ independent with support $\mathcal X\subseteq\mathbb R$, $|\mathcal X|\le 2$, we have $\mathbb E[X|X\ge Y]\ge\mathbb E[X|X=Y]$.
For $\ma... |
4,608,443 | $X$ and $Y$ are independent random variables, each having the same, *finite*, support. In particular, $Y$ is the max of $n$ i.i.d. random variables, each independent of $X$ and *following the same distribution as* $X$. That is, if $f(x):=Pr(X=x)$, the CDF of $Y$ is given by $Pr(Y \leq y)= F(y)^n$.
My question is, is i... | 2022/12/30 | [
"https://math.stackexchange.com/questions/4608443",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/341146/"
] | For completeness, I'll add the proof that a support of size $3$ is minimal for the counterexample, respectively that the strong claim holds for binary supports.
**Claim**: For $X,Y$ independent with support $\mathcal X\subseteq\mathbb R$, $|\mathcal X|\le 2$, we have $\mathbb E[X|X\ge Y]\ge\mathbb E[X|X=Y]$.
For $\ma... | I'm not sure if this is correct, as it looks very easy, and I might very well be misunderstanding the underlying notation that you are using. But here it is anyway:
Let $y \in Y(\Omega)$,
$$\mathbb{E}(X \mid X \geq Y)(y) \space = \space \mathbb{E}(X \space \mid X \geq y) = \mathbb{E}(X \space \mid X = y) + \space \mat... |
63,811,316 | I am running celery worker(version 4.4) on windows machine, when I run the worker with `-P eventlet` option it throws Attribute error.
Error logs are as follows:-
```
pipenv run celery worker -A src.celery_app -l info -P eventlet --without-mingle --without-heartbeat --without-gossip -Q queue1 -n worker1
Traceback (mos... | 2020/09/09 | [
"https://Stackoverflow.com/questions/63811316",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5605353/"
] | `os.register_at_fork` is a new function available since `Python 3.7`, it is only available for Unix systems ([Source from Python doc](https://docs.python.org/3.8/library/os.html#os.register_at_fork)) and Eventlet use it to patch `threading` library.
There is an issue opened in Eventlet Github:
<https://github.com/even... | One reason you are facing this is because of the fact that Celery works on a pre-fork model.
So if the underlying OS does not support it, you will have a tough time running celery. As per my knowledge, this model does not exist for the Windows kernel.
You can still use Cygwin if you want to make it work on windows or ... |
63,811,316 | I am running celery worker(version 4.4) on windows machine, when I run the worker with `-P eventlet` option it throws Attribute error.
Error logs are as follows:-
```
pipenv run celery worker -A src.celery_app -l info -P eventlet --without-mingle --without-heartbeat --without-gossip -Q queue1 -n worker1
Traceback (mos... | 2020/09/09 | [
"https://Stackoverflow.com/questions/63811316",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5605353/"
] | One reason you are facing this is because of the fact that Celery works on a pre-fork model.
So if the underlying OS does not support it, you will have a tough time running celery. As per my knowledge, this model does not exist for the Windows kernel.
You can still use Cygwin if you want to make it work on windows or ... | is the eventlet version 0.26; pip install eventlet==0.26 |
63,811,316 | I am running celery worker(version 4.4) on windows machine, when I run the worker with `-P eventlet` option it throws Attribute error.
Error logs are as follows:-
```
pipenv run celery worker -A src.celery_app -l info -P eventlet --without-mingle --without-heartbeat --without-gossip -Q queue1 -n worker1
Traceback (mos... | 2020/09/09 | [
"https://Stackoverflow.com/questions/63811316",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5605353/"
] | `os.register_at_fork` is a new function available since `Python 3.7`, it is only available for Unix systems ([Source from Python doc](https://docs.python.org/3.8/library/os.html#os.register_at_fork)) and Eventlet use it to patch `threading` library.
There is an issue opened in Eventlet Github:
<https://github.com/even... | is the eventlet version 0.26; pip install eventlet==0.26 |
63,811,316 | I am running celery worker(version 4.4) on windows machine, when I run the worker with `-P eventlet` option it throws Attribute error.
Error logs are as follows:-
```
pipenv run celery worker -A src.celery_app -l info -P eventlet --without-mingle --without-heartbeat --without-gossip -Q queue1 -n worker1
Traceback (mos... | 2020/09/09 | [
"https://Stackoverflow.com/questions/63811316",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5605353/"
] | `os.register_at_fork` is a new function available since `Python 3.7`, it is only available for Unix systems ([Source from Python doc](https://docs.python.org/3.8/library/os.html#os.register_at_fork)) and Eventlet use it to patch `threading` library.
There is an issue opened in Eventlet Github:
<https://github.com/even... | As hinted at by @金奕峰, `os.register_at_fork` was introduced in eventlet v0.27.0 [c.f. commit compare on github](https://github.com/eventlet/eventlet/compare/v0.26.1...v0.27.0). Specifying version 0.26.0 in your virtual environment's package list might solve the problem (for now). |
63,811,316 | I am running celery worker(version 4.4) on windows machine, when I run the worker with `-P eventlet` option it throws Attribute error.
Error logs are as follows:-
```
pipenv run celery worker -A src.celery_app -l info -P eventlet --without-mingle --without-heartbeat --without-gossip -Q queue1 -n worker1
Traceback (mos... | 2020/09/09 | [
"https://Stackoverflow.com/questions/63811316",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5605353/"
] | As hinted at by @金奕峰, `os.register_at_fork` was introduced in eventlet v0.27.0 [c.f. commit compare on github](https://github.com/eventlet/eventlet/compare/v0.26.1...v0.27.0). Specifying version 0.26.0 in your virtual environment's package list might solve the problem (for now). | is the eventlet version 0.26; pip install eventlet==0.26 |
64,685,241 | In a recent job interview, I had to solve a programmatic question. The question was to convert a given excel alphabet column name to a column number. My solution worked for the most part until they (interviewer) gave me "AUHS" as a column name. The solution broke. The expected answer "31999" but I got "18999". I want t... | 2020/11/04 | [
"https://Stackoverflow.com/questions/64685241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14463760/"
] | The formula for spreadsheets's alphabetical column labels
---------------------------------------------------------
The sequence of A-Z encoded (base-26) column-labels is:
```
A .. 1 (= 26^0*1)
B .. 2 (= 26^0*2)
H .. 2 (= 26^0*8)
S .. 2 (= 26^0*19)
U .. 2 (= 26^0*21)
Z .. 26 (= 26^0*26)
AA .. 27 (= 26^1*1 +1)
AZ .. ... | As counting starts from 1, and columns are counted from `A`, a correction `argChar.charAt(i) - 'A' + 1` is needed to properly convert chars to digits:
```java
String argChar = "AUHS";
int pow = 1;
int n = 0;
for (int i = argChar.length() - 1; i >= 0; i--) {
n += (argChar.charAt(i) - 'A' + 1) * pow;
pow *= 26;
... |
39,138,488 | **Problem-**
I have a docker-compose.yml with 6 services. When i execute docker-compose up, all 6 containers gets started but i need 2 containers to start its work initially and rest 4 containers based on conditions.
**Description-**
6 services in compose(2 services for all users & 4 services for 2 users):-
-2 serv... | 2016/08/25 | [
"https://Stackoverflow.com/questions/39138488",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6164961/"
] | Doing this based upon user alone would require logic outside of Docker Compose, but you may be able to configure .
### Extending Services
You might be able to use two Docker Compose files to accomplish similar results.
* 2 services for all users - docker-compose.yml
* 4 services for 2 users - docker-compose.admin.... | I often have some services that are no-ops based on the environment.
If you add this you will pass through the external user to the container:
```
environment:
- USER=${USER}
entrypoint: ./my_entrypoint_conditional_wrapper.sh
```
In the entrypoint script, check the `USER` variable, and if the service ... |
39,138,488 | **Problem-**
I have a docker-compose.yml with 6 services. When i execute docker-compose up, all 6 containers gets started but i need 2 containers to start its work initially and rest 4 containers based on conditions.
**Description-**
6 services in compose(2 services for all users & 4 services for 2 users):-
-2 serv... | 2016/08/25 | [
"https://Stackoverflow.com/questions/39138488",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6164961/"
] | Doing this based upon user alone would require logic outside of Docker Compose, but you may be able to configure .
### Extending Services
You might be able to use two Docker Compose files to accomplish similar results.
* 2 services for all users - docker-compose.yml
* 4 services for 2 users - docker-compose.admin.... | This can now be solved neatly, with a recent addition to docker-compose, compose profiles (at least for the service part, not sure for the volumes). [See documentation here](https://docs.docker.com/compose/profiles/). |
66,235,092 | I have the following nested loop:
```py
sum_tot = 0.0
for i in range(len(N)-1):
for j in range(len(N)-1):
sum_tot = sum_tot + N[i]**2*N[j]**2*W[i]*W[j]*x_i[j][-1] / (N[j]**2 - x0**2) *(z_i[i][j] - z_j[i][j])*x_j[i][-1] / (N[i]**2 - x0**2)
```
It's basically a mathematical function that has a double summ... | 2021/02/17 | [
"https://Stackoverflow.com/questions/66235092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15224681/"
] | Note that range will stop at N-2 given your current loop: `range` goes up to but not including its argument. You probably mean to write `for i in range(len(N))`.
It's also difficult to reduce summation: the actual time it takes is based on the number of terms computed, so if you write it a different way which still in... | To convert this to **matrix calculations**, I would suggest combine some terms first.
If these objects are not numpy arrays, it's better to convert them to numpy arrays, as they support element-wise operations.
To convert, simply do
```py
import numpy
N = numpy.array(N)
w = numpy.array(w)
x_i = numpy.array(x_i)
x_j ... |
66,235,092 | I have the following nested loop:
```py
sum_tot = 0.0
for i in range(len(N)-1):
for j in range(len(N)-1):
sum_tot = sum_tot + N[i]**2*N[j]**2*W[i]*W[j]*x_i[j][-1] / (N[j]**2 - x0**2) *(z_i[i][j] - z_j[i][j])*x_j[i][-1] / (N[i]**2 - x0**2)
```
It's basically a mathematical function that has a double summ... | 2021/02/17 | [
"https://Stackoverflow.com/questions/66235092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15224681/"
] | @Kraigolas makes valid points. But let's try a few benchmarks on a dummy, double nested operation, either way. (Hint: Numba might help you speed things up)
Note, I would avoid numpy arrays specifically because all of the cross-product between the range is going to be in memory at once. If this is a massive range, you ... | To convert this to **matrix calculations**, I would suggest combine some terms first.
If these objects are not numpy arrays, it's better to convert them to numpy arrays, as they support element-wise operations.
To convert, simply do
```py
import numpy
N = numpy.array(N)
w = numpy.array(w)
x_i = numpy.array(x_i)
x_j ... |
47,838 | For example, I have one field in my content type that is a boolean value of "Is this employee certified" next to this field I'd like a Pop-up Date that shows the expiration field. I've created both fields for my content type but I have not seen anything in the CSS that allows my to float or align fields. Any help would... | 2012/10/16 | [
"https://drupal.stackexchange.com/questions/47838",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/10473/"
] | You can just use CSS for this. You will need to find the specific element ID or class for the containing element (div for example) for each of the fields (you can find this out using Firebug with Firefox), then create a CSS rule for each of those elements such as:
```
#field1 {
float:left;
width:150px;
}
#field2 ... | You can use [Token Field](http://drupal.org/project/token_field) Or [computed Field](http://drupal.org/project/computed_field) but the easier way it's to use token field.
You should create a token field then use replacement patterns (each field of your content type has a replacement pattern to print it's value) for e... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You could do something like:
```
Dim condition As Func(Of OrderItem, Boolean)
Select Case whichForm
Case ItemsFor.MfrCredit
condition = Function(oi As OrderItem) oi.ManufacturerCreditID = formID
Case ItemsFor.CustomerCredit
condition = Function(oi as OrderItem) oi.CustomerCreditID = formID
... | one way that you could turn that into a single query would be something like:
```
Dim query = From oi As OrderItem In itemsList _
Where ((whichForm = ItemsFor.MfrCredit) and (oi.ManufacturerCreditID = formID)) _
or ((whichForm = ItemsFor.CustomerCredit) and (oi.CustomerCreditID = formID)) _
or ((whichForm = ItemsFor.I... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You could do something like:
```
Dim condition As Func(Of OrderItem, Boolean)
Select Case whichForm
Case ItemsFor.MfrCredit
condition = Function(oi As OrderItem) oi.ManufacturerCreditID = formID
Case ItemsFor.CustomerCredit
condition = Function(oi as OrderItem) oi.CustomerCreditID = formID
... | There is a nice [article here](http://blogs.msdn.com/vbteam/archive/2007/08/29/implementing-dynamic-searching-using-linq.aspx) on Dynamic searchs in Linq with VB by creating an expression tree manually...quite a bit of work. Or another (better?) option is this article on [Dynamic Linq](http://weblogs.asp.net/scottgu/ar... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You could do something like:
```
Dim condition As Func(Of OrderItem, Boolean)
Select Case whichForm
Case ItemsFor.MfrCredit
condition = Function(oi As OrderItem) oi.ManufacturerCreditID = formID
Case ItemsFor.CustomerCredit
condition = Function(oi as OrderItem) oi.CustomerCreditID = formID
... | You could use the [Predicate](http://msdn.microsoft.com/en-us/library/bfcke1bz.aspx) delegate. I am imagining an array or list of Predicates, one for each ItemsFor.
Then your query is
```
Dim query = From oi As OrderItem In itemsList Where predicate select oi
```
See also [this article on building predicates](ht... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You could do something like:
```
Dim condition As Func(Of OrderItem, Boolean)
Select Case whichForm
Case ItemsFor.MfrCredit
condition = Function(oi As OrderItem) oi.ManufacturerCreditID = formID
Case ItemsFor.CustomerCredit
condition = Function(oi as OrderItem) oi.CustomerCreditID = formID
... | You can use LINQ expressions, like this: (My VB is rusty, so this might not compile)
```
Dim param = Expression.Parameter(GetType(OrderItem), "item")
Dim getter = Expression.Lambda(Of Func(Of OrderItem, Integer))( _
Expression.Property(param, whichForm.ToString()), _
param _
).Compile()
Return items.Where(Fun... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You could use the [Predicate](http://msdn.microsoft.com/en-us/library/bfcke1bz.aspx) delegate. I am imagining an array or list of Predicates, one for each ItemsFor.
Then your query is
```
Dim query = From oi As OrderItem In itemsList Where predicate select oi
```
See also [this article on building predicates](ht... | one way that you could turn that into a single query would be something like:
```
Dim query = From oi As OrderItem In itemsList _
Where ((whichForm = ItemsFor.MfrCredit) and (oi.ManufacturerCreditID = formID)) _
or ((whichForm = ItemsFor.CustomerCredit) and (oi.CustomerCreditID = formID)) _
or ((whichForm = ItemsFor.I... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You can use LINQ expressions, like this: (My VB is rusty, so this might not compile)
```
Dim param = Expression.Parameter(GetType(OrderItem), "item")
Dim getter = Expression.Lambda(Of Func(Of OrderItem, Integer))( _
Expression.Property(param, whichForm.ToString()), _
param _
).Compile()
Return items.Where(Fun... | one way that you could turn that into a single query would be something like:
```
Dim query = From oi As OrderItem In itemsList _
Where ((whichForm = ItemsFor.MfrCredit) and (oi.ManufacturerCreditID = formID)) _
or ((whichForm = ItemsFor.CustomerCredit) and (oi.CustomerCreditID = formID)) _
or ((whichForm = ItemsFor.I... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You could use the [Predicate](http://msdn.microsoft.com/en-us/library/bfcke1bz.aspx) delegate. I am imagining an array or list of Predicates, one for each ItemsFor.
Then your query is
```
Dim query = From oi As OrderItem In itemsList Where predicate select oi
```
See also [this article on building predicates](ht... | There is a nice [article here](http://blogs.msdn.com/vbteam/archive/2007/08/29/implementing-dynamic-searching-using-linq.aspx) on Dynamic searchs in Linq with VB by creating an expression tree manually...quite a bit of work. Or another (better?) option is this article on [Dynamic Linq](http://weblogs.asp.net/scottgu/ar... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You can use LINQ expressions, like this: (My VB is rusty, so this might not compile)
```
Dim param = Expression.Parameter(GetType(OrderItem), "item")
Dim getter = Expression.Lambda(Of Func(Of OrderItem, Integer))( _
Expression.Property(param, whichForm.ToString()), _
param _
).Compile()
Return items.Where(Fun... | There is a nice [article here](http://blogs.msdn.com/vbteam/archive/2007/08/29/implementing-dynamic-searching-using-linq.aspx) on Dynamic searchs in Linq with VB by creating an expression tree manually...quite a bit of work. Or another (better?) option is this article on [Dynamic Linq](http://weblogs.asp.net/scottgu/ar... |
1,274,995 | I'm relatively new with LINQ, but I'm going to be getting into it a lot more. Is the following a practical application of LINQ, or is there a better way to do something like this?
```
Public Shared Function GetItems(ByVal itemsList As List(Of OrderItem),
ByVal whichForm As ItemsFor, ByVal formID As Integer) As List(... | 2009/08/13 | [
"https://Stackoverflow.com/questions/1274995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7173/"
] | You could use the [Predicate](http://msdn.microsoft.com/en-us/library/bfcke1bz.aspx) delegate. I am imagining an array or list of Predicates, one for each ItemsFor.
Then your query is
```
Dim query = From oi As OrderItem In itemsList Where predicate select oi
```
See also [this article on building predicates](ht... | You can use LINQ expressions, like this: (My VB is rusty, so this might not compile)
```
Dim param = Expression.Parameter(GetType(OrderItem), "item")
Dim getter = Expression.Lambda(Of Func(Of OrderItem, Integer))( _
Expression.Property(param, whichForm.ToString()), _
param _
).Compile()
Return items.Where(Fun... |
16,952,013 | I execute the following command in SQL Server 2008 and it does not give me the desired results.
```
RTRIM(avg(ProcTime)/3600) + ':' + RIGHT(('0'+RTRIM(avg(MTD_ProcTime) % 3600) / 60),2)
```
Let's say I get 2:5 instead of 2:05, it drops the zero. How do I get that zero in front of the 5 ? | 2013/06/06 | [
"https://Stackoverflow.com/questions/16952013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2025250/"
] | try
```
RTRIM(avg(ProcTime)/3600) + ':' + RIGHT(('0'+RTRIM(avg(MTD_ProcTime) % 3600 / 60)),2)
```
I moved the `)` from after `3600` to after `60` | What you want is the two zeros in your `RIGHT(('00'+ ...` function, like this:
```
RTRIM(avg(ProcTime)/3600) + ':' +
RIGHT(('00'+RTRIM(avg(MTD_ProcTime) % 3600) / 60),2)
```
That way you end up with right 2 chars of 00N, or 0N. |
63,176,453 | hi i have the code written in java-script and that is working fine, now for some of reason i need to convert that in react, i had searched about this in google but unfortunately didn't found any helpful things, here below is my code written in javascript
```
let message_pane = $(".msg_card_body");
let currentTime = fo... | 2020/07/30 | [
"https://Stackoverflow.com/questions/63176453",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13942499/"
] | The example you quoted is being used to explain that multiple bit-fields are *usually* (not necessarily) packed together. If you look at it more carefully:
```
// 3 bits: value of b1 - 3 bits occupied
// 2 bits: unused - 2 bits left unused
// 6 bits: value of b2 - 6 bits occupied (these... | The example on cppreference just tells that there is no guarantee in the standard that bitfields are mapped to adjacent memory regions, although most sensible implementations would do that. An code snippet provided deliberately uses an unnamed bitfiled of 2 bits to request two bits from the storage - and just showcases... |
21,952,735 | [Sutter and Alexandrescu](https://rads.stackoverflow.com/amzn/click/com/0321113586) have discribed in a quite simple and self contained way the ecosystem of C++ classes, providing 6 main categories
1. **Value** classes (e.g., std::pair, std::vector)
2. **Base** classes (building blocks of class hierarchies)
3. **Trait... | 2014/02/22 | [
"https://Stackoverflow.com/questions/21952735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2567683/"
] | Change your code like this.. this will create button "Add more" to add new passenger and one field (name) for each passenger. You can replace that "Name" field for example with fieldset and add more fields for one passenger.
```
function add_passenger_form($form, &$form_state){
if(!isset($form_state['num_names'])... | ```
function add_passenger_form($form, &$form_state){
$form['#tree'] = TRUE;
if(empty($form_state['num_names'])){
$form_state['num_names'] = 2;
}
$form['passenger_fieldset'] = array(
'#type' => 'fieldset',
'#title' => t('List of Passengers'),
'#prefix' => '<div id="passenger-f... |
14,343,183 | I wan to define enum with non constant step. I want that the step between 2 enum variables looks like that:
```
enum test {
a1 = 1,
a2 = 1<<2,
a3 = 1<<3,
a4, // a4 deduced automatically as 1<<4
a5 // a5 deduced automatically as 1<<5
}
```
Are there a way to define it as indicated in the above example? | 2013/01/15 | [
"https://Stackoverflow.com/questions/14343183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1003575/"
] | You must do this manually, or possibly with macro chicanery. | If there is no assignemt for enum members,
* Then zero will be considered for the first enum member.
* For other members, it will just use the previous member`s value by adding one
on it.
More over in your program assignment (`=`) operator is not used in enum definition. It should be like below.
```
#include <stdio.... |
14,343,183 | I wan to define enum with non constant step. I want that the step between 2 enum variables looks like that:
```
enum test {
a1 = 1,
a2 = 1<<2,
a3 = 1<<3,
a4, // a4 deduced automatically as 1<<4
a5 // a5 deduced automatically as 1<<5
}
```
Are there a way to define it as indicated in the above example? | 2013/01/15 | [
"https://Stackoverflow.com/questions/14343183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1003575/"
] | You must do this manually, or possibly with macro chicanery. | this?
```
#include <stdio.h>
#define enum_(x, n) x##n=1<<n
enum type {
enum_(a, 0),
enum_(a, 1),
enum_(a, 2),
enum_(a, 3),
enum_(a, 4),
enum_(a, 5)
};
int main(void)
{
printf("%d %d %d %d %d %d\n", a0, a1, a2, a3, a4, a5);
return 0;
}
``` |
14,343,183 | I wan to define enum with non constant step. I want that the step between 2 enum variables looks like that:
```
enum test {
a1 = 1,
a2 = 1<<2,
a3 = 1<<3,
a4, // a4 deduced automatically as 1<<4
a5 // a5 deduced automatically as 1<<5
}
```
Are there a way to define it as indicated in the above example? | 2013/01/15 | [
"https://Stackoverflow.com/questions/14343183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1003575/"
] | this?
```
#include <stdio.h>
#define enum_(x, n) x##n=1<<n
enum type {
enum_(a, 0),
enum_(a, 1),
enum_(a, 2),
enum_(a, 3),
enum_(a, 4),
enum_(a, 5)
};
int main(void)
{
printf("%d %d %d %d %d %d\n", a0, a1, a2, a3, a4, a5);
return 0;
}
``` | If there is no assignemt for enum members,
* Then zero will be considered for the first enum member.
* For other members, it will just use the previous member`s value by adding one
on it.
More over in your program assignment (`=`) operator is not used in enum definition. It should be like below.
```
#include <stdio.... |
26,422,592 | After an exhausting search I found some similar problems like the one I would like to solve, but I could not use their answers.
Hier are some very good examples:
[How to remove duplicate values from a multi-dimensional array in PHP](https://stackoverflow.com/questions/307674/how-to-remove-duplicate-values-from-a-mult... | 2014/10/17 | [
"https://Stackoverflow.com/questions/26422592",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3499881/"
] | Change your Report Datasource From the table you are using to ttx like below
* Step 1 : Open your DailySalesTenderReport.rpt in your crystal Report .
[](https://imgur.com/gEADO6I)
- Step 2 : Note Table type in your case it will be "Table" not view. Click the "c... | its easy to get the values of the stored procedures to crystal reports
your c# musrt be like
```
protected void Page_Load(object sender, EventArgs e)
{
if (!User.Identity.IsAuthenticated)
{
Response.Redirect("~/Default.aspx");
}
int id = Convert.ToInt32(Session["userid"]);
pl.userid = id;
... |
23,603,803 | So, I was told that passing around the `request` and or `response` variable in nodeJS is "bad practice". But this means that most of your code has to be in the server.js file, making it cluttered and kind of ugly.
How can you modularize your nodejs server, passing around `req/res` appropriately and be able to organize... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23603803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/774078/"
] | I think what the person meant by 'passing around' was something like this (in plain express):
```
app.get('/kittens', function(req, res) {
db.doAthing(req);
updateSomethingElse(res);
upvoteThisAnswer(res);
});
```
That is, passing around the two variables *beyond the first function*. This is bad because it bec... | You should not pass req and res to another modules but pass callbacks from another modules to route.
It should look like.
```
var someModule = require("./someModule")
app.get("/someAction", someModule.handleSomeAction) ;
```
If You want to have post and get in another modules You should pass reference to app (fro... |
23,603,803 | So, I was told that passing around the `request` and or `response` variable in nodeJS is "bad practice". But this means that most of your code has to be in the server.js file, making it cluttered and kind of ugly.
How can you modularize your nodejs server, passing around `req/res` appropriately and be able to organize... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23603803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/774078/"
] | This video from TJ Holowaychuk (the guy who wrote Express and a ton of other Node infrastructure that we all use) helped me take Express modularization to the next level. Basically you can make individual apps in their own folders and consume them as middleware very easily. I have managed to extend this technique to so... | You should not pass req and res to another modules but pass callbacks from another modules to route.
It should look like.
```
var someModule = require("./someModule")
app.get("/someAction", someModule.handleSomeAction) ;
```
If You want to have post and get in another modules You should pass reference to app (fro... |
23,603,803 | So, I was told that passing around the `request` and or `response` variable in nodeJS is "bad practice". But this means that most of your code has to be in the server.js file, making it cluttered and kind of ugly.
How can you modularize your nodejs server, passing around `req/res` appropriately and be able to organize... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23603803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/774078/"
] | I think what the person meant by 'passing around' was something like this (in plain express):
```
app.get('/kittens', function(req, res) {
db.doAthing(req);
updateSomethingElse(res);
upvoteThisAnswer(res);
});
```
That is, passing around the two variables *beyond the first function*. This is bad because it bec... | This video from TJ Holowaychuk (the guy who wrote Express and a ton of other Node infrastructure that we all use) helped me take Express modularization to the next level. Basically you can make individual apps in their own folders and consume them as middleware very easily. I have managed to extend this technique to so... |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | I would handle this a different way, and it doesn't require it to be ordered.
```
public List<string> GetAllStringsStartingWith(char startsWith, List<string> allWords)
{
List<string> letterSpecificWords = allWords.FindAll(word => word.ToLower()[0].Equals(startsWith));
return letterSpecificWords... | This might be a case of an xy problem. *Why* do you need the index of the last occurrence of each letter? Chances are, this isn't really what you want to do.
To answer your question anyway, for each letter, you could use the [FindLastIndex](https://msdn.microsoft.com/en-us/library/xzs5503w(v=vs.110).aspx) method.
```... |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | I would handle this a different way, and it doesn't require it to be ordered.
```
public List<string> GetAllStringsStartingWith(char startsWith, List<string> allWords)
{
List<string> letterSpecificWords = allWords.FindAll(word => word.ToLower()[0].Equals(startsWith));
return letterSpecificWords... | You could loop through the list with a for loop and compare the first letter of the current element to the first letter of the next element. If the letter is the same continue the loop, if it is different then store the index of the next element and then continue the loop. |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | I would handle this a different way, and it doesn't require it to be ordered.
```
public List<string> GetAllStringsStartingWith(char startsWith, List<string> allWords)
{
List<string> letterSpecificWords = allWords.FindAll(word => word.ToLower()[0].Equals(startsWith));
return letterSpecificWords... | To retrieve last:
```
words.LastOrDefault(i => i[0].ToLower() == 'a');
```
To get index:
```
words.FindLastIndex(i => i[0].ToLower() == 'a');
``` |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | I would handle this a different way, and it doesn't require it to be ordered.
```
public List<string> GetAllStringsStartingWith(char startsWith, List<string> allWords)
{
List<string> letterSpecificWords = allWords.FindAll(word => word.ToLower()[0].Equals(startsWith));
return letterSpecificWords... | You can do this per one cycle:
```
public Dictionary<char, int> GetCharIndex(IList<string> words)
{
if (words == null || !words.Any()) throw new ArgumentException("words can't be null or empty");
Dictionary<char, int> charIndex = new Dictionary<char, int>();
char prevLetter = words[0][0];
for(int i = 1... |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | Well, you could create a dictionary using LINQ:
```
// Note: assumes no empty words
Dictionary<char, int> lastEntries = words
.Select((index, value) => new { index, value })
.GroupBy(pair => pair.value[0])
.ToDictionary(g => g.Key, g => g.Max(p => p.index));
```
Or more usefully, keep the *first and last... | This might be a case of an xy problem. *Why* do you need the index of the last occurrence of each letter? Chances are, this isn't really what you want to do.
To answer your question anyway, for each letter, you could use the [FindLastIndex](https://msdn.microsoft.com/en-us/library/xzs5503w(v=vs.110).aspx) method.
```... |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | Well, you could create a dictionary using LINQ:
```
// Note: assumes no empty words
Dictionary<char, int> lastEntries = words
.Select((index, value) => new { index, value })
.GroupBy(pair => pair.value[0])
.ToDictionary(g => g.Key, g => g.Max(p => p.index));
```
Or more usefully, keep the *first and last... | You could loop through the list with a for loop and compare the first letter of the current element to the first letter of the next element. If the letter is the same continue the loop, if it is different then store the index of the next element and then continue the loop. |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | Well, you could create a dictionary using LINQ:
```
// Note: assumes no empty words
Dictionary<char, int> lastEntries = words
.Select((index, value) => new { index, value })
.GroupBy(pair => pair.value[0])
.ToDictionary(g => g.Key, g => g.Max(p => p.index));
```
Or more usefully, keep the *first and last... | To retrieve last:
```
words.LastOrDefault(i => i[0].ToLower() == 'a');
```
To get index:
```
words.FindLastIndex(i => i[0].ToLower() == 'a');
``` |
31,248,472 | The following code should post a form to an endpoint (which returns 302) and, after following the redirect, parse the url of the page and return some information from there.
```
val start = System.currentTimeMillis()
val requestHolder = WS.url(conf("login.url"))
.withRequestTimeout(loginRequestTimeOut)
.withFollow... | 2015/07/06 | [
"https://Stackoverflow.com/questions/31248472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1545551/"
] | Well, you could create a dictionary using LINQ:
```
// Note: assumes no empty words
Dictionary<char, int> lastEntries = words
.Select((index, value) => new { index, value })
.GroupBy(pair => pair.value[0])
.ToDictionary(g => g.Key, g => g.Max(p => p.index));
```
Or more usefully, keep the *first and last... | You can do this per one cycle:
```
public Dictionary<char, int> GetCharIndex(IList<string> words)
{
if (words == null || !words.Any()) throw new ArgumentException("words can't be null or empty");
Dictionary<char, int> charIndex = new Dictionary<char, int>();
char prevLetter = words[0][0];
for(int i = 1... |
11,686,398 | I'd like know why the following program throws a NPE
```
public static void main(String[] args) {
Integer testInteger = null;
String test = "test" + testInteger == null ? "(null)" : testInteger.toString();
}
```
while this
```
public static void main(String[] args) {
Integer testInteger = null;
Stri... | 2012/07/27 | [
"https://Stackoverflow.com/questions/11686398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1557251/"
] | This is an example of the importance of understanding [operator precedence](http://en.wikipedia.org/wiki/Order_of_operations).
You need the parentheses otherwise it is interpreted as follows:
```
String test = ("test" + testInteger) == null ? "(null)" : testInteger.toString();
```
See [here](http://bmanolov.free.fr... | Without the brackets it's doing this effectively:
`String test = ("test" + testInteger) == null ? "(null)" : testInteger.toString();`
Which results in an NPE. |
11,686,398 | I'd like know why the following program throws a NPE
```
public static void main(String[] args) {
Integer testInteger = null;
String test = "test" + testInteger == null ? "(null)" : testInteger.toString();
}
```
while this
```
public static void main(String[] args) {
Integer testInteger = null;
Stri... | 2012/07/27 | [
"https://Stackoverflow.com/questions/11686398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1557251/"
] | This is an example of the importance of understanding [operator precedence](http://en.wikipedia.org/wiki/Order_of_operations).
You need the parentheses otherwise it is interpreted as follows:
```
String test = ("test" + testInteger) == null ? "(null)" : testInteger.toString();
```
See [here](http://bmanolov.free.fr... | Because it's evaluated as `"test" + testInteger` (which is `"testnull"`, and therefore NOT null), meaning your `testInteger == null` test will never return true. |
11,686,398 | I'd like know why the following program throws a NPE
```
public static void main(String[] args) {
Integer testInteger = null;
String test = "test" + testInteger == null ? "(null)" : testInteger.toString();
}
```
while this
```
public static void main(String[] args) {
Integer testInteger = null;
Stri... | 2012/07/27 | [
"https://Stackoverflow.com/questions/11686398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1557251/"
] | This is an example of the importance of understanding [operator precedence](http://en.wikipedia.org/wiki/Order_of_operations).
You need the parentheses otherwise it is interpreted as follows:
```
String test = ("test" + testInteger) == null ? "(null)" : testInteger.toString();
```
See [here](http://bmanolov.free.fr... | I believe you need to add the parenthesis. Here is a working example which produces "<http://localhost:8080/catalog/rest>"
```
public static String getServiceBaseURL(String protocol, int port, String hostUrl, String baseUrl) {
return protocol + "://" + hostUrl + ((port == 80 || port == 443) ? "" : ":" + port) + ba... |
11,686,398 | I'd like know why the following program throws a NPE
```
public static void main(String[] args) {
Integer testInteger = null;
String test = "test" + testInteger == null ? "(null)" : testInteger.toString();
}
```
while this
```
public static void main(String[] args) {
Integer testInteger = null;
Stri... | 2012/07/27 | [
"https://Stackoverflow.com/questions/11686398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1557251/"
] | Without the brackets it's doing this effectively:
`String test = ("test" + testInteger) == null ? "(null)" : testInteger.toString();`
Which results in an NPE. | Because it's evaluated as `"test" + testInteger` (which is `"testnull"`, and therefore NOT null), meaning your `testInteger == null` test will never return true. |
11,686,398 | I'd like know why the following program throws a NPE
```
public static void main(String[] args) {
Integer testInteger = null;
String test = "test" + testInteger == null ? "(null)" : testInteger.toString();
}
```
while this
```
public static void main(String[] args) {
Integer testInteger = null;
Stri... | 2012/07/27 | [
"https://Stackoverflow.com/questions/11686398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1557251/"
] | Without the brackets it's doing this effectively:
`String test = ("test" + testInteger) == null ? "(null)" : testInteger.toString();`
Which results in an NPE. | I believe you need to add the parenthesis. Here is a working example which produces "<http://localhost:8080/catalog/rest>"
```
public static String getServiceBaseURL(String protocol, int port, String hostUrl, String baseUrl) {
return protocol + "://" + hostUrl + ((port == 80 || port == 443) ? "" : ":" + port) + ba... |
54,846,679 | This is what i have so far
i am confused on how to compare using a method i have also tried
1. items.get(i).available() == true
and also using .equals
```
public boolean available() { return myAvailability; }
```
//method
```
ArrayList<MenuItem> availableItems = new ArrayList<MenuItem>(items.size());
i... | 2019/02/23 | [
"https://Stackoverflow.com/questions/54846679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11107386/"
] | The error is here:
```
while (i < availableItems.size())
```
since `availableItems.size()` is 0.
The solutions are:
1. Use foreach loop, as in another answer
2. Use `removeIf`:
```
ArrayList<MenuItem> availableItems = new ArrayList<MenuItem>(items);
availableItems.removeif(item -> !item.available());
return avail... | ```
public static List<MenuItem> getAvailableItems(List<MenuItem> items) {
List<MenuItem> availableItems = new ArrayList<MenuItem>();
for(MenuItem item : items)
if(item.available())
availableItems.add(item);
return availableItems;
}
```
---
```
public static List<MenuItem> getAvaila... |
47,787,066 | I am implementing a shopping cart in my App. Products are displayed using `RecyclerView`, it has a `EditText` for user entering Quantity.
Looks like this:
**Screen shot**
[](https://i.stack.imgur.com/ASiSn.png)
**Problem:**
Right now i have 13 products. Suppose i... | 2017/12/13 | [
"https://Stackoverflow.com/questions/47787066",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4202735/"
] | Try this:-
Just add `viewHolder.setIsRecyclable(false);` in `onBindViewHolder` | Just add following lines of code in the adapter class to achieve the results,
```
@Override
public int getItemViewType(int position) {
return position;
}
``` |
73,225,754 | I have been breaking my head trying to figure out what I am doing wrong. Hope someone can help me with this. I have a folder in my current working directory in Visual Studio Code 1.69.2 on a Ubuntu 22.04 system with miniconda environments. The folder has some python scripts with functions and classes that I want to use... | 2022/08/03 | [
"https://Stackoverflow.com/questions/73225754",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7629190/"
] | try:
```
=AVERAGE(FILTER(C:C; YEAR(A:A)=2022; MONTH(A:A)=8; B:B="Type 1"))
```
or even `AVERAGEIFS` can be used | * Fix th date format first there is no August in your dates
[](https://i.stack.imgur.com/TiNXn.png)
>
> To look like this
>
>
>
[](https://i.stack.imgur.com/dcAUM.png)
Try this... |
39,809,897 | It is possible in form to automatically run a method from ViewController? I need to create checkboxgroup which should based on data from this controller. In this method in ViewController I'm getting data from JSON file and here I'm updating a view. Everything is ok when I have a button in listener on my view, but it sh... | 2016/10/01 | [
"https://Stackoverflow.com/questions/39809897",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2730507/"
] | The answer are listeners inside store.
```
var myStore = Ext.create('Ext.data.Store', {
...
listeners: {
'load': {
fn: function(store, records, success, operations) {
Ext.each(records, function(rec) {
console.log(Ext.encode(rec.raw));
});
}
}
}
...
});
``` | In a viewController you can listen to a store. Doc: <http://docs.sencha.com/extjs/6.2.0/classic/Ext.app.ViewController.html#cfg-listen>
The store fires an event when remote data is loaded. Doc: <http://docs.sencha.com/extjs/6.2.0/modern/Ext.data.Store.html#event-load>
Listen to the load event of the store and call on... |
44,337,202 | I'm new to linq and am trying to find a way to return the parent and a List (children) and all those children, for a given parent. I have a **Locations** table with the fields `LocationID`, `ParentLocationID`, `LocationName`. A sample of the data could look like this:
```
ABC
--ABC1
--ABC2
----DEF1
----DEF2
----D... | 2017/06/02 | [
"https://Stackoverflow.com/questions/44337202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1073700/"
] | can you try this..
```
public IEnumerable<Location> GetChild(int id)
{
DBEntities db = new DBEntities();
var locations = db.Locations.Where(x => x.ParentLocationID == id || x.LocationID == id).ToList();
var child = locations.AsEnumerable().Union(
db.Lo... | First of all you would want to let the `DBEntities` out of the recursive method. You will end up making too many connections on the Database and you will end up with memory leaks.
As for the exception. It states that the call to `GetChild(int);` cannot be translated to linq to sql expression. If you have the sql tha... |
44,337,202 | I'm new to linq and am trying to find a way to return the parent and a List (children) and all those children, for a given parent. I have a **Locations** table with the fields `LocationID`, `ParentLocationID`, `LocationName`. A sample of the data could look like this:
```
ABC
--ABC1
--ABC2
----DEF1
----DEF2
----D... | 2017/06/02 | [
"https://Stackoverflow.com/questions/44337202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1073700/"
] | can you try this..
```
public IEnumerable<Location> GetChild(int id)
{
DBEntities db = new DBEntities();
var locations = db.Locations.Where(x => x.ParentLocationID == id || x.LocationID == id).ToList();
var child = locations.AsEnumerable().Union(
db.Lo... | So while trying to figure out this myself and failing I did some research. Most of the articles I came across said this just isn't possible in a single query with Linq.
One thing you can do is gather up all the IDs of the objects that will be in your hierarchy. Then grab only the Objects you will need from the and the... |
49,826,455 | I want to place different `textarea`s on different pages. The *CSS* for the `textarea` seems to be overriding the *rows* and *cols* I try to set for the second `textarea`. I've tried "*textarea*" and "*textarea1*", but that obviously didn't work.
```css
textarea {
width: 40%;
height: 75px;
padding: 12px 20px ... | 2018/04/13 | [
"https://Stackoverflow.com/questions/49826455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9311132/"
] | you can use like this
```css
textarea:not(.reason) {
width: 40%;
height: 75px;
padding: 12px 20px ;
box-sizing: border-box;
border: 5px solid #D8FF01;
border-radius: 4px;
background-color: #000;
color: white;
font-weight:bolder;
resize:both;
}
```
```html
<form>
<t... | Your code should be like this
**HTML:**
```
<form>
<textarea class="textarea1" name="comment" placeholder="Enter text here">
</textarea>
</form>
<form>
<textarea class="textarea2" name="reason" placeholder="Enter text here: (500 characters maximum)" maxlength="500" rows="10" cols="50"></textarea>
</form>
``... |
49,826,455 | I want to place different `textarea`s on different pages. The *CSS* for the `textarea` seems to be overriding the *rows* and *cols* I try to set for the second `textarea`. I've tried "*textarea*" and "*textarea1*", but that obviously didn't work.
```css
textarea {
width: 40%;
height: 75px;
padding: 12px 20px ... | 2018/04/13 | [
"https://Stackoverflow.com/questions/49826455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9311132/"
] | you can use like this
```css
textarea:not(.reason) {
width: 40%;
height: 75px;
padding: 12px 20px ;
box-sizing: border-box;
border: 5px solid #D8FF01;
border-radius: 4px;
background-color: #000;
color: white;
font-weight:bolder;
resize:both;
}
```
```html
<form>
<t... | try to just do a separate css for both by using class so:
```
<form>
<textarea class="xxx" name="comment" placeholder="Enter text here">
</textarea>
</form>
<form>
<textarea class="yyy" name="reason" placeholder="Enter text here: (500 characters maximum)" maxlength="500" rows="10" cols="50">
</t... |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | ```
awk '/^[BH]/ || /^[[:blank:]]*[[:digit:]]/' inputfile
``` | ```
cat filename.txt | awk '/^[B(H(^ .*$){2})].*$/' > output.txt
```
**EDIT**: Updated for OP's edit |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | Ignoring the blank line after `B` in your output (your problem specifications give no indication as to why that blank line is in the output, so I'm assuming it should not be there):
```
awk '/^H/{t=3} /^B/ || t-- >0' input.file
```
will print all lines that start with `B` and each line that starts with `H` along wit... | ```
cat filename.txt | awk '/^[B(H(^ .*$){2})].*$/' > output.txt
```
**EDIT**: Updated for OP's edit |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | ```
bash-3.00$ cat t
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
bash-3.00$ awk '{if(( $1 == "B") ... | ```
cat filename.txt | awk '/^[B(H(^ .*$){2})].*$/' > output.txt
```
**EDIT**: Updated for OP's edit |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | ```
awk '/^[BH]/ || /^[[:blank:]]*[[:digit:]]/' inputfile
``` | If `H` and `B` aren't the only headers that are sent before tabular data and you intend to omit those blocks of data (you don't specify the requirements fully) you have to use a flip-flop to remember if you're currently in a block you want to keep or not:
```
awk '/^[^ 0-9]/ {inblock=0}; /^[BH]/ {inblock=1}; { if (inb... |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | Ignoring the blank line after `B` in your output (your problem specifications give no indication as to why that blank line is in the output, so I'm assuming it should not be there):
```
awk '/^H/{t=3} /^B/ || t-- >0' input.file
```
will print all lines that start with `B` and each line that starts with `H` along wit... | ```
awk '/^[BH]/ || /^[[:blank:]]*[[:digit:]]/' inputfile
``` |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | Ignoring the blank line after `B` in your output (your problem specifications give no indication as to why that blank line is in the output, so I'm assuming it should not be there):
```
awk '/^H/{t=3} /^B/ || t-- >0' input.file
```
will print all lines that start with `B` and each line that starts with `H` along wit... | If `H` and `B` aren't the only headers that are sent before tabular data and you intend to omit those blocks of data (you don't specify the requirements fully) you have to use a flip-flop to remember if you're currently in a block you want to keep or not:
```
awk '/^[^ 0-9]/ {inblock=0}; /^[BH]/ {inblock=1}; { if (inb... |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | ```
bash-3.00$ cat t
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
bash-3.00$ awk '{if(( $1 == "B") ... | If `H` and `B` aren't the only headers that are sent before tabular data and you intend to omit those blocks of data (you don't specify the requirements fully) you have to use a flip-flop to remember if you're currently in a block you want to keep or not:
```
awk '/^[^ 0-9]/ {inblock=0}; /^[BH]/ {inblock=1}; { if (inb... |
11,083,189 | I have a text file that looks like this.
```
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
```
I n... | 2012/06/18 | [
"https://Stackoverflow.com/questions/11083189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463662/"
] | Ignoring the blank line after `B` in your output (your problem specifications give no indication as to why that blank line is in the output, so I'm assuming it should not be there):
```
awk '/^H/{t=3} /^B/ || t-- >0' input.file
```
will print all lines that start with `B` and each line that starts with `H` along wit... | ```
bash-3.00$ cat t
A 102
B 456
C 678
H A B C D E F G H I J
1.18 0.20 0.23 0.05 1.89 0.72 0.11 0.49 0.31 1.45
3.23 0.06 2.67 1.96 0.76 0.97 0.84 0.77 0.39 1.08
bash-3.00$ awk '{if(( $1 == "B") ... |
3,671 | I've never seen this happen before but it happened twice in one game recently (by 2 different players!).
The shuttle hit the tape and went over the net but then got caught and never hit the ground.
None of us were sure what the rules said on this one.
Does the shuttle have to hit the ground before anyone wins the poi... | 2013/12/18 | [
"https://sports.stackexchange.com/questions/3671",
"https://sports.stackexchange.com",
"https://sports.stackexchange.com/users/2046/"
] | According the official *[LAWS OF BADMINTON](http://bwfbadminton.org/file.aspx?id=516821&dl=1)*, set by the [Badminton World Federation](http://bwfbadminton.org/default.aspx), chapter 14 is affected: *LETS*. Here the different situations are outlined when you need to play a let and in paragraph 14.2.3 [the following abo... | It must be treated as a [let](http://www.angelfire.com/ab2/OxfordBadminton/Rules.html#Lets)
1. 'Let' is called by the umpire, or by a player (if there is no umpire) to halt play.
2. A 'let' may be given for any unforeseen or accidental occurrence.
3. >
> **If a shuttle is caught on the net and remains suspended on to... |
3,671 | I've never seen this happen before but it happened twice in one game recently (by 2 different players!).
The shuttle hit the tape and went over the net but then got caught and never hit the ground.
None of us were sure what the rules said on this one.
Does the shuttle have to hit the ground before anyone wins the poi... | 2013/12/18 | [
"https://sports.stackexchange.com/questions/3671",
"https://sports.stackexchange.com",
"https://sports.stackexchange.com/users/2046/"
] | Yes, it makes a difference whether it's the serve or in general play.
These rules only apply if the shuttle at least gets to the top of the net (or over it) before becoming stuck. If you hit it too low and it gets stuck in the middle of the net without going over first, that's a fault and you lose the point.
>
> It ... | It must be treated as a [let](http://www.angelfire.com/ab2/OxfordBadminton/Rules.html#Lets)
1. 'Let' is called by the umpire, or by a player (if there is no umpire) to halt play.
2. A 'let' may be given for any unforeseen or accidental occurrence.
3. >
> **If a shuttle is caught on the net and remains suspended on to... |
3,671 | I've never seen this happen before but it happened twice in one game recently (by 2 different players!).
The shuttle hit the tape and went over the net but then got caught and never hit the ground.
None of us were sure what the rules said on this one.
Does the shuttle have to hit the ground before anyone wins the poi... | 2013/12/18 | [
"https://sports.stackexchange.com/questions/3671",
"https://sports.stackexchange.com",
"https://sports.stackexchange.com/users/2046/"
] | According the official *[LAWS OF BADMINTON](http://bwfbadminton.org/file.aspx?id=516821&dl=1)*, set by the [Badminton World Federation](http://bwfbadminton.org/default.aspx), chapter 14 is affected: *LETS*. Here the different situations are outlined when you need to play a let and in paragraph 14.2.3 [the following abo... | Yes, it makes a difference whether it's the serve or in general play.
These rules only apply if the shuttle at least gets to the top of the net (or over it) before becoming stuck. If you hit it too low and it gets stuck in the middle of the net without going over first, that's a fault and you lose the point.
>
> It ... |
39,577,054 | I get the following error after updating to xcode 8 and I'm not sure how to fix.
```
Error:The C compiler "/usr/bin/cc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/username/Library/Caches/CLion2016.2/cmake/generated/CacheBack-27c25a9c/27c25a9c/__default__/CMak... | 2016/09/19 | [
"https://Stackoverflow.com/questions/39577054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/339427/"
] | Please check
`xcode-select -p`, make sure it points to Xcode 8 installation and run `xcode-select --install` after that. | I had to accept the license dialog after starting Xcode to get the updated components. After that I restarted Clion and it worked. |
30,003,464 | I am seeing my `web` logs with `docker-compose logs web`, but I would like to add timestamps to those messages, because now they're quite out of context (don't know when did the event happen). I tried `docker-compose logs -t web`, but it seems Docker Compose is unaware of this flag.
Do you have any idea how can I make... | 2015/05/02 | [
"https://Stackoverflow.com/questions/30003464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/433940/"
] | `docker-compose` now supports the `-t` argument, as pointed out by Ittiel. | docker-compose version 1.8.0 supports logs, you can use:
```
docker-compose logs -t
``` |
15,370,173 | I have users who have authorized foursquare to connect to my app but then have subsequently deleted their account on my app. I use the foursquare real time push api and foursquare keeps pushing checkins of users who no longer use my app. Right now I just ignore them, but I'd like to make an API call to disconnect these... | 2013/03/12 | [
"https://Stackoverflow.com/questions/15370173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2103025/"
] | They do care. GWT is a magical development environment, under constant evolution.
They have to race with new versions of browsers, Javascript and releases of Eclipse, so sometimes tiny things may not be always documented up to date. The tutorial you are trying to run is made for GWT Designer 2.3, GPE 2.3, Eclipse 3.7 ... | In case the designer tab does't show up by default, I noticed that I can get it by right-clicking the .java on the package explorer and selecting 'open with ...' 'WindowBuilder Editor'. |
66,460,917 | I need a way to track all the component calls when a page renders, for example if my page is like:
```
<MyPage>
<A />
<B>
<B2/>
<B3>
</B>
<C /> // witch the component C, calls D in its own code
</MyPage>
```
and C is like:
```
<C>
<D />
</C>
```
something like that, witch a bunch of nes... | 2021/03/03 | [
"https://Stackoverflow.com/questions/66460917",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10220474/"
] | Have you taken a look at the React Developer Tools addon ([Chrome](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en), [Firefox](https://addons.mozilla.org/en-US/firefox/addon/react-devtools/))? That will add a "Components" tab to your developer tools, which looks li... | It's like you asking something already done in React Chrome extension,which is an open source project..
When you looked into its main.js file <https://github.com/facebook/react/blob/master/packages/react-devtools-extensions/src/main.js>
Which got some noticable imports
import {
getAppendComponentStack,
getBreakOnConso... |
20,932,058 | In my project in C, I get these errors:
```
error C2371: 'tDatabase' : redefinition; different basic types
db.h(7) : see declaration of 'tDatabase'
error C2223: left of '->numberOfCity' must point to struct/union
error C2198: 'calloc' : too few arguments for call
```
I'm beginner in C. How can I fix it? Thanks.
fil... | 2014/01/05 | [
"https://Stackoverflow.com/questions/20932058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3161483/"
] | Remove the definition of `struct Database` from your code; this is what the compiler means by "redefinition". You don't need it, because it is already in `"DB.h"`. (That is, in fact what header files are for: To ensure that all c files that use it use the same definition and not a "private" one.)
[Aside: If, on the ot... | Firstly, you are doing definition the `Database`. So, avoid the problem by removing definition of the `Database` in your DB.c file.
Secondly, `data->numberOfCity,` is wrong, because `data` is declared as char arry, so it doesn't have `numberOfCity` as class member. |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Use the `System.ServiceProcess.ServiceController` class for a service. You can use `Status` to check if it's running and the `Stop()` and `Start()` to control it.
```
ServiceController sc = new ServiceController();
sc.MachineName = remoteSystem;
sc.ServiceName = procSearc;
if (sc.Status.Equals(ServiceControllerStatus... | I figured when running the application by itself I would get an exception window, because exceptions were not handled within my code...
There I saw the reason in the stacktrace: **access denied**. The reason was that the user running the program that was calling the .NET method to get the process list was not part of ... |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Use the `System.ServiceProcess.ServiceController` class for a service. You can use `Status` to check if it's running and the `Stop()` and `Start()` to control it.
```
ServiceController sc = new ServiceController();
sc.MachineName = remoteSystem;
sc.ServiceName = procSearc;
if (sc.Status.Equals(ServiceControllerStatus... | Does the inner Exception say "Access Denied"?
A similar question may help, it mentions needing to be in the Performance Monitor Users group.
[GetProcessesByName() and Windows Server 2003 scheduled task](https://stackoverflow.com/questions/152337/getprocessesbyname-and-windows-server-2003-scheduled-task) |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Does the inner Exception say "Access Denied"?
A similar question may help, it mentions needing to be in the Performance Monitor Users group.
[GetProcessesByName() and Windows Server 2003 scheduled task](https://stackoverflow.com/questions/152337/getprocessesbyname-and-windows-server-2003-scheduled-task) | **Killing the remote process**
I found that the Process.Kill() method does not work when the Process.MachineName has been set, so here is a solution for killing the process remotely, hope it helps others.
**The extension method to create the method: KillRemoteProcess**
```
public static class ProcessExtensions
{... |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Below is what I did to get this to work:
First I added a reference to System.ServiceProcess and added: using System.ServiceProcess;
```
string remoteSystem = "remoteSystemName";
string procSearch = "notepad";
Process[] proc = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
if ... | Does the inner Exception say "Access Denied"?
A similar question may help, it mentions needing to be in the Performance Monitor Users group.
[GetProcessesByName() and Windows Server 2003 scheduled task](https://stackoverflow.com/questions/152337/getprocessesbyname-and-windows-server-2003-scheduled-task) |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Use the `System.ServiceProcess.ServiceController` class for a service. You can use `Status` to check if it's running and the `Stop()` and `Start()` to control it.
```
ServiceController sc = new ServiceController();
sc.MachineName = remoteSystem;
sc.ServiceName = procSearc;
if (sc.Status.Equals(ServiceControllerStatus... | Below is what I did to get this to work:
First I added a reference to System.ServiceProcess and added: using System.ServiceProcess;
```
string remoteSystem = "remoteSystemName";
string procSearch = "notepad";
Process[] proc = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
if ... |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Use the `System.ServiceProcess.ServiceController` class for a service. You can use `Status` to check if it's running and the `Stop()` and `Start()` to control it.
```
ServiceController sc = new ServiceController();
sc.MachineName = remoteSystem;
sc.ServiceName = procSearc;
if (sc.Status.Equals(ServiceControllerStatus... | **Killing the remote process**
I found that the Process.Kill() method does not work when the Process.MachineName has been set, so here is a solution for killing the process remotely, hope it helps others.
**The extension method to create the method: KillRemoteProcess**
```
public static class ProcessExtensions
{... |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Below is what I did to get this to work:
First I added a reference to System.ServiceProcess and added: using System.ServiceProcess;
```
string remoteSystem = "remoteSystemName";
string procSearch = "notepad";
Process[] proc = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
if ... | I figured when running the application by itself I would get an exception window, because exceptions were not handled within my code...
There I saw the reason in the stacktrace: **access denied**. The reason was that the user running the program that was calling the .NET method to get the process list was not part of ... |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Below is what I did to get this to work:
First I added a reference to System.ServiceProcess and added: using System.ServiceProcess;
```
string remoteSystem = "remoteSystemName";
string procSearch = "notepad";
Process[] proc = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
if ... | **Killing the remote process**
I found that the Process.Kill() method does not work when the Process.MachineName has been set, so here is a solution for killing the process remotely, hope it helps others.
**The extension method to create the method: KillRemoteProcess**
```
public static class ProcessExtensions
{... |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Below is what I did to get this to work:
First I added a reference to System.ServiceProcess and added: using System.ServiceProcess;
```
string remoteSystem = "remoteSystemName";
string procSearch = "notepad";
Process[] proc = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
if ... | You may try impersonate to the user that have access to the remote server.
<https://learn.microsoft.com/en-us/dotnet/api/system.security.principal.windowsimpersonationcontext?redirectedfrom=MSDN&view=netframework-4.7.2>
After Impersonation, you will no longer hit the error.
Also, you have to make sure there is trust ... |
865,412 | I am trying to check if a process is running on a remote system. I am using the following code:
```
string procSearc = "notepad";
string remoteSystem = "remoteSystemName";
Process[] proce = System.Diagnostics.Process.GetProcessesByName(procSearch, remoteSystem);
```
However, when I try to run the code, I get the fo... | 2009/05/14 | [
"https://Stackoverflow.com/questions/865412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Use the `System.ServiceProcess.ServiceController` class for a service. You can use `Status` to check if it's running and the `Stop()` and `Start()` to control it.
```
ServiceController sc = new ServiceController();
sc.MachineName = remoteSystem;
sc.ServiceName = procSearc;
if (sc.Status.Equals(ServiceControllerStatus... | You may try impersonate to the user that have access to the remote server.
<https://learn.microsoft.com/en-us/dotnet/api/system.security.principal.windowsimpersonationcontext?redirectedfrom=MSDN&view=netframework-4.7.2>
After Impersonation, you will no longer hit the error.
Also, you have to make sure there is trust ... |
1,894,134 | I have a form with dozens of fields. Some are required, some are not. With the fields that are required, I have added `class="required"` to the item
I found this snippet of code and was wondering how to adjust it
```
$('#form').submit (function() {
if(formValidated())
return true;
return false;
});
```
I on... | 2009/12/12 | [
"https://Stackoverflow.com/questions/1894134",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/230376/"
] | try something like
```
$(".classes").mouseover(function() {
$(this).function();
};
```
to get the ID of an element you use the attr function
```
$('.name').attr('id');
``` | You could set a class to flag the divs after you applied the animation so you can easily identify hovered divs.
```
(function($){
$.fn.extend({
myDivHover: function(){
var $set = $(this);
return $set.each(function(){
var $el = $(this);
$el.hover(func... |
1,894,134 | I have a form with dozens of fields. Some are required, some are not. With the fields that are required, I have added `class="required"` to the item
I found this snippet of code and was wondering how to adjust it
```
$('#form').submit (function() {
if(formValidated())
return true;
return false;
});
```
I on... | 2009/12/12 | [
"https://Stackoverflow.com/questions/1894134",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/230376/"
] | try something like
```
$(".classes").mouseover(function() {
$(this).function();
};
```
to get the ID of an element you use the attr function
```
$('.name').attr('id');
``` | On hover on these div's...
***HTML:***
```
<div class="add_post_cmmnt" id="box-100" >Box1</div>
<div class="add_post_cmmnt" id="box-200" >Box2</div>
<div class="add_post_cmmnt" id="box-400" >Box3</div>
```
***JavaScript:***
```
$(".add_post_cmmnt").hover(function(e) {
var id = this.id; // Get the id of th... |
1,894,134 | I have a form with dozens of fields. Some are required, some are not. With the fields that are required, I have added `class="required"` to the item
I found this snippet of code and was wondering how to adjust it
```
$('#form').submit (function() {
if(formValidated())
return true;
return false;
});
```
I on... | 2009/12/12 | [
"https://Stackoverflow.com/questions/1894134",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/230376/"
] | On hover on these div's...
***HTML:***
```
<div class="add_post_cmmnt" id="box-100" >Box1</div>
<div class="add_post_cmmnt" id="box-200" >Box2</div>
<div class="add_post_cmmnt" id="box-400" >Box3</div>
```
***JavaScript:***
```
$(".add_post_cmmnt").hover(function(e) {
var id = this.id; // Get the id of th... | You could set a class to flag the divs after you applied the animation so you can easily identify hovered divs.
```
(function($){
$.fn.extend({
myDivHover: function(){
var $set = $(this);
return $set.each(function(){
var $el = $(this);
$el.hover(func... |
857,146 | Whenever I go to the Netflix main page in Firefox, I'm automatically logged in.
However, when I open up Firefox's list of saved passwords, I notice that Netflix is not among the sites Firefox is keeping passwords for (`Options -> Security -> Saved Passwords`)
How does Netflix know the password if Firefox isn't storin... | 2014/12/26 | [
"https://superuser.com/questions/857146",
"https://superuser.com",
"https://superuser.com/users/39558/"
] | Netflix – like most other websites – doesn't *care* about your password during normal browsing. Instead, when you log in, Netflix has the browser store a 'cookie' with the login session ID. The browser sends it back every time it requests a new page. (Likewise, the password storage in Firefox is not used during normal ... | Did you check your cookies? Your password, or an encrypted copy of your password, might be there. |
857,146 | Whenever I go to the Netflix main page in Firefox, I'm automatically logged in.
However, when I open up Firefox's list of saved passwords, I notice that Netflix is not among the sites Firefox is keeping passwords for (`Options -> Security -> Saved Passwords`)
How does Netflix know the password if Firefox isn't storin... | 2014/12/26 | [
"https://superuser.com/questions/857146",
"https://superuser.com",
"https://superuser.com/users/39558/"
] | There's nothing wrong with Netflix. Just like **almost all** websites that you can log on, it stores a cookie on your PC which among other things, stores an encrypted data representing your password.
Haven't you seen the same behavior on Google, Facebook, Yahoo, Windows Live and whatever account you may think of?
Som... | Did you check your cookies? Your password, or an encrypted copy of your password, might be there. |
857,146 | Whenever I go to the Netflix main page in Firefox, I'm automatically logged in.
However, when I open up Firefox's list of saved passwords, I notice that Netflix is not among the sites Firefox is keeping passwords for (`Options -> Security -> Saved Passwords`)
How does Netflix know the password if Firefox isn't storin... | 2014/12/26 | [
"https://superuser.com/questions/857146",
"https://superuser.com",
"https://superuser.com/users/39558/"
] | To answer your first question, **Netflix doesn't know your password**.
What Netflix and every other competent website out there does is hash your password using a one-way hashing scheme ([MD5](https://en.wikipedia.org/wiki/MD5), [SHA-1](https://en.wikipedia.org/wiki/SHA-1), [SHA-2](https://en.wikipedia.org/wiki/SHA-2)... | Did you check your cookies? Your password, or an encrypted copy of your password, might be there. |
857,146 | Whenever I go to the Netflix main page in Firefox, I'm automatically logged in.
However, when I open up Firefox's list of saved passwords, I notice that Netflix is not among the sites Firefox is keeping passwords for (`Options -> Security -> Saved Passwords`)
How does Netflix know the password if Firefox isn't storin... | 2014/12/26 | [
"https://superuser.com/questions/857146",
"https://superuser.com",
"https://superuser.com/users/39558/"
] | To answer your first question, **Netflix doesn't know your password**.
What Netflix and every other competent website out there does is hash your password using a one-way hashing scheme ([MD5](https://en.wikipedia.org/wiki/MD5), [SHA-1](https://en.wikipedia.org/wiki/SHA-1), [SHA-2](https://en.wikipedia.org/wiki/SHA-2)... | Netflix – like most other websites – doesn't *care* about your password during normal browsing. Instead, when you log in, Netflix has the browser store a 'cookie' with the login session ID. The browser sends it back every time it requests a new page. (Likewise, the password storage in Firefox is not used during normal ... |
857,146 | Whenever I go to the Netflix main page in Firefox, I'm automatically logged in.
However, when I open up Firefox's list of saved passwords, I notice that Netflix is not among the sites Firefox is keeping passwords for (`Options -> Security -> Saved Passwords`)
How does Netflix know the password if Firefox isn't storin... | 2014/12/26 | [
"https://superuser.com/questions/857146",
"https://superuser.com",
"https://superuser.com/users/39558/"
] | To answer your first question, **Netflix doesn't know your password**.
What Netflix and every other competent website out there does is hash your password using a one-way hashing scheme ([MD5](https://en.wikipedia.org/wiki/MD5), [SHA-1](https://en.wikipedia.org/wiki/SHA-1), [SHA-2](https://en.wikipedia.org/wiki/SHA-2)... | There's nothing wrong with Netflix. Just like **almost all** websites that you can log on, it stores a cookie on your PC which among other things, stores an encrypted data representing your password.
Haven't you seen the same behavior on Google, Facebook, Yahoo, Windows Live and whatever account you may think of?
Som... |
5,693,297 | I have many points constructing a line. How can I draw a wavy line through those points? | 2011/04/17 | [
"https://Stackoverflow.com/questions/5693297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/434689/"
] | Example:
```
- (void)drawRect:(NSRect)rect
{
NSBezierPath *curve = [NSBezierPath bezierPath];
[curve moveToPoint:NSMakePoint(0,50)];
[curve relativeCurveToPoint:NSMakePoint(150,50) controlPoint1:NSMakePoint(50,100) controlPoint2:NSMakePoint(100,0)];
[[NSColor redColor] set];
[curve stroke];
}
```... | create a `NSBezierPath` , and use your points as the control points. |
5,693,297 | I have many points constructing a line. How can I draw a wavy line through those points? | 2011/04/17 | [
"https://Stackoverflow.com/questions/5693297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/434689/"
] | Use CGContextRef on iOS.
WavyView.h
```
#import <UIKit/UIKit.h>
@interface WavyView : UIView {
}
@end
```
WavyView.m
```
#import "WavyView.h"
@implementation WavyView
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
return self;
}
- (void)drawRect:(CGRect)rect {
CGContextRe... | create a `NSBezierPath` , and use your points as the control points. |
50,263,375 | My task is to make a toggle range (ascendent or descendent). First radio selection is **Ascendent** and the second - **Descendent**. I use sprite file for active, hover or selected case.
How can I remove the Input circles?
[](https://i.stack.imgur.com/lZFYT.jpg)
If I... | 2018/05/09 | [
"https://Stackoverflow.com/questions/50263375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5515903/"
] | Make necessary changes in the following, replace the background, etc
```css
.sort-toggle {
margin: 0 0 0 50px;
}
.sort-toggle label {
position: relative;
display: inline-block;
border: 1px solid black;
}
.sort-toggle input[type="radio"] {
position: relative;
cursor: pointer;
visibili... | i would personally suggest to use available custom codes so you have not to spent more time on it.
Here is an example of a form structure:
```
<form class="ac-custom ac-checkbox ac-cross">
<h2>How do you collaboratively administrate empowered markets via plug-and-play networks?</h2>
<ul>
<li><input i... |
50,263,375 | My task is to make a toggle range (ascendent or descendent). First radio selection is **Ascendent** and the second - **Descendent**. I use sprite file for active, hover or selected case.
How can I remove the Input circles?
[](https://i.stack.imgur.com/lZFYT.jpg)
If I... | 2018/05/09 | [
"https://Stackoverflow.com/questions/50263375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5515903/"
] | Thanks for Your interest of my problem. At last I finished by my self.
```css
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
clip: rect(0 0 0 0);
overflow: hidden;
}
.sort-toggle input[type="radio"] {
display: none;
... | i would personally suggest to use available custom codes so you have not to spent more time on it.
Here is an example of a form structure:
```
<form class="ac-custom ac-checkbox ac-cross">
<h2>How do you collaboratively administrate empowered markets via plug-and-play networks?</h2>
<ul>
<li><input i... |
30,079,328 | The structure of the index/archive page looks like this
```
<article <?php post_class(); ?> >
<header>
<h1><a href=""></a></h1>
</header>
<section>
<?php the_content(); ?>
</section>
<footer>
</footer>
</article>
```
I want to make the "section" clickable. I think it can be d... | 2015/05/06 | [
"https://Stackoverflow.com/questions/30079328",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4132591/"
] | If you want `section` to be clickable you can set this rule:
```
section { cursor:pointer }
```
and assign a function to be called on click:
```
$('section').on('click', function() {
// your function
});
```
**UPDATE (Alternative)**
If you don't want to use jQuery, you can just wrap the whole section in to an... | You can wrap your section tag with an `a` tag ([HTML5 compliant](http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element)). It would look like this:
```
<a href="http://google.com">
<section>
<?php the_content(); ?>
</section>
</a>
``` |
30,079,328 | The structure of the index/archive page looks like this
```
<article <?php post_class(); ?> >
<header>
<h1><a href=""></a></h1>
</header>
<section>
<?php the_content(); ?>
</section>
<footer>
</footer>
</article>
```
I want to make the "section" clickable. I think it can be d... | 2015/05/06 | [
"https://Stackoverflow.com/questions/30079328",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4132591/"
] | If you want `section` to be clickable you can set this rule:
```
section { cursor:pointer }
```
and assign a function to be called on click:
```
$('section').on('click', function() {
// your function
});
```
**UPDATE (Alternative)**
If you don't want to use jQuery, you can just wrap the whole section in to an... | Another non-recommended way is
```
<article <?php post_class(); ?>>
<header><h1><a href=""></a></h1>
<a href="#">
<section>
<?php the_content(); ?>
</section>
</a>
<footer>
</footer>
</article>
```
It works for me sometimes.
Although, the answer you link in your que... |
30,079,328 | The structure of the index/archive page looks like this
```
<article <?php post_class(); ?> >
<header>
<h1><a href=""></a></h1>
</header>
<section>
<?php the_content(); ?>
</section>
<footer>
</footer>
</article>
```
I want to make the "section" clickable. I think it can be d... | 2015/05/06 | [
"https://Stackoverflow.com/questions/30079328",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4132591/"
] | If you want `section` to be clickable you can set this rule:
```
section { cursor:pointer }
```
and assign a function to be called on click:
```
$('section').on('click', function() {
// your function
});
```
**UPDATE (Alternative)**
If you don't want to use jQuery, you can just wrap the whole section in to an... | I found a solution but i still need help.
`<section onclick="document.location='<?php the_permalink() ?>'" >` Works even in IE7.
But if I have links or images in the post somehow they are clickable and they shouldn't be.
I've tried putting the the z-index for section to z-index:99999999999999.
Any ideas? Thanks. |
4,008,345 | I have a string:
```
TFS[MAD,GRO,BCN],ALC[GRO,PMI,ZAZ,MAD,BCN],BCN[ALC,...]...
```
I want to convert it into a list:
```
list = (
[0] => "TFS"
[0] => "MAD"
[1] => "GRO"
[2] => "BCN"
[1] => "ALC"
[0] => "GRO"
[1] => "PMI"
[2] => "ZAZ"
[3] => "MAD"
[4] => "BCN"
[2] => "BCN"
[1] => ... | 2010/10/24 | [
"https://Stackoverflow.com/questions/4008345",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/434461/"
] | You need to tell the regex that the `,` is not required after each element, but instead in front of each argument except the first. This leads to the following regex:
```
str="TFS[MAD,GRO,BCN],ALC[GRO,PMI,ZAZ,MAD,BCN],BCN[ALC]"
str.scan(/[A-Z]{3}\[[A-Z]{3}(?:,[A-Z]{3})*\]/)
#=> ["TFS[MAD,GRO,BCN]", "ALC[GRO,PMI,ZAZ,MA... | first split the groups
```
groups = s.scan(/[^,][^\[]*\[[^\[]*\]/)
# => ["TFS[MAD,GRO,BCN]", "ALC[GRO,PMI,ZAZ,MAD,BCN]"]
```
Now you have the groups, the rest is pretty straightforward:
```
groups.map {|x| [x[0..2], x[4..-2].split(',')] }
# => [["TFS", ["MAD", "GRO", "BCN"]], ["ALC", ["GRO", "PMI", "ZAZ", "MAD", "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.