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 |
|---|---|---|---|---|---|
4,006,850 | **[Edit]**
From the feedback/answers I have received, I gather there is some confusion regarding the original question. Consequently, I have reduced the problem to its most rudimentary form
Here are the relevant facts of the problem:
1. I have a sorted sequence: **S**
2. I have an item (denoted by ***i***) that is G... | 2010/10/24 | [
"https://Stackoverflow.com/questions/4006850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197843/"
] | Given your relevant facts:
```
>>> import bisect
>>> def find_fwd_iter(S, i):
... j = bisect.bisect_left(S, i)
... for k in xrange(j, len(S)):
... yield S[k]
...
>>> def find_bkwd_iter(S, i):
... j = bisect.bisect_left(S, i)
... for k in xrange(j, -1, -1):
... yield S[k]
...
>>> L = [10... | If you know for a fact that the items in your sequence are sorted, you can just use a generator expression:
```
(item for item in seq if item >= 5)
```
This returns a generator; it doesn't actually traverse the list until you iterate over it, i.e.:
```
for item in (item for item in seq if item > 5)
print item
... |
4,006,850 | **[Edit]**
From the feedback/answers I have received, I gather there is some confusion regarding the original question. Consequently, I have reduced the problem to its most rudimentary form
Here are the relevant facts of the problem:
1. I have a sorted sequence: **S**
2. I have an item (denoted by ***i***) that is G... | 2010/10/24 | [
"https://Stackoverflow.com/questions/4006850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197843/"
] | Given your relevant facts:
```
>>> import bisect
>>> def find_fwd_iter(S, i):
... j = bisect.bisect_left(S, i)
... for k in xrange(j, len(S)):
... yield S[k]
...
>>> def find_bkwd_iter(S, i):
... j = bisect.bisect_left(S, i)
... for k in xrange(j, -1, -1):
... yield S[k]
...
>>> L = [10... | First off, this question isn't related to dicts. You're operating on a sorted `list`. You're using the *results* on a dict, but that's not relevant to the question.
You want the `bisect` module, which implements binary searching. Starting from your code:
```
import bisect
mydict = {
"2001-01-01":"data1",
... |
4,006,850 | **[Edit]**
From the feedback/answers I have received, I gather there is some confusion regarding the original question. Consequently, I have reduced the problem to its most rudimentary form
Here are the relevant facts of the problem:
1. I have a sorted sequence: **S**
2. I have an item (denoted by ***i***) that is G... | 2010/10/24 | [
"https://Stackoverflow.com/questions/4006850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197843/"
] | yes , you can do like this:
```
import itertools
from datetime import datetime
data = {
"2008-11-10 17:53:59":"data",
"2005-11-10 17:53:59":"data",
}
list_ = data.keys()
new_list = [datetime.strptime(x, "%Y-%m-%d %H:%M:%S") for x in list_]
begin_date = datetime.strptime("2007-11-10 17:53:59", "%Y-%m-%d ... | You can do
```
def on_or_after(date):
from itertools import dropwhile
sorted_items = sorted(date_dictionary.iteritems())
def before_date(pair):
return pair[0] < date
on_or_after_date = dropwhile(before_date, sorted_items)
```
which I think is about as efficient as it's going to get if you're ... |
4,006,850 | **[Edit]**
From the feedback/answers I have received, I gather there is some confusion regarding the original question. Consequently, I have reduced the problem to its most rudimentary form
Here are the relevant facts of the problem:
1. I have a sorted sequence: **S**
2. I have an item (denoted by ***i***) that is G... | 2010/10/24 | [
"https://Stackoverflow.com/questions/4006850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197843/"
] | If you know for a fact that the items in your sequence are sorted, you can just use a generator expression:
```
(item for item in seq if item >= 5)
```
This returns a generator; it doesn't actually traverse the list until you iterate over it, i.e.:
```
for item in (item for item in seq if item > 5)
print item
... | You can do
```
def on_or_after(date):
from itertools import dropwhile
sorted_items = sorted(date_dictionary.iteritems())
def before_date(pair):
return pair[0] < date
on_or_after_date = dropwhile(before_date, sorted_items)
```
which I think is about as efficient as it's going to get if you're ... |
4,006,850 | **[Edit]**
From the feedback/answers I have received, I gather there is some confusion regarding the original question. Consequently, I have reduced the problem to its most rudimentary form
Here are the relevant facts of the problem:
1. I have a sorted sequence: **S**
2. I have an item (denoted by ***i***) that is G... | 2010/10/24 | [
"https://Stackoverflow.com/questions/4006850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197843/"
] | If you know for a fact that the items in your sequence are sorted, you can just use a generator expression:
```
(item for item in seq if item >= 5)
```
This returns a generator; it doesn't actually traverse the list until you iterate over it, i.e.:
```
for item in (item for item in seq if item > 5)
print item
... | One simpler way (albeit slower) would be to use `filter` and filter for keys before/after that date. Filter has to process each element in the list as opposed to slicing not needing to. |
4,006,850 | **[Edit]**
From the feedback/answers I have received, I gather there is some confusion regarding the original question. Consequently, I have reduced the problem to its most rudimentary form
Here are the relevant facts of the problem:
1. I have a sorted sequence: **S**
2. I have an item (denoted by ***i***) that is G... | 2010/10/24 | [
"https://Stackoverflow.com/questions/4006850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197843/"
] | If you know for a fact that the items in your sequence are sorted, you can just use a generator expression:
```
(item for item in seq if item >= 5)
```
This returns a generator; it doesn't actually traverse the list until you iterate over it, i.e.:
```
for item in (item for item in seq if item > 5)
print item
... | First off, this question isn't related to dicts. You're operating on a sorted `list`. You're using the *results* on a dict, but that's not relevant to the question.
You want the `bisect` module, which implements binary searching. Starting from your code:
```
import bisect
mydict = {
"2001-01-01":"data1",
... |
22,270,204 | I'm making an **order information page**, and I would like to retrieve the image of product that customer order. Currently, in my page it can show the customer's product name, type price, etc. except the image. I've tried to retrieve the image but the code I use below is not working.. I really need your help to tell me... | 2014/03/08 | [
"https://Stackoverflow.com/questions/22270204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3384358/"
] | Try this.
**HTML**
```
<ul class="disInlineBlock">
<li class="reveal">Test<br />
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
</li>
</ul>
```
**CSS**
```
.disInlineBlock{display:inline-block;}
.disInline{display:inline;}
```
**Script**
```
$('.reveal').click(function() {
$(this)... | You can try something like
```
$('.reveal').click(function () {
var parent = $(this).parent('ul');
if (parent.css('display') === 'inline') {
parent.css('display', 'inline-block');
} else {
parent.css('display', 'inline');
}
$(this).children('ul').slideToggle();
});
``` |
111,791 | When I try to install Chromium or Firefox, the following error occurs:
```
$ sudo apt-get install chromium-browser
E: Package 'chromium-browser' has no installation candidate
$ sudo apt-get install firefox-mozilla-build
E: Unable to locate package firefox-mozilla-build
```
Info about the system
$ hostnamectl
```
S... | 2020/04/26 | [
"https://raspberrypi.stackexchange.com/questions/111791",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/81037/"
] | First, run the following command to update the repos and update your packages:
```
sudo apt update && sudo apt full-upgrade
```
To install chromium:
```
sudo apt install chromium
```
To install firefox:
```
sudo apt install firefox
``` | This works for me:
```
apt full-upgrade
apt-get install -y gconf-service libasound2 libatk1.0-0 libcairo2 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libxss1 fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils
wget http://ftp.us.debian.org/debian/pool/main/c/chromium/chrom... |
240,058 | For pde $$u\_t=x^2u\_{xx},\; x\in [0,\infty) ,\; t\in (0,T], \; u(0,x)=u\_0(x)$$ I can do change of variables as $y=ln(x)$ and arrive at another pde: $$v\_t=v\_{yy}-v\_y,\; y \in (-\infty, +\infty),\; t\in (0,T],\; v\_0(y)=u\_0(e^y)$$ I can show the existence and uniqueness of the transformed pde and therefore imply th... | 2012/11/18 | [
"https://math.stackexchange.com/questions/240058",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/27503/"
] | Since $u(x,t) = v(\log x, t)$ for all $x, \ t$ and $v$ is $C^\infty$ smooth on $\mathbb{R} \times (0,\infty)$, so is $u$ on $(0,\infty) \times (0, \infty)$. However, there might be some problems for $x = 0, \, t > 0$ (where you can't prescribe data) and very likely at $x = t = 0$. | When you apply separation of variables on the original equation,
Let $u(t,x)=T(t)X(x)$ ,
Then $T'(t)X(x)=x^2T(t)X''(x)$
$\dfrac{T'(t)}{T(t)}=\dfrac{x^2X''(x)}{X(x)}=-\dfrac{4s^2+1}{4}$
$\begin{cases}\dfrac{T'(t)}{T(t)}=-\dfrac{4s^2+1}{4}\\x^2X''(x)+\dfrac{4s^2+1}{4}X(x)=0\end{cases}$
$\begin{cases}T(t)=c\_3(s)e^{-... |
7,566,351 | I have a program and I have encountered some performance issues.
I want to be able to track how long it takes for every single function in my code to run.
please recommend me a tool that can do as stated.
EDIT:
are there any free/open source tools? | 2011/09/27 | [
"https://Stackoverflow.com/questions/7566351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/846351/"
] | Mercurial is python and python has good platform specific defaults for temporary file locations. They're pretty easily overridden if you want something other than the defaults, which on Windows are probably c:\temp.
<http://docs.python.org/library/tempfile.html#tempfile.tempdir> says it's:
1. The directory named by t... | Mercurial always stores internal files inside the ".hg" folder in the local repository folder.
Maybe TortoiseHg has a additional temp folder... don't know. Anyway you should try to push the files using the Mercurital command line client:
```
hg push
```
More information about the command line client you can find her... |
22,115,439 | How do I make a return type which is a subtype of all other types. I want the following
```
def foo(): (String => String) = TODO
def bar(): String = TODO
def baz(): Int = TODO
```
What type should `TODO` be? | 2014/03/01 | [
"https://Stackoverflow.com/questions/22115439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1253577/"
] | ~~"A subtype of all other types" in Scala is `Nothing`. You may do something like this:~~
~~`def foo(): (String => String) = TODO`~~
~~`def bar(): String = TODO`~~
~~`def baz(): Int = TODO`~~
~~`def TODO: Nothing = throw new UnsupportedOperationException("not implemented")`~~
**EDIT**:
OK, as OP accepted my answe... | `Nothing` is a subtype of every type, which has no habitants. It's the type of a `throw`, so simply implement tge method body by throwing
```
def todo(): Nothing = throw new NotYetException
``` |
53,736,990 | I need a query in SQL Server to combine tables like these:
**TBL1**
```
ID TITLE1
-----------
1 t1
2 t2
3 t3
```
**TBL2**
```
ID TITLE2
------------
100 c1
200 c2
```
Now I need tbl3 as a result:
**TBL3**
```
col1 col2
-----------
t1 c1
t1 c2
t2 c1
t2 c2
t3 c1
t3 c2
```
... | 2018/12/12 | [
"https://Stackoverflow.com/questions/53736990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6944843/"
] | You are looking for a cross join:
```
SELECT
t1.TITLE1 AS col1,
t2.TITLE2 AS col2
FROM TBL1 t1
CROSS JOIN TBL2 t2
ORDER BY
t1.TITLE1,
t2.TITLE2;
```
[](https://i.stack.imgur.com/PVZDq.png)
[Demo
----](https://dbfiddle.uk/?rdbms=sqls... | You can try this
```
CREATE TABLE #Table1
([ID] int, [TITLE1] varchar(2))
INSERT INTO #Table1
VALUES
(1, 't1'),
(2, 't2'),
(3, 't3')
CREATE TABLE #Table2
([ID] int, [TITLE2] varchar(2))
INSERT INTO #Table2
VALUES
(100, 'c1'),
(200, 'c2')
SELECT Title1 as col1, Title2 as col2
FROM #T... |
53,736,990 | I need a query in SQL Server to combine tables like these:
**TBL1**
```
ID TITLE1
-----------
1 t1
2 t2
3 t3
```
**TBL2**
```
ID TITLE2
------------
100 c1
200 c2
```
Now I need tbl3 as a result:
**TBL3**
```
col1 col2
-----------
t1 c1
t1 c2
t2 c1
t2 c2
t3 c1
t3 c2
```
... | 2018/12/12 | [
"https://Stackoverflow.com/questions/53736990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6944843/"
] | You are looking for a cross join:
```
SELECT
t1.TITLE1 AS col1,
t2.TITLE2 AS col2
FROM TBL1 t1
CROSS JOIN TBL2 t2
ORDER BY
t1.TITLE1,
t2.TITLE2;
```
[](https://i.stack.imgur.com/PVZDq.png)
[Demo
----](https://dbfiddle.uk/?rdbms=sqls... | CROSS JOIN will work for your case.
That is result-set contains the number of rows in the first table, multiplied by the number of rows in second table when there is no WHERE clause.
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/
SELECT
```
a.TITLE1 AS col1,
b.TITLE2 AS col2
```
FROM
```... |
3,185,975 | I have 2 IEnumerable collections.
```
IEnumerable<MyClass> objectsToExcept
```
and
```
IEnumerable<MyClass> allObjects.
```
`objectsToExcept` may contain objects from `allObjects`.
I need to remove from `allObjects` objects in `objectsToExcept`. For example:
```
foreach (var myClass in objectsToExcept)
{
allO... | 2010/07/06 | [
"https://Stackoverflow.com/questions/3185975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136188/"
] | I don't see how the first version would compile, and the second version won't do anything unless you use the result. It doesn't remove anything from the existing collection - indeed, there may not even *be* an in-memory collection backing it. It just returns a sequence which, when iterated over, will return the appropr... | Remove and Except do not modify the original IEnumerable. They return a new one. try
```
var result = allObject.Except(objectsToexcept);
``` |
3,185,975 | I have 2 IEnumerable collections.
```
IEnumerable<MyClass> objectsToExcept
```
and
```
IEnumerable<MyClass> allObjects.
```
`objectsToExcept` may contain objects from `allObjects`.
I need to remove from `allObjects` objects in `objectsToExcept`. For example:
```
foreach (var myClass in objectsToExcept)
{
allO... | 2010/07/06 | [
"https://Stackoverflow.com/questions/3185975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136188/"
] | I don't see how the first version would compile, and the second version won't do anything unless you use the result. It doesn't remove anything from the existing collection - indeed, there may not even *be* an in-memory collection backing it. It just returns a sequence which, when iterated over, will return the appropr... | There is no `Remove` method on `IEnumerable<T>`, because it is not meant to be modifiable.
The `Except` method doesn't modify the original collection: it returns a new collection that doesn't contain the excluded items:
```
var notExcluded = allObjects.Except(objectsToExcept);
```
See `Except` on [MSDN](https://msd... |
3,185,975 | I have 2 IEnumerable collections.
```
IEnumerable<MyClass> objectsToExcept
```
and
```
IEnumerable<MyClass> allObjects.
```
`objectsToExcept` may contain objects from `allObjects`.
I need to remove from `allObjects` objects in `objectsToExcept`. For example:
```
foreach (var myClass in objectsToExcept)
{
allO... | 2010/07/06 | [
"https://Stackoverflow.com/questions/3185975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136188/"
] | I don't see how the first version would compile, and the second version won't do anything unless you use the result. It doesn't remove anything from the existing collection - indeed, there may not even *be* an in-memory collection backing it. It just returns a sequence which, when iterated over, will return the appropr... | While the other answers are correct, I have to add that the result of the `Except()` call can be assigned back to the original variable. That is,
```
allObjects = allObjects.Except(objectsToExcept);
```
Also keep in mind that `Except()` will produce the set difference of the two collections, so if there are duplicat... |
3,185,975 | I have 2 IEnumerable collections.
```
IEnumerable<MyClass> objectsToExcept
```
and
```
IEnumerable<MyClass> allObjects.
```
`objectsToExcept` may contain objects from `allObjects`.
I need to remove from `allObjects` objects in `objectsToExcept`. For example:
```
foreach (var myClass in objectsToExcept)
{
allO... | 2010/07/06 | [
"https://Stackoverflow.com/questions/3185975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136188/"
] | There is no `Remove` method on `IEnumerable<T>`, because it is not meant to be modifiable.
The `Except` method doesn't modify the original collection: it returns a new collection that doesn't contain the excluded items:
```
var notExcluded = allObjects.Except(objectsToExcept);
```
See `Except` on [MSDN](https://msd... | Remove and Except do not modify the original IEnumerable. They return a new one. try
```
var result = allObject.Except(objectsToexcept);
``` |
3,185,975 | I have 2 IEnumerable collections.
```
IEnumerable<MyClass> objectsToExcept
```
and
```
IEnumerable<MyClass> allObjects.
```
`objectsToExcept` may contain objects from `allObjects`.
I need to remove from `allObjects` objects in `objectsToExcept`. For example:
```
foreach (var myClass in objectsToExcept)
{
allO... | 2010/07/06 | [
"https://Stackoverflow.com/questions/3185975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136188/"
] | Remove and Except do not modify the original IEnumerable. They return a new one. try
```
var result = allObject.Except(objectsToexcept);
``` | While the other answers are correct, I have to add that the result of the `Except()` call can be assigned back to the original variable. That is,
```
allObjects = allObjects.Except(objectsToExcept);
```
Also keep in mind that `Except()` will produce the set difference of the two collections, so if there are duplicat... |
3,185,975 | I have 2 IEnumerable collections.
```
IEnumerable<MyClass> objectsToExcept
```
and
```
IEnumerable<MyClass> allObjects.
```
`objectsToExcept` may contain objects from `allObjects`.
I need to remove from `allObjects` objects in `objectsToExcept`. For example:
```
foreach (var myClass in objectsToExcept)
{
allO... | 2010/07/06 | [
"https://Stackoverflow.com/questions/3185975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136188/"
] | There is no `Remove` method on `IEnumerable<T>`, because it is not meant to be modifiable.
The `Except` method doesn't modify the original collection: it returns a new collection that doesn't contain the excluded items:
```
var notExcluded = allObjects.Except(objectsToExcept);
```
See `Except` on [MSDN](https://msd... | While the other answers are correct, I have to add that the result of the `Except()` call can be assigned back to the original variable. That is,
```
allObjects = allObjects.Except(objectsToExcept);
```
Also keep in mind that `Except()` will produce the set difference of the two collections, so if there are duplicat... |
27,437 | I am writing a paper on the implementation of QKD in the future. I want to know if there are any viable attacks on the BB84 protocol or QKD in general? I know of the Photon Number Splitting attack or spectroscopy in the case of diode manufacturing but I have heard that there are already solutions for those. Are there a... | 2015/08/12 | [
"https://crypto.stackexchange.com/questions/27437",
"https://crypto.stackexchange.com",
"https://crypto.stackexchange.com/users/26104/"
] | The Attack you mentioned ([PNS](https://en.wikipedia.org/wiki/Quantum_key_distribution#Photon_number_splitting_attack)) is a "hardware attack" it depends on how you physically distribute the qubits.
The only "protocol attack" (known for the BB84) is the "[intercept & resend](https://en.wikipedia.org/wiki/Quantum_key_d... | The attacks mentioned in that [other answer](https://crypto.stackexchange.com/a/70227/555) are theoretical, and relatively easily dealt with. There is report of another, the [Phase Remapping attack](https://arxiv.org/abs/1005.2376) (which flies high over my head).
But practical adversaries think outside of the box and... |
44,808,502 | I have a data set containing two columns:
```
Quantity SKU
1,1 2494008,2493953
1,1,1 2167550,1336380,2365409
3,2,1,6,1 1428608,1137956,2401393,2679310,2579183
```
End state is a data set that looks like this:
```
Quantity SKU
1 2494008
1 2493953
1 2167550
1 ... | 2017/06/28 | [
"https://Stackoverflow.com/questions/44808502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7636976/"
] | With `separate_rows` from `tidyr`:
```
df <- read.table(text="Quantity SKU
1,1 2494008,2493953
1,1,1 2167550,1336380,2365409
3,2,1,6,1 1428608,1137956,2401393,2679310,2579183",header=TRUE,stringsAsFactors=FALSE)
library(tidyr)
df %>% separate_rows(Quantity,SKU)
Quantity SKU
<chr> <c... | ```
dat <- read.table(text="Quantity SKU
1,1 2494008,2493953
1,1,1 2167550,1336380,2365409
3,2,1,6,1 1428608,1137956,2401393,2679310,2579183", header=TRUE, stringsAsFactors=FALSE)
dat2<-data.frame(Quantity = unlist(strsplit(dat$Quantity, split=",")),
SKU=unlist(strsplit(dat$SKU, split="... |
44,808,502 | I have a data set containing two columns:
```
Quantity SKU
1,1 2494008,2493953
1,1,1 2167550,1336380,2365409
3,2,1,6,1 1428608,1137956,2401393,2679310,2579183
```
End state is a data set that looks like this:
```
Quantity SKU
1 2494008
1 2493953
1 2167550
1 ... | 2017/06/28 | [
"https://Stackoverflow.com/questions/44808502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7636976/"
] | With `separate_rows` from `tidyr`:
```
df <- read.table(text="Quantity SKU
1,1 2494008,2493953
1,1,1 2167550,1336380,2365409
3,2,1,6,1 1428608,1137956,2401393,2679310,2579183",header=TRUE,stringsAsFactors=FALSE)
library(tidyr)
df %>% separate_rows(Quantity,SKU)
Quantity SKU
<chr> <c... | Unsurprisingly, the `data.table` solution is quite similar to the base R solution proposed [by lmo](https://stackoverflow.com/questions/44808502/split-multiple-comma-separated-column-into-separate-rows#comment76598421_44808628):
```
library(data.table)
data.table(dat)[, lapply(.SD, function(x) unlist(strsplit(x, ","))... |
7,840,051 | I have problem with this query:
```
SELECT Ordre.Objet, Count(Ordre.Objet) AS CompteDeObjet
FROM Ordre INNER JOIN Avis ON Ordre.[Ordre SAP] = Avis.[Ordre SAP]
GROUP BY Ordre.Objet, Avis.[Date Appel], Ordre.Objet
HAVING (((Avis.[Date Appel])>#8/1/2011# And (Avis.[Date Appel])<#10/20/2011#) AND ((Ordre.Objet) Is Not Nul... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7840051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1005521/"
] | The query will give one row / count per item you GROUP BY.
You are grouping on:
```
GROUP BY Ordre.Objet, Avis.[Date Appel], Ordre.Objet
```
So, you will get one cound for each Objet / Date Appel combination | Try moving what is in the `HAVING` clause to the `WHERE` clause. `HAVING` filters on grouped items, it may be stopping the query from counting the items properly. |
7,840,051 | I have problem with this query:
```
SELECT Ordre.Objet, Count(Ordre.Objet) AS CompteDeObjet
FROM Ordre INNER JOIN Avis ON Ordre.[Ordre SAP] = Avis.[Ordre SAP]
GROUP BY Ordre.Objet, Avis.[Date Appel], Ordre.Objet
HAVING (((Avis.[Date Appel])>#8/1/2011# And (Avis.[Date Appel])<#10/20/2011#) AND ((Ordre.Objet) Is Not Nul... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7840051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1005521/"
] | The query will give one row / count per item you GROUP BY.
You are grouping on:
```
GROUP BY Ordre.Objet, Avis.[Date Appel], Ordre.Objet
```
So, you will get one cound for each Objet / Date Appel combination | Ok, so I figured out what my problem was:
I have way more Ordres than I have Avis and not all avis have an ordre attached. My query somehow only counts the objects that have an Avis attached to it (because of the JOIN clause?)
so while testing, I just randomly placed lots of different values to random record in the or... |
1,987 | Okey, this is going to be quite a specific question about something that has come up.
I am a school student, and I sent various emails to the developers of the school management software that my school uses.
I was questioning them about the possibilities of API access into the data, besides the unofficial API whi... | 2015/08/23 | [
"https://law.stackexchange.com/questions/1987",
"https://law.stackexchange.com",
"https://law.stackexchange.com/users/1136/"
] | From the sound of it, you have stated that you gained access to school data, possibly including private information about other students, professors, schedules, grades, disciplinary information, financial tuition or salary info, etc., that you were not authorized to have. The question of whether it was properly secured... | Almost certainly.
The relationship of a student to a school is governed by specific laws and, in the case of a private school, a contract. These will impose obligations on the student to comply with whatever rules are applicable and, in general, to not take actions that are not in the school's interest.
If a school ... |
31,854,753 | The below method fails when Execting ToListAsync() with the following error
```
The cast to value type 'System.Int64' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type.
```
--
```
private IQueryable<MaterialSearchResult> MaterialSearchQ... | 2015/08/06 | [
"https://Stackoverflow.com/questions/31854753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/177694/"
] | Try to rewrite your query:
```
return from m in this.context.GB_Material
from v in this.context.WF_VideoVersion
.Where(
v =>
v.MaterialID == m.MaterialID)
.DefaultIfEmpty()
... | For some insane reason i had written the select statement like this:
```
select new MaterialSearchResult
{
MaterialId = v.MaterialID,
MaterialName = v.GB_Material.MaterialName,
MaterialTitle = v.GB_Material.Materi... |
2,410,864 | I am writing a generic Http resource hosting service and am storing larger objects as BLOBs in an Oracle database. I want to be able to set the 'Content-Length' header when returning a stored object, which means I need to know the size of the BLOB before I start writing it to the client (I know I could use chunked-enco... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2410864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/68612/"
] | Because our BLOBS compress well in general, we have taken this approach:-
* store the BLOB compressed. The compression is done on the java side as we stream into the BLOB
* record the uncompressed size in bytes in another column in the same table
* uncompress via a stream as we send the BLOB out again, knowing what th... | Since I don't see any answers yet..
I have not personally measured anything, but our DBA recommended storing their size (I know, it's just that HE told me so). He is pretty good though, so I personally believe storing the size is the way to go -- at least if it's performance critical (we would have had to call .lengt... |
2,410,864 | I am writing a generic Http resource hosting service and am storing larger objects as BLOBs in an Oracle database. I want to be able to set the 'Content-Length' header when returning a stored object, which means I need to know the size of the BLOB before I start writing it to the client (I know I could use chunked-enco... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2410864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/68612/"
] | I did a quick check selecting a BLOB from a table and then a LENGTH(BLOB) and DBMS\_LOB.GETLENGTH(BLOB).
When selecting the BLOB itself, I got 44 consistent gets. When I selected the length (by either method) I got 7 consistent gets.
Based on that, when I get the length, it does not retrieve the entire blob and calcu... | Since I don't see any answers yet..
I have not personally measured anything, but our DBA recommended storing their size (I know, it's just that HE told me so). He is pretty good though, so I personally believe storing the size is the way to go -- at least if it's performance critical (we would have had to call .lengt... |
2,410,864 | I am writing a generic Http resource hosting service and am storing larger objects as BLOBs in an Oracle database. I want to be able to set the 'Content-Length' header when returning a stored object, which means I need to know the size of the BLOB before I start writing it to the client (I know I could use chunked-enco... | 2010/03/09 | [
"https://Stackoverflow.com/questions/2410864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/68612/"
] | I did a quick check selecting a BLOB from a table and then a LENGTH(BLOB) and DBMS\_LOB.GETLENGTH(BLOB).
When selecting the BLOB itself, I got 44 consistent gets. When I selected the length (by either method) I got 7 consistent gets.
Based on that, when I get the length, it does not retrieve the entire blob and calcu... | Because our BLOBS compress well in general, we have taken this approach:-
* store the BLOB compressed. The compression is done on the java side as we stream into the BLOB
* record the uncompressed size in bytes in another column in the same table
* uncompress via a stream as we send the BLOB out again, knowing what th... |
680,431 | Is there any way to change the value of a DOM textNode in web browser?
I specifically want to see if I can **change** the existing node, rather than **creating** a new one.
To clarify, I need to do this with Javascript. All text in the browser is stored in #textNodes which are children of other HTML nodes, but cannot... | 2009/03/25 | [
"https://Stackoverflow.com/questions/680431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4465/"
] | If you have a specific node (of type #text) and want to change its value you can use the [nodeValue](https://developer.mozilla.org/En/DOM/Node.nodeValue) property:
```
node.nodeValue="new value";
```
Note:
innerText (and ~~possibly~~ textContent) will return/set both the current node and all descendent nodes text, ... | I believe innerHTML is used for this... Then again, that isn't W3C approved... but it works...
```
node.innerHTML="new value";
``` |
51,723,323 | I'm struggling with a div that underlapps its siblings what breaks the usability.
I'd like to achieve that the content of `#container` starts directly under `header` and that the content gets scrollable immediately when hitting `footer` instead of underlapping `footer`. (To reproduce just add some tasks)
---
For the... | 2018/08/07 | [
"https://Stackoverflow.com/questions/51723323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9304377/"
] | To find the first non-null result of a given getter of the objects in a collection, you could utilize streams, method references, and optionals, while avoiding reflection entirely.
```
public static <T, R> Optional<R> findFirstNonNull(Collection<T> objects,
Function<T... | you can access annotations at runtime. By marking the method that you want to use with reflection with an annotation it's possible to get all methods and then run the one with an annotation.
Here is a good example of that: [java-seek-a-method-with-specific-annotation-and-its-annotation-element](https://stackoverflow.c... |
51,723,323 | I'm struggling with a div that underlapps its siblings what breaks the usability.
I'd like to achieve that the content of `#container` starts directly under `header` and that the content gets scrollable immediately when hitting `footer` instead of underlapping `footer`. (To reproduce just add some tasks)
---
For the... | 2018/08/07 | [
"https://Stackoverflow.com/questions/51723323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9304377/"
] | To find the first non-null result of a given getter of the objects in a collection, you could utilize streams, method references, and optionals, while avoiding reflection entirely.
```
public static <T, R> Optional<R> findFirstNonNull(Collection<T> objects,
Function<T... | Another possibility is to create an enum with accessor to each attribute, for example:
```
public enum StudentAttribute {
NAME,
ADDRESS,
ROLLNUMBER,
;
public Object get(Student s) {
switch(this) {
case NAME: return s.getName();
case ADDRESS: return s.getAddress();
... |
24,549,409 | My testbench uses a function that is defined in a modelsim package (init\_signal\_spy). So I can't use this testbench with a different simulator than ModelSims vsim, for example Candence's ncsim. But there is an equivalent function for ncsim (nc\_mirror) in the cadence packages. The solution is that I need to have two ... | 2014/07/03 | [
"https://Stackoverflow.com/questions/24549409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2013672/"
] | The general way to make proprietary functions from different vendors appear the same in a test bench, is to use a wrapper package that converts the functions to a function interface that you define.
To support both ModelSim and NCSim, you create three files:
* wrap.vhd
* wrap\_modelsim.vhd
* wrap\_ncsim.vhd
The `pac... | We developed a small package for this very purpose few years back. I just now uploaded a copy of the same @ <http://verifnews.org/publications/papers/>
Thanks Jim for keeping us updated on this thread.
Srini, Ajeetha |
24,549,409 | My testbench uses a function that is defined in a modelsim package (init\_signal\_spy). So I can't use this testbench with a different simulator than ModelSims vsim, for example Candence's ncsim. But there is an equivalent function for ncsim (nc\_mirror) in the cadence packages. The solution is that I need to have two ... | 2014/07/03 | [
"https://Stackoverflow.com/questions/24549409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2013672/"
] | The general way to make proprietary functions from different vendors appear the same in a test bench, is to use a wrapper package that converts the functions to a function interface that you define.
To support both ModelSim and NCSim, you create three files:
* wrap.vhd
* wrap\_modelsim.vhd
* wrap\_ncsim.vhd
The `pac... | There is also a solution described using a general **Systemverilog bind** which is tool independent. That will help you to avoid the use of proprietary **init\_signal\_spy**!! See the good paper from Dave Rich explaining how to use BIND in UVM
<http://events.dvcon.org/2012/proceedings/papers/01P_3.pdf>
If you are not ... |
24,549,409 | My testbench uses a function that is defined in a modelsim package (init\_signal\_spy). So I can't use this testbench with a different simulator than ModelSims vsim, for example Candence's ncsim. But there is an equivalent function for ncsim (nc\_mirror) in the cadence packages. The solution is that I need to have two ... | 2014/07/03 | [
"https://Stackoverflow.com/questions/24549409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2013672/"
] | We developed a small package for this very purpose few years back. I just now uploaded a copy of the same @ <http://verifnews.org/publications/papers/>
Thanks Jim for keeping us updated on this thread.
Srini, Ajeetha | There is also a solution described using a general **Systemverilog bind** which is tool independent. That will help you to avoid the use of proprietary **init\_signal\_spy**!! See the good paper from Dave Rich explaining how to use BIND in UVM
<http://events.dvcon.org/2012/proceedings/papers/01P_3.pdf>
If you are not ... |
67,232,654 | I want to create `UIPickerView`, where users can select hour and minute. This picker has two components - hours and minutes.
But the user may have busy slots. For example, it's a 14:15 with a duration of 45 minutes.
So, I want to delete this range from picker - from 14:15 by 15:00. How to create it?
UPD: I want to cr... | 2021/04/23 | [
"https://Stackoverflow.com/questions/67232654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10941929/"
] | Note that [doing math with floating point numbers can be inaccurate](https://stackoverflow.com/q/588004/8376184), so verifying them (which requires an **exact** value) might not work well.
**So, you can multiply your number, so that it's an integer**, to avoid precision issues and then you can even use your solution o... | ### In a Geometric Progression the "nth" term is equal to `a * r ** (n-1)`
>
> `a` First Term
>
>
> `n-1` nth term in 0 index
>
>
> `r` Common Ratio
>
>
>
You can simply check if the array element obeys the expression mentioned above.
```js
const validateSeq = (seq) => {
const
ratio = (seq[1] || seq[0... |
23,786,319 | I am using Firefox 29 and WebDriver java 2.41.0 bindings to automate test scenarios. Have one scenario to input an integer to a input-box which was working FINE with Firefox 28 and now failing with v29 i.e latest FF version. The code I wrote for the same is:
```
int inputString = 123456;
driver.FindElement(By.Id("tiny... | 2014/05/21 | [
"https://Stackoverflow.com/questions/23786319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2427729/"
] | This will be the result of this issue:
<https://code.google.com/p/selenium/issues/detail?id=7291>
Fixed by this revision in the Selenium code:
<https://code.google.com/p/selenium/source/detail?r=afde40cbbf5c> | Can you check following points
* Can you make sure there are no application changes, I mean the locator is returning single node element.
* Can you also post the exception that you are getting. To troubleshoot this problem, need these details. |
23,786,319 | I am using Firefox 29 and WebDriver java 2.41.0 bindings to automate test scenarios. Have one scenario to input an integer to a input-box which was working FINE with Firefox 28 and now failing with v29 i.e latest FF version. The code I wrote for the same is:
```
int inputString = 123456;
driver.FindElement(By.Id("tiny... | 2014/05/21 | [
"https://Stackoverflow.com/questions/23786319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2427729/"
] | Quick test below worked for me. I understand JS is not the right way to do browser simulation, one should always FIRST use webdriver methods since they use browsers native api, but thought it would unblock you while the bug is fixed in selenium
```
DesiredCapabilities desiredCapabilities = DesiredCapabilities.firefox... | Can you check following points
* Can you make sure there are no application changes, I mean the locator is returning single node element.
* Can you also post the exception that you are getting. To troubleshoot this problem, need these details. |
23,786,319 | I am using Firefox 29 and WebDriver java 2.41.0 bindings to automate test scenarios. Have one scenario to input an integer to a input-box which was working FINE with Firefox 28 and now failing with v29 i.e latest FF version. The code I wrote for the same is:
```
int inputString = 123456;
driver.FindElement(By.Id("tiny... | 2014/05/21 | [
"https://Stackoverflow.com/questions/23786319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2427729/"
] | This will be the result of this issue:
<https://code.google.com/p/selenium/issues/detail?id=7291>
Fixed by this revision in the Selenium code:
<https://code.google.com/p/selenium/source/detail?r=afde40cbbf5c> | One thing I do before sending a value to a box is to clear it, also, the value I send is always a string, the parsing should be done by the page/code as you need to validate what the user has entered.
But I do agree with skv, we need to see the actual error being thrown. |
23,786,319 | I am using Firefox 29 and WebDriver java 2.41.0 bindings to automate test scenarios. Have one scenario to input an integer to a input-box which was working FINE with Firefox 28 and now failing with v29 i.e latest FF version. The code I wrote for the same is:
```
int inputString = 123456;
driver.FindElement(By.Id("tiny... | 2014/05/21 | [
"https://Stackoverflow.com/questions/23786319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2427729/"
] | Quick test below worked for me. I understand JS is not the right way to do browser simulation, one should always FIRST use webdriver methods since they use browsers native api, but thought it would unblock you while the bug is fixed in selenium
```
DesiredCapabilities desiredCapabilities = DesiredCapabilities.firefox... | One thing I do before sending a value to a box is to clear it, also, the value I send is always a string, the parsing should be done by the page/code as you need to validate what the user has entered.
But I do agree with skv, we need to see the actual error being thrown. |
23,786,319 | I am using Firefox 29 and WebDriver java 2.41.0 bindings to automate test scenarios. Have one scenario to input an integer to a input-box which was working FINE with Firefox 28 and now failing with v29 i.e latest FF version. The code I wrote for the same is:
```
int inputString = 123456;
driver.FindElement(By.Id("tiny... | 2014/05/21 | [
"https://Stackoverflow.com/questions/23786319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2427729/"
] | This will be the result of this issue:
<https://code.google.com/p/selenium/issues/detail?id=7291>
Fixed by this revision in the Selenium code:
<https://code.google.com/p/selenium/source/detail?r=afde40cbbf5c> | Quick test below worked for me. I understand JS is not the right way to do browser simulation, one should always FIRST use webdriver methods since they use browsers native api, but thought it would unblock you while the bug is fixed in selenium
```
DesiredCapabilities desiredCapabilities = DesiredCapabilities.firefox... |
1,931,888 | Is this series convergent or divergent?
$$\sum ((2n+1)e^{-1/n}-(2n-1)) $$
I tried to apply the comparison test, but I did not get very far. | 2016/09/18 | [
"https://math.stackexchange.com/questions/1931888",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/370114/"
] | Hint:
1. The slope of the line joining $(2,h)$ and $(4,9)$ is $\frac{9-h}{4-2}.$
2. If two lines are parallel, they share the same slope.
3. If a line has non-zero gradient, $m$, then line perpendicular to it has gradient $\frac{-1}{m}$. | The slope of the line joining $(2,h)$ and $(4,9)$ is:
$$
m=\frac{9-h}{4-2}=\frac{9-h}{2}
$$
and two lines are parallel if they have the same slope and are orthogonal if their slopes are such that their product is $-1$
So, in your case:
$\frac{9-h}{2}=3$ for parallel lines and $\frac{9-h}{2}=-\frac{1}{3}$ for orthog... |
7,194,317 | I have a very short (so far), very basic XML file called config.xml like
```
<?xml version='1.0' encoding='UTF-8' ?>
<name_of_program3>
<path_to_exe3>script.pl</path_to_exe3>
<path_to_perl>/usr/bin/perl</path_to_perl>
<temp_output_file>temp.txt</temp_output_file>
</name_of_program3>
```
I am trying to re... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7194317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/224912/"
] | The root node shouldn't be used (all xml documents must have a root node, so it's presence is assumed/required), try:
```
$config->path_to_perl
```
instead. | You should read without name\_of\_program3 because the one is root.
Try to use
$exe = $config->path\_to\_exe3 |
25,035,938 | I need to write a .htaccess file to rewrite all urls which have anyting after the domain.
For example `RewriteRule ^(.*)$ index.php?page=course&course=$1 [L]`
But this sends `example.com` to that rewritten url as well, and I don't want that. I want it to rewrtire it ONLY if these is really something after the domain,... | 2014/07/30 | [
"https://Stackoverflow.com/questions/25035938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1902011/"
] | You can use `.+` instead of `.*` to make sure it doesn't match landing page. You will also need `RewriteCond %{REQUEST_FILENAME} !-f` condition to avoid matching default landing page:
```
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?page=course&course=$1 [L]
``` | Add regex condition: `RewriteCond %{REQUEST_FILENAME} REGEX`
In your case: `RewriteCond %{REQUEST_FILENAME} [A-Z]`
This will check if it contains any character or not.
Along with not a file check: `RewriteCond %{REQUEST_FILENAME} !-f` |
33,594,088 | I recently made a class in PHP
I am trying to declare a variable within class and using str\_replace in a function but its show undefined variable
```
class Status{
$words = array(".com",".net",".co.uk",".tk","co.cc");
$replace = " ";
function getRoomName($roomlink)
{
echo str_replace($words,$replace,$... | 2015/11/08 | [
"https://Stackoverflow.com/questions/33594088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5539213/"
] | Your variables in the function `getRoomname()` aren't adressed properly. Your syntax assumes the variables are either declared within the function or passed while calling the function (which they aren't).
To do this within a class, do it while using `$this->`, like this:
```
function getRoomName($roomlink)
{
echo... | *Maybe because of the version or something, when I tested your exact code, I got `syntax error, unexpected '$words' (T_VARIABLE), expecting function (T_FUNCTION)`, so setting your variables to `private` or `public` should fix this one.*
About the `undefined varible`, you have to use `$this->` to access them from your ... |
36,213,125 | I have the following code that highlights a cell when the user makes changes.
```
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
int selectedRow = e.RowIndex;
int selectedCol = e.ColumnIndex;
if (selectedRow >= 0 && selectedCol >=0 )
{... | 2016/03/25 | [
"https://Stackoverflow.com/questions/36213125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6112206/"
] | In your example code, the statement `int blah = 1;` both declares the variable and assigns to it. Visual Studio counts this assignment as a "reference" of the variable, thus avoiding the [C4101 unreferenced local variable](https://msdn.microsoft.com/en-us/library/c733d5h9.aspx) error that you are expecting.
*To locat... | As Ryan Bemrose outlined, static code analysis tools can be used to detect unused resources from source code.
Take a look at following function:
```
bool foo(int unusedParameter)
{
int unusedVariable = 1;
return true;
}
```
It contains two unused resources, an unused parameter and and unused but initialized loc... |
92 | The [French Stack Exchange site](https://french.stackexchange.com/) has a nice tag *anglais* to mark questions that refer to the English language (such as “how do you translate this English phrase?”). It also has other tags for German, Italian etc.
I think this is something people might want to follow. For example, a ... | 2016/09/21 | [
"https://esperanto.meta.stackexchange.com/questions/92",
"https://esperanto.meta.stackexchange.com",
"https://esperanto.meta.stackexchange.com/users/13/"
] | There is no need for a tag, in this case. As long as the language is specified in the title, the search engine is able to find all the questions referring a language in the title. For example, I can find all the questions containing [*Esperanto*](https://esperanto.stackexchange.com/search?q=is%3Aq%20Esperanto) in the t... | I like this idea. Such tags can add useful information to questions.
Let's see how such a tag (say, [german](https://esperanto.stackexchange.com/questions/tagged/german "show questions tagged 'german'")) would fare w.r.t. [the criteria for burnination](https://meta.stackoverflow.com/a/324071/674064):
>
> 1. Does it ... |
638,456 | $$\frac{\partial U}{\partial t}=\alpha \frac{\partial^2 U}{\partial x^2}+\beta U$$
I have been given this partial differential equation and am asked to find an application for it. I can see that the partial terms correspond to the heat diffusion equation but I am having trouble understanding what the last term on the ... | 2021/05/23 | [
"https://physics.stackexchange.com/questions/638456",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/300291/"
] | The last term on the right corresponds to heat transfer through [Newton's Law of cooling](https://en.wikipedia.org/wiki/Newton%27s_law_of_cooling), typically a convective term. As reviewed in a [recent answer](https://physics.stackexchange.com/a/638040/146039), $\alpha$ is the [thermal diffusivity](https://en.wikipedia... | This equation is simply a 1D diffusion equation including damping! beta describes the spatial "spread", whereas "alpha" (< 0) is an exponential damping factor. You can solve this equation with Fourier transformation. Application is for instance heat conductivity in a "lossy" piece of metal, or spatiotemporal propagatio... |
638,456 | $$\frac{\partial U}{\partial t}=\alpha \frac{\partial^2 U}{\partial x^2}+\beta U$$
I have been given this partial differential equation and am asked to find an application for it. I can see that the partial terms correspond to the heat diffusion equation but I am having trouble understanding what the last term on the ... | 2021/05/23 | [
"https://physics.stackexchange.com/questions/638456",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/300291/"
] | The last term on the right corresponds to heat transfer through [Newton's Law of cooling](https://en.wikipedia.org/wiki/Newton%27s_law_of_cooling), typically a convective term. As reviewed in a [recent answer](https://physics.stackexchange.com/a/638040/146039), $\alpha$ is the [thermal diffusivity](https://en.wikipedia... | The $\alpha$ would typically represent thermal diffusivity (dispersion of heat along the rod), and, in typical applications, $\beta$ would be negative and associated with cooling rate per unit length of the rod (in proportion to the temperature difference with the surroundings). This might be the equation for transient... |
638,456 | $$\frac{\partial U}{\partial t}=\alpha \frac{\partial^2 U}{\partial x^2}+\beta U$$
I have been given this partial differential equation and am asked to find an application for it. I can see that the partial terms correspond to the heat diffusion equation but I am having trouble understanding what the last term on the ... | 2021/05/23 | [
"https://physics.stackexchange.com/questions/638456",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/300291/"
] | The last term on the right corresponds to heat transfer through [Newton's Law of cooling](https://en.wikipedia.org/wiki/Newton%27s_law_of_cooling), typically a convective term. As reviewed in a [recent answer](https://physics.stackexchange.com/a/638040/146039), $\alpha$ is the [thermal diffusivity](https://en.wikipedia... | Another way to study this problem is to note that if we define $V(x,t) = e^{-\beta t}U(x,t) \iff U(x,t) = e^{\beta t} V(x,t)$, then the differential equation reduces to the standard diffusion equation for $V$. Therefore, the solutions to your equation are solutions to the standard diffusion equation, multiplied by an e... |
17,726,874 | I've written a bash script that makes a series of R scripts. However, Ive run into difficulty quoting a bash variable to echo to the R script as a file to be read into R. I have
```
echo "loadings_file <- $loadings ; calls_file <- $file" | cat - template.R > temp && mv temp $scriptname
```
$loadings and $file are fi... | 2013/07/18 | [
"https://Stackoverflow.com/questions/17726874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1410309/"
] | ```
echo "loadings_file <- '$loadings' ; calls_file <- '$file'"
```
If you specifically need double quoting:
```
echo "loadings_file <- \"$loadings\" ; calls_file <- \"$file\""
``` | You have to escape your quotes (`\"`) around the variables:
```
echo "loadings_file <- \"$loadings\" ; calls_file <- \"$file\"" | cat - template.R > temp && mv temp $scriptname
``` |
105,147 | Sorry if my title is a little vague, I wasn't entirely certain how to word this specific question.
I'm developing a small little MMORTS game, and in this game is the world map which consists of thousands of tiles (the view on the client is an isometric grid). The world map data is stored in a MySQL database table. Thi... | 2015/08/05 | [
"https://gamedev.stackexchange.com/questions/105147",
"https://gamedev.stackexchange.com",
"https://gamedev.stackexchange.com/users/69510/"
] | This should be similar to all movement in that it can be described by location, a point, and velocity, a vector. It is reasonable to assume that the flight takes a predetermined amount of time in seconds or ticks. You can calculate the velocity based on the distance and time of flight. Unfortunately this exchange does ... | Using these variables
```
float elapsedTime
float totalFlightTime
float incrementTime
int numTiles
```
ElapsedTime is the current position in time and should be advanced with delta time every frame.
TotalFlightTime is the total amount of time the flight should take.
NumTiles is the total number of tiles needed to ... |
105,147 | Sorry if my title is a little vague, I wasn't entirely certain how to word this specific question.
I'm developing a small little MMORTS game, and in this game is the world map which consists of thousands of tiles (the view on the client is an isometric grid). The world map data is stored in a MySQL database table. Thi... | 2015/08/05 | [
"https://gamedev.stackexchange.com/questions/105147",
"https://gamedev.stackexchange.com",
"https://gamedev.stackexchange.com/users/69510/"
] | This should be similar to all movement in that it can be described by location, a point, and velocity, a vector. It is reasonable to assume that the flight takes a predetermined amount of time in seconds or ticks. You can calculate the velocity based on the distance and time of flight. Unfortunately this exchange does ... | One cheaty way to do this (means the planes would not be able to be shot down etc.) is to simple store the time the plane started its journey, start and end points. You can then draw this on the client side by simply drawing a line from start point to end point and calculating how far along this line the plane should b... |
2,227,444 | How do I create a mutator method that adds two numbers but if the added number that is entered is negative, it will display an error message and not change the first number. Suggestions please.
```
public void restock(int newStockQuantity)
{
if(newStockQuantity < 0)
{
stockQ = stockQ;
... | 2010/02/09 | [
"https://Stackoverflow.com/questions/2227444",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268415/"
] | Well, for one thing you don't need the
```
stockQ = stockQ;
```
statement - that doesn't do anything.
Next is the problem of having multiple blocks in the "if" statement. If you *did* want to keep the no-op assignment, you could change your method to:
```
public void restock(int newStockQuantity)
{
if(newStock... | IMHO the best approach is the exception. Another point is to output the offending value, so a user of the method knows what the error is about. It also reveals errors in your check ;). Third point is to check for invariants first, bailing out with an exception or some appliable return-statement.
```
public void restoc... |
11,669,604 | I'm thinking of writing a web-app in clojure that can update itself without restarting or loosing state.
I've seen some articles where Clojure apps can perform so-called hot-swapping of code. Meaning that they can update their own functions at runtime. Would this be safe to perform on a web-server? | 2012/07/26 | [
"https://Stackoverflow.com/questions/11669604",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/636967/"
] | To get hot-swap for code is tricky to get right, if possible at all.
It depends on the changeset and the running application too.
Issues:
* old vars may litter namespaces and cause subtle conflicts, bugs
* redefinition of multiple vars is not atomic
There may be old vars in a namespace that will not be there if you... | OTP applications in Erlang support this. Basically, it will spin the new version of your application up and start sending requests to the new version of your application. It will keep the old version alive until it has completed processing requests and then shut it down. |
69,914 | I want to make a back up of my raspberry pi because I have done a lot of work and repeating the process would take a lot of time. How does one go about making an image of a Raspberry Pi SD card for the following operating systems:
* Windows
* Linux
* macOS
A step by step guide would be very helpful! | 2017/07/17 | [
"https://raspberrypi.stackexchange.com/questions/69914",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/69910/"
] | I recently had to make a backup image for my `Raspberry Pi 3 Model B` and found an incredibly helpful guide from [Beebom](https://web.archive.org/web/20170119125519/http://beebom.com/).
The guide outlines the process for **cloning** and **restoring** a Pi SD image for all three operating systems. (Windows - Linux - Ma... | There exists a backup tool for Raspberries called [raspiBackup](https://www.linux-tips-and-tricks.de/en/backup). If you restore this backup on a different SD card you're actually cloning your Raspberry. |
69,914 | I want to make a back up of my raspberry pi because I have done a lot of work and repeating the process would take a lot of time. How does one go about making an image of a Raspberry Pi SD card for the following operating systems:
* Windows
* Linux
* macOS
A step by step guide would be very helpful! | 2017/07/17 | [
"https://raspberrypi.stackexchange.com/questions/69914",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/69910/"
] | On Linux or OSX I use `dd` to make a backup from SD card. Reverse `if` and `of` (i.e. to where they point - source and destination) afterwards to restore, but be careful not to restore to a wrong disk. It will be destroyed without a warning!!!
First use `fdisk` to get the device id of you SD card (check the size)
``... | There exists a backup tool for Raspberries called [raspiBackup](https://www.linux-tips-and-tricks.de/en/backup). If you restore this backup on a different SD card you're actually cloning your Raspberry. |
24,209,621 | On one of my websites, [www.makememodern.com](http://www.makememodern.com), there is a section (What We Do) that displays numbers that rapidly increase until they reach a defined number. I am wanting to place the "%" with the larger orange numbers, but it results with "NAN".
Here is what I found in the Shortcode.php f... | 2014/06/13 | [
"https://Stackoverflow.com/questions/24209621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3551887/"
] | Basically you have an array and inner array is at its 0 index so you can get them this way:
```
$.each(data,function(index,item){
$.each(item,function(index1,item1){
console.log(item1);
});
});
```
[**FIDDLE EXAMPLE**](http://jsfiddle.net/ehsansajjad465/56LgY/)
or:
```
$.each(data[0].toppings,function(ind... | Assuming `toppingres` is the full object represented by the JSON, `toppingres[0]` isn't an array, so it has no `length`.
You mean to say:
```
var toppings = toppingres[0].toppings;
for ( var k = 0; k < toppings.length; ++k )
{
var topping = toppings[k];
}
``` |
24,209,621 | On one of my websites, [www.makememodern.com](http://www.makememodern.com), there is a section (What We Do) that displays numbers that rapidly increase until they reach a defined number. I am wanting to place the "%" with the larger orange numbers, but it results with "NAN".
Here is what I found in the Shortcode.php f... | 2014/06/13 | [
"https://Stackoverflow.com/questions/24209621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3551887/"
] | Basically you have an array and inner array is at its 0 index so you can get them this way:
```
$.each(data,function(index,item){
$.each(item,function(index1,item1){
console.log(item1);
});
});
```
[**FIDDLE EXAMPLE**](http://jsfiddle.net/ehsansajjad465/56LgY/)
or:
```
$.each(data[0].toppings,function(ind... | ```
var data=[
{
"toppings": [
"Honey with Chocolate Sauce 10 ML",
"Honey with Carmel 10 ML"
]
}
];
// prevents duplicated object
$.each(data,function(index,item){
console.log(item);
});
``` |
24,209,621 | On one of my websites, [www.makememodern.com](http://www.makememodern.com), there is a section (What We Do) that displays numbers that rapidly increase until they reach a defined number. I am wanting to place the "%" with the larger orange numbers, but it results with "NAN".
Here is what I found in the Shortcode.php f... | 2014/06/13 | [
"https://Stackoverflow.com/questions/24209621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3551887/"
] | Basically you have an array and inner array is at its 0 index so you can get them this way:
```
$.each(data,function(index,item){
$.each(item,function(index1,item1){
console.log(item1);
});
});
```
[**FIDDLE EXAMPLE**](http://jsfiddle.net/ehsansajjad465/56LgY/)
or:
```
$.each(data[0].toppings,function(ind... | Fiddle: <http://jsfiddle.net/GWM7b/>
and code:
`var myJSON = [{ "toppings": [
"Honey with Chocolate Sauce 10 ML",
"Honey with Carmel 10 ML"
]}];
for (var i = 0; i < myJSON[0].toppings.length; i++){
alert(myJSON[0].toppings[i]);
}` |
28,934,014 | I'm trying to do some basic things by getting an Android device's camera stream with getUserMedia. To my understanding, this should be supported on Android Lollipop, which I'm running, but even with permissions set to allow video and audio my request for a media stream is automatically denied.
So I tried using Crosswa... | 2015/03/09 | [
"https://Stackoverflow.com/questions/28934014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1008741/"
] | Make sure that you have RECORD\_AUDIO and CAMERA permissions in platforms/android/AndroidManifest.xml:
```
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
```
Cordova takes care about necessary permissions for Cordova API and adds them i... | The problem was fixed by the <https://github.com/MobileChromeApps/cordova-plugin-chrome-apps-audioCapture>
```
$ cordova plugin add cordova-plugin-chrome-apps-audiocapture --save
$ cordova build
$ cordova run android
```
Now the microphone stream can be processed with the `audioContext.createScriptProcessor`.
ps. ... |
28,934,014 | I'm trying to do some basic things by getting an Android device's camera stream with getUserMedia. To my understanding, this should be supported on Android Lollipop, which I'm running, but even with permissions set to allow video and audio my request for a media stream is automatically denied.
So I tried using Crosswa... | 2015/03/09 | [
"https://Stackoverflow.com/questions/28934014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1008741/"
] | Make sure that you have RECORD\_AUDIO and CAMERA permissions in platforms/android/AndroidManifest.xml:
```
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
```
Cordova takes care about necessary permissions for Cordova API and adds them i... | The accepted answer definitely would have worked prior to the changes to Android permissions. You are now able to request usage of native functions at the time of use (which honestly makes more sense than on launch) so I highly recommend using the [Android Permissions plugin](https://www.npmjs.com/package/cordova-plugi... |
28,934,014 | I'm trying to do some basic things by getting an Android device's camera stream with getUserMedia. To my understanding, this should be supported on Android Lollipop, which I'm running, but even with permissions set to allow video and audio my request for a media stream is automatically denied.
So I tried using Crosswa... | 2015/03/09 | [
"https://Stackoverflow.com/questions/28934014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1008741/"
] | The accepted answer definitely would have worked prior to the changes to Android permissions. You are now able to request usage of native functions at the time of use (which honestly makes more sense than on launch) so I highly recommend using the [Android Permissions plugin](https://www.npmjs.com/package/cordova-plugi... | The problem was fixed by the <https://github.com/MobileChromeApps/cordova-plugin-chrome-apps-audioCapture>
```
$ cordova plugin add cordova-plugin-chrome-apps-audiocapture --save
$ cordova build
$ cordova run android
```
Now the microphone stream can be processed with the `audioContext.createScriptProcessor`.
ps. ... |
42,026,091 | I'm trying to write a simple code so that I can get files from a FTP server. My code is shown below, but I even cannot connect to that server (the code shown below has no errors). I've searched a lot and tried others codes, with no success. Is there any problem with my code? Any help will be appreciated.
```
#include ... | 2017/02/03 | [
"https://Stackoverflow.com/questions/42026091",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7415624/"
] | When you create a Row object, the fields are sorted alphabetically (<http://spark.apache.org/docs/2.0.1/api/python/pyspark.sql.html#pyspark.sql.Row>), so when you are creating the `Row(description, date, item_id)` object, it will be ordered as `(date, description, item_id)`.
As your schema is ordered as `StringType, ... | Basing this off of the answer above from @rafael-zanetti. You can do the following to sort your columns:
```
new_schema = [StructField("item_id", StringType(), True),
StructField("date", TimestampType(), True),
StructField("description", StringType(), True)]
new_schema = Struc... |
2,523,232 | I have few buttons on my jsp page and I am using the style as :
```
*.buttonblue {
background-color: #003366;
border-color: #99CCFF;
color: #FFFFFF;
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
font-weight: bold;
height: 20px;
display:inline;
line-height: 1.2;
text-ali... | 2010/03/26 | [
"https://Stackoverflow.com/questions/2523232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/299873/"
] | [IE has a bug with button padding](http://www.brownbatterystudios.com/sixthings/2006/05/12/an-even-better-ie-button-width-fix/), you may be experiencing this. Try something like this:
```
input.button {
padding: 0 .25em;
width: 0; /* IE table-cell margin fix */
overflow: visible;
}
input.button[class] { ... | A button is rendered however the browser decides. You will need to use an image and set it up to work like a button if you want it to look that same in all browsers. |
2,523,232 | I have few buttons on my jsp page and I am using the style as :
```
*.buttonblue {
background-color: #003366;
border-color: #99CCFF;
color: #FFFFFF;
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
font-weight: bold;
height: 20px;
display:inline;
line-height: 1.2;
text-ali... | 2010/03/26 | [
"https://Stackoverflow.com/questions/2523232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/299873/"
] | [IE has a bug with button padding](http://www.brownbatterystudios.com/sixthings/2006/05/12/an-even-better-ie-button-width-fix/), you may be experiencing this. Try something like this:
```
input.button {
padding: 0 .25em;
width: 0; /* IE table-cell margin fix */
overflow: visible;
}
input.button[class] { ... | Either use [Conditional Comments](http://www.quirksmode.org/css/condcom.html) :
Ex:
```
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
```
Or set custom width for input only read by IE like this :
```
.buttonblue {
background-color: #003366;
border-color: #99CCFF;
color: #FFFFFF;
font-fami... |
2,523,232 | I have few buttons on my jsp page and I am using the style as :
```
*.buttonblue {
background-color: #003366;
border-color: #99CCFF;
color: #FFFFFF;
font-family: Verdana,Arial,Helvetica;
font-size: 8pt;
font-weight: bold;
height: 20px;
display:inline;
line-height: 1.2;
text-ali... | 2010/03/26 | [
"https://Stackoverflow.com/questions/2523232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/299873/"
] | Either use [Conditional Comments](http://www.quirksmode.org/css/condcom.html) :
Ex:
```
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
```
Or set custom width for input only read by IE like this :
```
.buttonblue {
background-color: #003366;
border-color: #99CCFF;
color: #FFFFFF;
font-fami... | A button is rendered however the browser decides. You will need to use an image and set it up to work like a button if you want it to look that same in all browsers. |
28,498,581 | Have a ajax request sending data to a WordPress action which works fine however I can receive the nonce value perfectly but the email input isn't being sent. I know I'm targeting the right value. It does not want to get the value of the email input. If I hardcode a value into the input it will see it. I need to get the... | 2015/02/13 | [
"https://Stackoverflow.com/questions/28498581",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3872744/"
] | The problem you have is that you don't fully understand how the IO is working here;
When you do `with X...` what is actually happening under the hood is python calls the `__enter__` method of the object, and then when the scope is left (i.e. the indent level of the `with` statement), it calls the `__exit__` object of ... | I would go with a different logic :-)
1. Since ss.csv have only the brand names, load it as a list in the memory
2. Inititalize a output list(empty at the beginning) that will have the `row` objects in your code. These are the rows which do not have any match in the ss.csv
3. whenever a match is found, create a csv fi... |
2,140,501 | I would like to have some kind of project-wide fail fast mechanism (maybe a `RuntimeException`) for any code that causes assignment of `NaN`.
In my project `NaN` is never a valid value.
I realise I could add asserts (using [isNaN](http://java.sun.com/javase/6/docs/api/java/lang/Double.html#isNaN())) or other tests th... | 2010/01/26 | [
"https://Stackoverflow.com/questions/2140501",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2352432/"
] | Yes, you can use AspectJ (aspect oriented programming) to throw an error whenever a value is set to NaN.
Essentially, you want to intercept whenever a value is set, and perform some other function.
We've done similar things in our codebase ... but I can't give you much help outside of that. | No - because `NaN` IS a valid value, using it won't cause any exceptions to be thrown. Without any ubiquitous monitoring mechanisms to use, you would have to test explicitly at the points where it might be assigned or returned from a method. |
2,140,501 | I would like to have some kind of project-wide fail fast mechanism (maybe a `RuntimeException`) for any code that causes assignment of `NaN`.
In my project `NaN` is never a valid value.
I realise I could add asserts (using [isNaN](http://java.sun.com/javase/6/docs/api/java/lang/Double.html#isNaN())) or other tests th... | 2010/01/26 | [
"https://Stackoverflow.com/questions/2140501",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2352432/"
] | Yes, you can use AspectJ (aspect oriented programming) to throw an error whenever a value is set to NaN.
Essentially, you want to intercept whenever a value is set, and perform some other function.
We've done similar things in our codebase ... but I can't give you much help outside of that. | If you ready to sacrifice the performance of the application, you can create a wrapper for Double (or other numeric object you want to use) and throw exception when `NaN` is set. |
2,140,501 | I would like to have some kind of project-wide fail fast mechanism (maybe a `RuntimeException`) for any code that causes assignment of `NaN`.
In my project `NaN` is never a valid value.
I realise I could add asserts (using [isNaN](http://java.sun.com/javase/6/docs/api/java/lang/Double.html#isNaN())) or other tests th... | 2010/01/26 | [
"https://Stackoverflow.com/questions/2140501",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2352432/"
] | Yes, you can use AspectJ (aspect oriented programming) to throw an error whenever a value is set to NaN.
Essentially, you want to intercept whenever a value is set, and perform some other function.
We've done similar things in our codebase ... but I can't give you much help outside of that. | Technically, it would be possible to create an agent to do this by [instrumenting](http://java.sun.com/javase/6/docs/api/java/lang/instrument/package-summary.html) the code in question to inject *assert* or *if* tests automatically. This would involve a bit of bytecode inspection and transformation (e.g. using *ASM*). ... |
2,140,501 | I would like to have some kind of project-wide fail fast mechanism (maybe a `RuntimeException`) for any code that causes assignment of `NaN`.
In my project `NaN` is never a valid value.
I realise I could add asserts (using [isNaN](http://java.sun.com/javase/6/docs/api/java/lang/Double.html#isNaN())) or other tests th... | 2010/01/26 | [
"https://Stackoverflow.com/questions/2140501",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2352432/"
] | Yes, you can use AspectJ (aspect oriented programming) to throw an error whenever a value is set to NaN.
Essentially, you want to intercept whenever a value is set, and perform some other function.
We've done similar things in our codebase ... but I can't give you much help outside of that. | Just another approach - you could integrate code checkers like [PMD](http://pmd.sourceforge.net/) into your build process and create a rule that reports every assignment of `Double.NaN`.
It will not be perfect, because it can't catch NaN's you get from the outside (database, connections) or that someone creates throu... |
3,066,889 | So in a bluetooth piconet, there is one master with upto seven slaves. The master sets the clock and frequency hop that the slaves sync with. But is there a way to determine which device is the master and which is the slave? I'm mainly interested in portable devices (Android,iPhone) but beggars can't be choosers, if an... | 2010/06/18 | [
"https://Stackoverflow.com/questions/3066889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/178447/"
] | I don't think it's possible to do it programatically.The master/slave roles which a device assumes is invisible to the user(application).The same device can act as a master of one piconet and a slave in an (adjacent) piconet.What needs to be decided in your application is whether the device will act as a client or a se... | It depends on the platform you are using.
It should be possible to read the information associated with a connected device and the role of the device should ideally be part of that information in the API.
So if the connected device is Primary you can infer that you are secondary and so on.
-Dennis |
54,132,154 | I want to style just the first level of `li`, it looks like a child combinator should work, but as the demo below shows every `li` is red. I would expect only the first level (not nested) `li` to be styled red.
What am I doing wrong?
```css
.list > li {
color: red;
border: 1px solid orange;
list-style: none;... | 2019/01/10 | [
"https://Stackoverflow.com/questions/54132154",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488172/"
] | The `ul` selector matches the `<ul>` on line 1 of your code **and** the `<ul>` on line 5 of your code.
[](https://i.stack.imgur.com/TNPnF.png)
You'd need something more specific to make `ul` match only the one on line 1 (e.g. `:not(li) > ul > li`) ... | Your selector will style *"Any `<li>` element that is a direct child of a `<ul>` element"*, which stands true for *all* of your `<li>` elements.
You could override all inner `<ul>` elements by doing `ul ul > li` and setting them back to black instead.
```css
ul > li { color: red; }
ul ul > li { color: black; }
```
... |
54,132,154 | I want to style just the first level of `li`, it looks like a child combinator should work, but as the demo below shows every `li` is red. I would expect only the first level (not nested) `li` to be styled red.
What am I doing wrong?
```css
.list > li {
color: red;
border: 1px solid orange;
list-style: none;... | 2019/01/10 | [
"https://Stackoverflow.com/questions/54132154",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488172/"
] | The `ul` selector matches the `<ul>` on line 1 of your code **and** the `<ul>` on line 5 of your code.
[](https://i.stack.imgur.com/TNPnF.png)
You'd need something more specific to make `ul` match only the one on line 1 (e.g. `:not(li) > ul > li`) ... | ```css
#outer-list > li {
color: red;
}
#inner-list > li {
color: black;
}
```
```html
<ul id="outer-list">
<li>1st level</li>
<li>1st level</li>
<li>1st level
<ul id="inner-list">
<li>2nd level</li>
<li>2nd level</li>
<li>2nd level</li>
<li>2nd leve... |
54,132,154 | I want to style just the first level of `li`, it looks like a child combinator should work, but as the demo below shows every `li` is red. I would expect only the first level (not nested) `li` to be styled red.
What am I doing wrong?
```css
.list > li {
color: red;
border: 1px solid orange;
list-style: none;... | 2019/01/10 | [
"https://Stackoverflow.com/questions/54132154",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488172/"
] | Your selector will style *"Any `<li>` element that is a direct child of a `<ul>` element"*, which stands true for *all* of your `<li>` elements.
You could override all inner `<ul>` elements by doing `ul ul > li` and setting them back to black instead.
```css
ul > li { color: red; }
ul ul > li { color: black; }
```
... | ```css
#outer-list > li {
color: red;
}
#inner-list > li {
color: black;
}
```
```html
<ul id="outer-list">
<li>1st level</li>
<li>1st level</li>
<li>1st level
<ul id="inner-list">
<li>2nd level</li>
<li>2nd level</li>
<li>2nd level</li>
<li>2nd leve... |
41,064 | I am currently in the writing of an online LaTeX tutorial and I was wondering if it was possible to have something similar to [learnpython.org](http://www.learnpython.org/) but for compiling and editing on the fly simple LaTeX documents on a page? Because I would love to embed this on my website so that readers could i... | 2012/01/14 | [
"https://tex.stackexchange.com/questions/41064",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10789/"
] | You could look into the [Common LaTeX Service Interface](https://github.com/jpallen/clsi) which powers ScribTeX and, I believe, LaTeX Lab. The CLSI exposes TeX compilers as a web service by accepting requests with document code, compiling the documents in a sandboxed environment and returning the PDF results.
For disp... | You could use [ScribTeX](http://www.scribtex.com) which runs a TeX Live 2009 distribution (at the moment). It allows you to create files (for, say, storing `.bib` content) and even compile using `pdflatex`, `latex` or `xelatex`. In fact, your document compiled without problem.
It does not require a login, but temporar... |
41,064 | I am currently in the writing of an online LaTeX tutorial and I was wondering if it was possible to have something similar to [learnpython.org](http://www.learnpython.org/) but for compiling and editing on the fly simple LaTeX documents on a page? Because I would love to embed this on my website so that readers could i... | 2012/01/14 | [
"https://tex.stackexchange.com/questions/41064",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10789/"
] | You could use [ScribTeX](http://www.scribtex.com) which runs a TeX Live 2009 distribution (at the moment). It allows you to create files (for, say, storing `.bib` content) and even compile using `pdflatex`, `latex` or `xelatex`. In fact, your document compiled without problem.
It does not require a login, but temporar... | The site <https://learnlatex.org> is a tutorial being developed which works exactly as you describe. Each example may be run using an online service (Currently using <https://latexcgi.xyz>)
with the results being shown inline in the page (using PDF.js, so as to not require a built in PDF reader in the browser). |
41,064 | I am currently in the writing of an online LaTeX tutorial and I was wondering if it was possible to have something similar to [learnpython.org](http://www.learnpython.org/) but for compiling and editing on the fly simple LaTeX documents on a page? Because I would love to embed this on my website so that readers could i... | 2012/01/14 | [
"https://tex.stackexchange.com/questions/41064",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10789/"
] | You could look into the [Common LaTeX Service Interface](https://github.com/jpallen/clsi) which powers ScribTeX and, I believe, LaTeX Lab. The CLSI exposes TeX compilers as a web service by accepting requests with document code, compiling the documents in a sandboxed environment and returning the PDF results.
For disp... | It is definitively possible, as shown by the (German language) [Kochbuch für LaTeX](http://www.uni-giessen.de/hrz/tex/cookbook/cookbook.html) ("cookbook for LaTeX"). It has a very nice interface where you can choose to generate an image, a dvi file or a postscript file). Currently it doesn't seem to work correctly (I'm... |
41,064 | I am currently in the writing of an online LaTeX tutorial and I was wondering if it was possible to have something similar to [learnpython.org](http://www.learnpython.org/) but for compiling and editing on the fly simple LaTeX documents on a page? Because I would love to embed this on my website so that readers could i... | 2012/01/14 | [
"https://tex.stackexchange.com/questions/41064",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10789/"
] | It is definitively possible, as shown by the (German language) [Kochbuch für LaTeX](http://www.uni-giessen.de/hrz/tex/cookbook/cookbook.html) ("cookbook for LaTeX"). It has a very nice interface where you can choose to generate an image, a dvi file or a postscript file). Currently it doesn't seem to work correctly (I'm... | The site <https://learnlatex.org> is a tutorial being developed which works exactly as you describe. Each example may be run using an online service (Currently using <https://latexcgi.xyz>)
with the results being shown inline in the page (using PDF.js, so as to not require a built in PDF reader in the browser). |
41,064 | I am currently in the writing of an online LaTeX tutorial and I was wondering if it was possible to have something similar to [learnpython.org](http://www.learnpython.org/) but for compiling and editing on the fly simple LaTeX documents on a page? Because I would love to embed this on my website so that readers could i... | 2012/01/14 | [
"https://tex.stackexchange.com/questions/41064",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10789/"
] | You could look into the [Common LaTeX Service Interface](https://github.com/jpallen/clsi) which powers ScribTeX and, I believe, LaTeX Lab. The CLSI exposes TeX compilers as a web service by accepting requests with document code, compiling the documents in a sandboxed environment and returning the PDF results.
For disp... | The site <https://learnlatex.org> is a tutorial being developed which works exactly as you describe. Each example may be run using an online service (Currently using <https://latexcgi.xyz>)
with the results being shown inline in the page (using PDF.js, so as to not require a built in PDF reader in the browser). |
980,088 | I'm using KDE 4.14. on Fedora 20 (sorry, it's not my choice).
Now, when I use `Alt`+`Tab`, I get the task switcher. Keeping the `Alt` down, I can select a task using `Tab` keypresses to scroll right. But coming from Windows, I'm used to beingl able to use both `Tab` and `Shift`+`Tab` in this state to scroll left and r... | 2015/09/30 | [
"https://superuser.com/questions/980088",
"https://superuser.com",
"https://superuser.com/users/122798/"
] | Most laptop power bricks work with a wide range of voltages (most say Input:100~240v), read the label on your laptop power brick, look at "input" section The travel adapter is nothing more than a gender changer for the wall socket. If your power brick has this input variable voltage then you are safe to use the adapter... | I don't think there is a right or wrong answer here.
If you moved to that country, it would be best to purchase the correct AC adapter for your laptop. This lessens the chances of using the wrong connection and damaging your equipment.
If you choose to continue using the travel adapter, as long as it is providing t... |
980,088 | I'm using KDE 4.14. on Fedora 20 (sorry, it's not my choice).
Now, when I use `Alt`+`Tab`, I get the task switcher. Keeping the `Alt` down, I can select a task using `Tab` keypresses to scroll right. But coming from Windows, I'm used to beingl able to use both `Tab` and `Shift`+`Tab` in this state to scroll left and r... | 2015/09/30 | [
"https://superuser.com/questions/980088",
"https://superuser.com",
"https://superuser.com/users/122798/"
] | The power adapter of the laptop has a label on it: in that label it's printed the lower and upper AC voltage to which the power adapter can be safely connected (110VAC to 240VAC, also for the AC frequency, usually 50 and 60 Hz).
Unless you plug the cord in the wrong outlet, you should be "safe" with a travel adapter. ... | I don't think there is a right or wrong answer here.
If you moved to that country, it would be best to purchase the correct AC adapter for your laptop. This lessens the chances of using the wrong connection and damaging your equipment.
If you choose to continue using the travel adapter, as long as it is providing t... |
980,088 | I'm using KDE 4.14. on Fedora 20 (sorry, it's not my choice).
Now, when I use `Alt`+`Tab`, I get the task switcher. Keeping the `Alt` down, I can select a task using `Tab` keypresses to scroll right. But coming from Windows, I'm used to beingl able to use both `Tab` and `Shift`+`Tab` in this state to scroll left and r... | 2015/09/30 | [
"https://superuser.com/questions/980088",
"https://superuser.com",
"https://superuser.com/users/122798/"
] | Most laptop power bricks work with a wide range of voltages (most say Input:100~240v), read the label on your laptop power brick, look at "input" section The travel adapter is nothing more than a gender changer for the wall socket. If your power brick has this input variable voltage then you are safe to use the adapter... | The power adapter of the laptop has a label on it: in that label it's printed the lower and upper AC voltage to which the power adapter can be safely connected (110VAC to 240VAC, also for the AC frequency, usually 50 and 60 Hz).
Unless you plug the cord in the wrong outlet, you should be "safe" with a travel adapter. ... |
53,419,791 | I have the following table :
```
tCustomerOrder
-IdOrder
-IdCustomer
-OrderDate
```
I want a query to get a table with :
```
-Idcustomer
-LastOrder_date
-LastOrder_Id
-LastOrder_period ''ie elasped time between the two last orders
-NextOrder_Date ''estimated date e... | 2018/11/21 | [
"https://Stackoverflow.com/questions/53419791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8121246/"
] | You need to use a collection to store your students! The most simple is an array:
```
Student[] students = new Student[100];
```
This will create an array for maximum 100 Students. One problem with this is that it cannot be resized, so if you add more then 100, new arrays need to be created, and copied which is not... | You will need to create an array list of Student objects. You could add an unlimited number of Student objects to the array list.
I played around with it a bit, and I figured out how to add objects to the ArrayList. Here is an example of how you could do this:
```
import java.io.BufferedReader;
import java.io.IOExc... |
2,793,953 | so I have this big method in my application for newsletter distribution. Method is for updating rayons and I need to assign a user to rayon. I have relation n:n through table `colporteur_in_rayons` which has attributes `since_date` and `until_date`.
I am a junior programmer and I know this code is pretty dummy :)
I ... | 2010/05/08 | [
"https://Stackoverflow.com/questions/2793953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328110/"
] | ```
def update
rayon = Rayon.find(params[:id])
unless rayon.update_attributes(params[:rayon])
flash[:error] = "Rayon not updated."
return redirect_to :back
end
puid = params[:user_id]
empty = rayon.users.empty?
if puid == "" or (not empty and rayon.users.last.id.eql?(puid))
... | Here's my take at it. I put a bunch of comments inline describing why I changed what I did.
```
def update
rayon = Rayon.find(params[:id])
if rayon.update_attributes(params[:rayon])
user_id = params[:user_id] # using same value a couple times
# if-else strongly preferred over unless-else...
... |
2,793,953 | so I have this big method in my application for newsletter distribution. Method is for updating rayons and I need to assign a user to rayon. I have relation n:n through table `colporteur_in_rayons` which has attributes `since_date` and `until_date`.
I am a junior programmer and I know this code is pretty dummy :)
I ... | 2010/05/08 | [
"https://Stackoverflow.com/questions/2793953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328110/"
] | there was a some double code. So remove that. But also, there is some business code in the controller, which should not be there. So i should refactor the controller code as follows:
```
def update
rayon = Rayon.find(params[:id])
if rayon.update_attributes(params[:rayon])
if params[:user_id] != ""
rayo... | Here's my take at it. I put a bunch of comments inline describing why I changed what I did.
```
def update
rayon = Rayon.find(params[:id])
if rayon.update_attributes(params[:rayon])
user_id = params[:user_id] # using same value a couple times
# if-else strongly preferred over unless-else...
... |
2,793,953 | so I have this big method in my application for newsletter distribution. Method is for updating rayons and I need to assign a user to rayon. I have relation n:n through table `colporteur_in_rayons` which has attributes `since_date` and `until_date`.
I am a junior programmer and I know this code is pretty dummy :)
I ... | 2010/05/08 | [
"https://Stackoverflow.com/questions/2793953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328110/"
] | ```
def update
rayon = Rayon.find(params[:id])
unless rayon.update_attributes(params[:rayon])
flash[:error] = "Rayon not updated."
return redirect_to :back
end
puid = params[:user_id]
empty = rayon.users.empty?
if puid == "" or (not empty and rayon.users.last.id.eql?(puid))
... | ```
def update
rayon = Rayon.find(params[:id])
unless rayon.update_attributes(params[:rayon])
flash[:error] = "Rayon has not been updated."
return redirect_to :back
end
if params[:user_id].empty?
msg = "Rayon has been successfully updated."
else
if rayon.users.empty?
Rayon.assign_user(... |
2,793,953 | so I have this big method in my application for newsletter distribution. Method is for updating rayons and I need to assign a user to rayon. I have relation n:n through table `colporteur_in_rayons` which has attributes `since_date` and `until_date`.
I am a junior programmer and I know this code is pretty dummy :)
I ... | 2010/05/08 | [
"https://Stackoverflow.com/questions/2793953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328110/"
] | there was a some double code. So remove that. But also, there is some business code in the controller, which should not be there. So i should refactor the controller code as follows:
```
def update
rayon = Rayon.find(params[:id])
if rayon.update_attributes(params[:rayon])
if params[:user_id] != ""
rayo... | ```
def update
rayon = Rayon.find(params[:id])
unless rayon.update_attributes(params[:rayon])
flash[:error] = "Rayon has not been updated."
return redirect_to :back
end
if params[:user_id].empty?
msg = "Rayon has been successfully updated."
else
if rayon.users.empty?
Rayon.assign_user(... |
2,793,953 | so I have this big method in my application for newsletter distribution. Method is for updating rayons and I need to assign a user to rayon. I have relation n:n through table `colporteur_in_rayons` which has attributes `since_date` and `until_date`.
I am a junior programmer and I know this code is pretty dummy :)
I ... | 2010/05/08 | [
"https://Stackoverflow.com/questions/2793953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328110/"
] | ```
def update
rayon = Rayon.find(params[:id])
unless rayon.update_attributes(params[:rayon])
flash[:error] = "Rayon not updated."
return redirect_to :back
end
puid = params[:user_id]
empty = rayon.users.empty?
if puid == "" or (not empty and rayon.users.last.id.eql?(puid))
... | there was a some double code. So remove that. But also, there is some business code in the controller, which should not be there. So i should refactor the controller code as follows:
```
def update
rayon = Rayon.find(params[:id])
if rayon.update_attributes(params[:rayon])
if params[:user_id] != ""
rayo... |
54,729,386 | I have 2 classes: A (which needs 1 argument to initialize) and B (which needs 2 arguments to initialize), and a third class C which derives from both A and B.
```
class A:
def __init__(self, sval):
print("A: rcd value: ", sval)
self.aval = sval
class B:
def __init__(self, sval, tval):
... | 2019/02/17 | [
"https://Stackoverflow.com/questions/54729386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3522130/"
] | Frankly, I think you've got the most elegant solution for what you are trying to do. | You already using an optimized code. But you can optimize it little bit more for showing error message. Like below:
```
$invalidFieldName = '';
$invalidFieldLength = 100;
if (strlen($cname) > 100) {
$invalidFieldName = 'CNAME';
} elseif (strlen($cowner) > 100) {
$invalidFieldName = 'COWNER';
} elseif (strlen($... |
54,729,386 | I have 2 classes: A (which needs 1 argument to initialize) and B (which needs 2 arguments to initialize), and a third class C which derives from both A and B.
```
class A:
def __init__(self, sval):
print("A: rcd value: ", sval)
self.aval = sval
class B:
def __init__(self, sval, tval):
... | 2019/02/17 | [
"https://Stackoverflow.com/questions/54729386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3522130/"
] | Frankly, I think you've got the most elegant solution for what you are trying to do. | You can use a loop to reduce the number of lines. Here is an optimized solution even when you have more 10 fields to check:
**Declare an array of fields and loop through it**
```
$fields = array("cname" => 100, "cowner" => 100, "cemail" => 200, "cpassword" => 100); // key as field name and value as maximum limit - ne... |
54,729,386 | I have 2 classes: A (which needs 1 argument to initialize) and B (which needs 2 arguments to initialize), and a third class C which derives from both A and B.
```
class A:
def __init__(self, sval):
print("A: rcd value: ", sval)
self.aval = sval
class B:
def __init__(self, sval, tval):
... | 2019/02/17 | [
"https://Stackoverflow.com/questions/54729386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3522130/"
] | You can use a loop to reduce the number of lines. Here is an optimized solution even when you have more 10 fields to check:
**Declare an array of fields and loop through it**
```
$fields = array("cname" => 100, "cowner" => 100, "cemail" => 200, "cpassword" => 100); // key as field name and value as maximum limit - ne... | You already using an optimized code. But you can optimize it little bit more for showing error message. Like below:
```
$invalidFieldName = '';
$invalidFieldLength = 100;
if (strlen($cname) > 100) {
$invalidFieldName = 'CNAME';
} elseif (strlen($cowner) > 100) {
$invalidFieldName = 'COWNER';
} elseif (strlen($... |
607,930 | I'm creating procedures to deploy a Cisco ASA and an ESXi machine to remote locations where no local tech contacts are available.
I think it may be a wise idea to connect the console cable from the ASA to the ESXi machine to assist in local & remote configuration.
Is this a good idea, and how should I use ESXi to in... | 2014/06/25 | [
"https://serverfault.com/questions/607930",
"https://serverfault.com",
"https://serverfault.com/users/51457/"
] | If you're trying to configure the ASA from the ESXi host (or a guest), how exactly do you propose to get into the ESXi host or guest? I'm assuming that the ASA is the gateway for the server. So if the ASA is down/not configured properly, you won't be getting into the server, either. The opener is in the box, sorry to s... | The (only?) possible answer to this conundrum is: Get a USB->Serial adaptor, and pass it through to a guest VM, and use your terminal emulator on the VM.
If you end up "on site" and need to talk to the ASA, you can then just unplug the USB dongle and plug it into your laptop.
Whether this will actually be useful depe... |
70,503,938 | Want to seperate a list data into two parts based on condition. If the value is less than "H1000", we want in a first dataframe(Output for list 1) and if it is greater or equal to "H1000" we want in a second dataframe(Output for list2). First column starts the value with H followed by a four numbers.
Here is my python... | 2021/12/28 | [
"https://Stackoverflow.com/questions/70503938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17538713/"
] | I think this is what you want
```
$('form').submit(function(e){
e.preventDefault();
var value = $(this).data('test');
alertForm(value);
});
function alertForm(fromForm){
alert(fromForm);
}
``` | What you are trying to do is to get data-test attirbute value and us it in your **alertForm** Function. You can use a variable to having a greater scop to get this value from the handler of the the submit function but it is not clean. The best way is to get the value directly from the dom as follow.
```
function a... |
48,527,906 | I have a JavaScript challenge in freecodecamp that is probably really simple, but I still don't understand how to do it. It goes as follows:
```
// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
switch(val) {
case "alpha":
result = "Adams";
break;
case "bravo":
... | 2018/01/30 | [
"https://Stackoverflow.com/questions/48527906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9280876/"
] | You will want to covert the switch statement into an object:
```
lookup = {
alpha: 'Adams',
bravo: 'Boston',
charlie: 'Chicago',
delta: 'Denver',
echo: 'Easy',
foxtrot: 'Frank'
};
```
Now that you have an object with keys and values you can get a values by using the key like this:
>
> loo... | I don't want to steal the fun for you but I'm pretty sure they're eluding to this behavior of objects in javaScript
If I define an object like so:
```
var myObject = {
one: "1",
two: "2"
};
```
Then I can access the values by its index or key:
```
var firstVal = myObject["one"]
// firstVal is "1"
```
Hopef... |
48,527,906 | I have a JavaScript challenge in freecodecamp that is probably really simple, but I still don't understand how to do it. It goes as follows:
```
// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
switch(val) {
case "alpha":
result = "Adams";
break;
case "bravo":
... | 2018/01/30 | [
"https://Stackoverflow.com/questions/48527906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9280876/"
] | You will want to covert the switch statement into an object:
```
lookup = {
alpha: 'Adams',
bravo: 'Boston',
charlie: 'Chicago',
delta: 'Denver',
echo: 'Easy',
foxtrot: 'Frank'
};
```
Now that you have an object with keys and values you can get a values by using the key like this:
>
> loo... | I've looked at the code challenge and although it looks pretty obvious it's quite easy to miss. First you convert the switch statement to an object lookup like this:
```
var lookup = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo": "Easy",
"foxtrot": "Fran... |
48,527,906 | I have a JavaScript challenge in freecodecamp that is probably really simple, but I still don't understand how to do it. It goes as follows:
```
// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
switch(val) {
case "alpha":
result = "Adams";
break;
case "bravo":
... | 2018/01/30 | [
"https://Stackoverflow.com/questions/48527906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9280876/"
] | You will want to covert the switch statement into an object:
```
lookup = {
alpha: 'Adams',
bravo: 'Boston',
charlie: 'Chicago',
delta: 'Denver',
echo: 'Easy',
foxtrot: 'Frank'
};
```
Now that you have an object with keys and values you can get a values by using the key like this:
>
> loo... | this is the only way to get it without modifying the return statement:
// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
var lookup = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo": "Easy",
"foxtrot": "Frank",
};
return look... |
48,527,906 | I have a JavaScript challenge in freecodecamp that is probably really simple, but I still don't understand how to do it. It goes as follows:
```
// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
switch(val) {
case "alpha":
result = "Adams";
break;
case "bravo":
... | 2018/01/30 | [
"https://Stackoverflow.com/questions/48527906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9280876/"
] | You will want to covert the switch statement into an object:
```
lookup = {
alpha: 'Adams',
bravo: 'Boston',
charlie: 'Chicago',
delta: 'Denver',
echo: 'Easy',
foxtrot: 'Frank'
};
```
Now that you have an object with keys and values you can get a values by using the key like this:
>
> loo... | ```js
function phoneticLookup(val) {
let result = "";
const lookup = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo": "Easy",
"foxtrot": "Frank"
}
result = lookup[val]
return result;
}
``` |
9,972,860 | I have a program which reads Inbox messages from email accounts, as the title says i would like to run the program after every 1.5hrs.
Is there any OS(Windows and Linux) level or JVM level solution which would help in performing the task.
Thanks. | 2012/04/02 | [
"https://Stackoverflow.com/questions/9972860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1186817/"
] | On Windows use the `at` command or "Scheduled Jobs", on Linux use a `cron` job.
<http://support.microsoft.com/kb/313565>
<http://en.wikipedia.org/wiki/Cron> | Create a [cron job](http://en.wikipedia.org/wiki/Cron).
Type `crontab -e`
and add an entry for your command. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.