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 |
|---|---|---|---|---|---|
142,189 | My 2-years old CO detector (small, wall-mounted device with battery, no other power source) started beeping every morning for at least few minutes, sending sharp chirps once every 10 sec. It starts around 6am.
I don't see any visible fire or cooking in my apartment or outside. [I've read](https://arstechnica.com/civis... | 2018/07/13 | [
"https://diy.stackexchange.com/questions/142189",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/87726/"
] | If your CO detector were actually detecting CO, it would not chirp. It would sound a continuous, and very, VERY loud alarm you would definitely recognize.
The chirping is a universal (as far as I know) method for indicating that it's time to change the battery. This is true for CO and smoke detectors. | A low battery is the most common cause of seemingly-random chirps in smoke and CO detectors. Detector end of life is probably the second most common cause.
How old is the CO detector? Their lifetime is somewhere in the range of 5-10 years, depending on the make/model ([source](https://www.kidde.com/home-safety/en/us/s... |
142,189 | My 2-years old CO detector (small, wall-mounted device with battery, no other power source) started beeping every morning for at least few minutes, sending sharp chirps once every 10 sec. It starts around 6am.
I don't see any visible fire or cooking in my apartment or outside. [I've read](https://arstechnica.com/civis... | 2018/07/13 | [
"https://diy.stackexchange.com/questions/142189",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/87726/"
] | If your CO detector were actually detecting CO, it would not chirp. It would sound a continuous, and very, VERY loud alarm you would definitely recognize.
The chirping is a universal (as far as I know) method for indicating that it's time to change the battery. This is true for CO and smoke detectors. | If the battery were failing, it would not chirp at the same time every day, it would chirp and continue chirping all day. Having said that, if it's easy, and it should be, replace the battery. If it still chirps - at the same time every day- you can rule out battery. this is the first step.
The next step is to look o... |
142,189 | My 2-years old CO detector (small, wall-mounted device with battery, no other power source) started beeping every morning for at least few minutes, sending sharp chirps once every 10 sec. It starts around 6am.
I don't see any visible fire or cooking in my apartment or outside. [I've read](https://arstechnica.com/civis... | 2018/07/13 | [
"https://diy.stackexchange.com/questions/142189",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/87726/"
] | If your CO detector were actually detecting CO, it would not chirp. It would sound a continuous, and very, VERY loud alarm you would definitely recognize.
The chirping is a universal (as far as I know) method for indicating that it's time to change the battery. This is true for CO and smoke detectors. | Volunteer firefighter here who has seen many a CO detector malfunction..
I think the answers here are spot on but I'll just add on:
1. Some CO detectors, when set off, sounds like a BEEP-BEEP-BEEP then a pause and it continues with the series of beeps, etc. They're loud but not as loud as a commercial fire alarm in s... |
142,189 | My 2-years old CO detector (small, wall-mounted device with battery, no other power source) started beeping every morning for at least few minutes, sending sharp chirps once every 10 sec. It starts around 6am.
I don't see any visible fire or cooking in my apartment or outside. [I've read](https://arstechnica.com/civis... | 2018/07/13 | [
"https://diy.stackexchange.com/questions/142189",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/87726/"
] | A low battery is the most common cause of seemingly-random chirps in smoke and CO detectors. Detector end of life is probably the second most common cause.
How old is the CO detector? Their lifetime is somewhere in the range of 5-10 years, depending on the make/model ([source](https://www.kidde.com/home-safety/en/us/s... | If the battery were failing, it would not chirp at the same time every day, it would chirp and continue chirping all day. Having said that, if it's easy, and it should be, replace the battery. If it still chirps - at the same time every day- you can rule out battery. this is the first step.
The next step is to look o... |
142,189 | My 2-years old CO detector (small, wall-mounted device with battery, no other power source) started beeping every morning for at least few minutes, sending sharp chirps once every 10 sec. It starts around 6am.
I don't see any visible fire or cooking in my apartment or outside. [I've read](https://arstechnica.com/civis... | 2018/07/13 | [
"https://diy.stackexchange.com/questions/142189",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/87726/"
] | A low battery is the most common cause of seemingly-random chirps in smoke and CO detectors. Detector end of life is probably the second most common cause.
How old is the CO detector? Their lifetime is somewhere in the range of 5-10 years, depending on the make/model ([source](https://www.kidde.com/home-safety/en/us/s... | Volunteer firefighter here who has seen many a CO detector malfunction..
I think the answers here are spot on but I'll just add on:
1. Some CO detectors, when set off, sounds like a BEEP-BEEP-BEEP then a pause and it continues with the series of beeps, etc. They're loud but not as loud as a commercial fire alarm in s... |
142,189 | My 2-years old CO detector (small, wall-mounted device with battery, no other power source) started beeping every morning for at least few minutes, sending sharp chirps once every 10 sec. It starts around 6am.
I don't see any visible fire or cooking in my apartment or outside. [I've read](https://arstechnica.com/civis... | 2018/07/13 | [
"https://diy.stackexchange.com/questions/142189",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/87726/"
] | Volunteer firefighter here who has seen many a CO detector malfunction..
I think the answers here are spot on but I'll just add on:
1. Some CO detectors, when set off, sounds like a BEEP-BEEP-BEEP then a pause and it continues with the series of beeps, etc. They're loud but not as loud as a commercial fire alarm in s... | If the battery were failing, it would not chirp at the same time every day, it would chirp and continue chirping all day. Having said that, if it's easy, and it should be, replace the battery. If it still chirps - at the same time every day- you can rule out battery. this is the first step.
The next step is to look o... |
54,860,062 | So I have a contact form that uses phpmailer. It sends an email from one Gmail account to another. But I can't seem to get the receiving email to receive any emails.
The script is hosted on a cpanel (RivalHost) and the domain is on GoDaddy. I asked RivalHost if they were blocking SMTP connections or blocking ports 587... | 2019/02/25 | [
"https://Stackoverflow.com/questions/54860062",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6069294/"
] | [](https://i.stack.imgur.com/QSY6h.png)you have to encodeURI first:-
```
var whatsappMessage= "My First"+"\r\n\r\n"+"Message for Test";
whatsappMessage = window.encodeURIComponent(whatsappMessage);
```
Sending encoded message as parameter like :-
... | 1. In PHP, for whatsapp message, to have line break, no javascript required:
```
$message = 'Hello'. urlencode("\n"). 'How R U?';
```
2. Or create a variable to be used on any line:
```
$break = urlencode("\n");
``` |
46,467,120 | In below query, I am calculating the lead time between two different dates and eventually trying to get the average of that lead time but the output is incorrect.
```
SELECT
Round(AVG(CAST(
Case when CONVERT(datetime, ORDERDATE, 105) = CONVERT(datetime, INVOUTDATE, 105) THEN 0 else
Case when CONVERT(datetime, ORDERDAT... | 2017/09/28 | [
"https://Stackoverflow.com/questions/46467120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4895565/"
] | ok, now I understand..
I think you have to group by orders before to calculate avg
```
;with
S AS (
select DOCKETNO, ORDERDATE, INVOUTDATE, COUNT(*) n
from DSORDERSTATUS where ORDERTYPE <> 'Exchange Order'
group by DOCKETNO, ORDERDATE, INVOUTDATE
),
D as (
select [DOCKETNO], [ORDERDATE], [INVOU... | I will try to convert your dates to `DATE` instesad of `DATETIME` I think you are filtering too much rows because '20170831' is '2017-08-31 00:00:00' and you are loosing all `ORDERDATE` between '00:00:00' and '23:59:59' (for '2017-08-31')
```
WHERE ORDERTYPE <> 'Exchange Order'
AND CONVERT(date, ORDERDATE, 105) bet... |
46,467,120 | In below query, I am calculating the lead time between two different dates and eventually trying to get the average of that lead time but the output is incorrect.
```
SELECT
Round(AVG(CAST(
Case when CONVERT(datetime, ORDERDATE, 105) = CONVERT(datetime, INVOUTDATE, 105) THEN 0 else
Case when CONVERT(datetime, ORDERDAT... | 2017/09/28 | [
"https://Stackoverflow.com/questions/46467120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4895565/"
] | ok, now I understand..
I think you have to group by orders before to calculate avg
```
;with
S AS (
select DOCKETNO, ORDERDATE, INVOUTDATE, COUNT(*) n
from DSORDERSTATUS where ORDERTYPE <> 'Exchange Order'
group by DOCKETNO, ORDERDATE, INVOUTDATE
),
D as (
select [DOCKETNO], [ORDERDATE], [INVOU... | With the help of MtwStark i was able to resolve this.
I have modified his query,
Thanks buddy
```
;with
S AS (
SELECT DISTINCT DOCKETNO,
Case when CONVERT(datetime, ORDERDATE, 105) = CONVERT(datetime, INVOUTDATE, 105) THEN 0 else
Case when CONVERT(datetime, ORDERDATE, 105) + 1 = CONVERT(datetime, INVOUTDATE, 105) THEN... |
303,194 | I want to show the 1 column layout on the wishlist page only so that the left sidebar will hide. I have tried `<update handle="1column.xml"/>` inside the wishlist\_index\_index.xml file but change is not reflecting. | 2020/02/05 | [
"https://magento.stackexchange.com/questions/303194",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/39027/"
] | **app/code/VendoreName/ModuleName**
***registration.php***
```
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'VendoreName_ModuleName',
__DIR__
);
```
**app/code/VendoreName/ModuleName/etc**
***module.xml***
```
<?xml version=... | Do the following things,it will add custom widget with WYSIWYG editor.
>
> Step 1: app\code\VendorName\ModuleName\etc\widget.xml
>
>
>
```
<?xml version="1.0" ?>
<widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:widget:Magento_Widget:etc/widget.xsd">
<wi... |
580,297 | I just yet starting to learn about web serving. So, far I know domain name is used for web page addresses (URL), like if we have an URL like this:
```
http://www.theaddress.thedomain.com/path/to/file.html
```
* `http://` is for protocol that is being used.
* `www` is for hostname.
* `theaddress.thedomain.com` is for... | 2015/01/31 | [
"https://askubuntu.com/questions/580297",
"https://askubuntu.com",
"https://askubuntu.com/users/363495/"
] | it's not part of network manager - but network manager uses 'ifupdown' to connect the internet, and ifupdown let you run scripts on connecting (turning interface up) or disconnecting (turning the interface down)
all you should do is to put your script in one of the following directories under /etc/network/:
if-pre-up... | Quick answer: yes.
Long answer, more than "telling" NM to do something the easiest might be to *check* if NM is up/down before running your script. See example: <https://wiki.archlinux.org/index.php/NetworkManager#Checking_if_networking_is_up_inside_a_cron_job_or_script>
Making NM do something in between status chang... |
316,790 | Got a little problem with a Seam application I'm working on and I was wondering if anyone knows a way round it. I've got a form in my application that uses AJAX to show certain input boxes depending on an item in a dropdown box. The code works fine except for setting the ID's in my input boxes. It looks like JSF doesn'... | 2008/11/25 | [
"https://Stackoverflow.com/questions/316790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1900/"
] | You see why they don't let you set the ID, right? JSF takes over id creation because you're in a repeated loop of components and, if they let you just set the id, you'd end up with duplicate IDs, which wouldn't help you anyway.
Without knowing WHY you want to set the ID explicitly, it's hard to give you a workaround. ... | I'm assuming you want to control the ID of your input component so you can reference it later in Javascript?
Since you can't set the ID via an expression, I do this:
```
<h:inputText id="whatever" value="..." />
```
Then later in the code:
```
<script type="text/javascript">
var theElement = document.getElementByI... |
316,790 | Got a little problem with a Seam application I'm working on and I was wondering if anyone knows a way round it. I've got a form in my application that uses AJAX to show certain input boxes depending on an item in a dropdown box. The code works fine except for setting the ID's in my input boxes. It looks like JSF doesn'... | 2008/11/25 | [
"https://Stackoverflow.com/questions/316790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1900/"
] | I'm assuming you want to control the ID of your input component so you can reference it later in Javascript?
Since you can't set the ID via an expression, I do this:
```
<h:inputText id="whatever" value="..." />
```
Then later in the code:
```
<script type="text/javascript">
var theElement = document.getElementByI... | Have you tried use facelets?
That will allow you to assing your own ids ie:
me:labelKeyThingo can then use the id=#{labelKey} to make a unique label. Here is an example facelet called **m:textPassword** from my bad code:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.... |
316,790 | Got a little problem with a Seam application I'm working on and I was wondering if anyone knows a way round it. I've got a form in my application that uses AJAX to show certain input boxes depending on an item in a dropdown box. The code works fine except for setting the ID's in my input boxes. It looks like JSF doesn'... | 2008/11/25 | [
"https://Stackoverflow.com/questions/316790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1900/"
] | You see why they don't let you set the ID, right? JSF takes over id creation because you're in a repeated loop of components and, if they let you just set the id, you'd end up with duplicate IDs, which wouldn't help you anyway.
Without knowing WHY you want to set the ID explicitly, it's hard to give you a workaround. ... | Have you tried use facelets?
That will allow you to assing your own ids ie:
me:labelKeyThingo can then use the id=#{labelKey} to make a unique label. Here is an example facelet called **m:textPassword** from my bad code:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.... |
236,399 | How I can make a matrix inside a matrix as shown in this picture?

Indeed, I want to treat every block as a separate matrix. For example, I want to add braces over and under the second matrix by `\underbrace{}` or `\overbrace{}` commands as you see ... | 2015/04/01 | [
"https://tex.stackexchange.com/questions/236399",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/71461/"
] | This is a Ti*k*Z approach.
Step 1
------
First I found that `fit` library is useful in calculating the bounding box. In the next figure, the brown box does not include `bbbbbb_3` because I did not pass `(A-2-3)` to `fit=`.

```
\documentclass[border=9,tikz]{standalone}
\u... | I noticed that all the matrix elements were aligned relative to the outer matrix as if the brackets and braces were overlaid on top of original, using pre-existing gaps. So that is precisely what I did.
In the revised version I use Tikz to set markers at the corners and compute the size and location of the sub-matrix.... |
236,399 | How I can make a matrix inside a matrix as shown in this picture?

Indeed, I want to treat every block as a separate matrix. For example, I want to add braces over and under the second matrix by `\underbrace{}` or `\overbrace{}` commands as you see ... | 2015/04/01 | [
"https://tex.stackexchange.com/questions/236399",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/71461/"
] | I noticed that all the matrix elements were aligned relative to the outer matrix as if the brackets and braces were overlaid on top of original, using pre-existing gaps. So that is precisely what I did.
In the revised version I use Tikz to set markers at the corners and compute the size and location of the sub-matrix.... | With `{bNiceMatrix}` of `nicematrix`.
```
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
$\begin{bNiceMatrix}[margin]
x & y & z & a+b+c & z \\[7mm]
x & y+y & 0 & t & 0 \\
x & y & 1 & & 0 \\
x & y & 2 & & 0 \\
x & y & 3 & & 0 \\
x & y & 4 & & 0 \\
\CodeAft... |
236,399 | How I can make a matrix inside a matrix as shown in this picture?

Indeed, I want to treat every block as a separate matrix. For example, I want to add braces over and under the second matrix by `\underbrace{}` or `\overbrace{}` commands as you see ... | 2015/04/01 | [
"https://tex.stackexchange.com/questions/236399",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/71461/"
] | This is a Ti*k*Z approach.
Step 1
------
First I found that `fit` library is useful in calculating the bounding box. In the next figure, the brown box does not include `bbbbbb_3` because I did not pass `(A-2-3)` to `fit=`.

```
\documentclass[border=9,tikz]{standalone}
\u... | With `{bNiceMatrix}` of `nicematrix`.
```
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
$\begin{bNiceMatrix}[margin]
x & y & z & a+b+c & z \\[7mm]
x & y+y & 0 & t & 0 \\
x & y & 1 & & 0 \\
x & y & 2 & & 0 \\
x & y & 3 & & 0 \\
x & y & 4 & & 0 \\
\CodeAft... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | To the good points presented by Galactic Cowboy, and, expecially, by RP, I may add only some details to **confirm the sporting chance between KPR/GPR and the cypress**.
1) Since the term GPR indicates also 'resin' **it is obvious that that tree's kind (Gen 6:14) was a resinous one**. So, the range of possible kind of ... | "Gofer Wood" does not refer to a Tree Species but to "Lumber" G-F-R referring to length-width-thickness. The Ark was a modular, mountain Barn, built in the Mountains of Ararat (the Upper Tigris) as a Breeding Station, mostly for War Horses...but also for other exotic Animals that had turned up from far & wide at the Po... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | Yes, it *is* the common practice to translate from the original language into the some word in the destination language rather than leaving it as the source language. Words like this are notoriously difficult to translate because the interpreters have to pick some word in the destination language that will make sense t... | To the good points presented by Galactic Cowboy, and, expecially, by RP, I may add only some details to **confirm the sporting chance between KPR/GPR and the cypress**.
1) Since the term GPR indicates also 'resin' **it is obvious that that tree's kind (Gen 6:14) was a resinous one**. So, the range of possible kind of ... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | As noted in other answers, the meaning of גֹּפֶר seems lost to us, and any translation must therefore be speculative. To support the translation "cypress", however, consider the following extract from Beekes/Van Beek, *Etymological Dictionary of Greek*:
>
> **κυπάρισσος** [f.] 'cypress' (ε 64). <PG(V)>
>
> - VAR Att... | To the good points presented by Galactic Cowboy, and, expecially, by RP, I may add only some details to **confirm the sporting chance between KPR/GPR and the cypress**.
1) Since the term GPR indicates also 'resin' **it is obvious that that tree's kind (Gen 6:14) was a resinous one**. So, the range of possible kind of ... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | You do realize it's gopher wood right? Other versions of the Bible might translate it as something else, but other translations of the Bible are not as accurate as the KJV. That is a common known fact. Stick to KJV in all your questions and you'll not be misinformed. | "Gofer Wood" does not refer to a Tree Species but to "Lumber" G-F-R referring to length-width-thickness. The Ark was a modular, mountain Barn, built in the Mountains of Ararat (the Upper Tigris) as a Breeding Station, mostly for War Horses...but also for other exotic Animals that had turned up from far & wide at the Po... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | As noted in other answers, the meaning of גֹּפֶר seems lost to us, and any translation must therefore be speculative. To support the translation "cypress", however, consider the following extract from Beekes/Van Beek, *Etymological Dictionary of Greek*:
>
> **κυπάρισσος** [f.] 'cypress' (ε 64). <PG(V)>
>
> - VAR Att... | You do realize it's gopher wood right? Other versions of the Bible might translate it as something else, but other translations of the Bible are not as accurate as the KJV. That is a common known fact. Stick to KJV in all your questions and you'll not be misinformed. |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | Yes, it *is* the common practice to translate from the original language into the some word in the destination language rather than leaving it as the source language. Words like this are notoriously difficult to translate because the interpreters have to pick some word in the destination language that will make sense t... | This is not really a direct answer to the question so much as some tangential musing on the Hebrew alphabet and "unknown" words, specifically as they relate to this passage. However, it might also lend some support to the "cypress" translation as well.
Gopher/cypress: [Strongs H1613](http://www.blueletterbible.org/lan... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | As noted in other answers, the meaning of גֹּפֶר seems lost to us, and any translation must therefore be speculative. To support the translation "cypress", however, consider the following extract from Beekes/Van Beek, *Etymological Dictionary of Greek*:
>
> **κυπάρισσος** [f.] 'cypress' (ε 64). <PG(V)>
>
> - VAR Att... | "Gofer Wood" does not refer to a Tree Species but to "Lumber" G-F-R referring to length-width-thickness. The Ark was a modular, mountain Barn, built in the Mountains of Ararat (the Upper Tigris) as a Breeding Station, mostly for War Horses...but also for other exotic Animals that had turned up from far & wide at the Po... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | Yes, it *is* the common practice to translate from the original language into the some word in the destination language rather than leaving it as the source language. Words like this are notoriously difficult to translate because the interpreters have to pick some word in the destination language that will make sense t... | As noted in other answers, the meaning of גֹּפֶר seems lost to us, and any translation must therefore be speculative. To support the translation "cypress", however, consider the following extract from Beekes/Van Beek, *Etymological Dictionary of Greek*:
>
> **κυπάρισσος** [f.] 'cypress' (ε 64). <PG(V)>
>
> - VAR Att... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | This is not really a direct answer to the question so much as some tangential musing on the Hebrew alphabet and "unknown" words, specifically as they relate to this passage. However, it might also lend some support to the "cypress" translation as well.
Gopher/cypress: [Strongs H1613](http://www.blueletterbible.org/lan... | "Gofer Wood" does not refer to a Tree Species but to "Lumber" G-F-R referring to length-width-thickness. The Ark was a modular, mountain Barn, built in the Mountains of Ararat (the Upper Tigris) as a Breeding Station, mostly for War Horses...but also for other exotic Animals that had turned up from far & wide at the Po... |
500 | Reading from Genesis 6:14 (NRSV):
>
> Make yourself an ark of cypress wood; make rooms in the ark, and cover
> it inside and out with pitch.
>
>
>
There is a note at "cypress" which says:
>
> Meaning of Hebrew uncertain.
>
>
>
In the New Interpreter's Study Bible, the commentary states:
>
> Neither the m... | 2011/11/03 | [
"https://hermeneutics.stackexchange.com/questions/500",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/148/"
] | Yes, it *is* the common practice to translate from the original language into the some word in the destination language rather than leaving it as the source language. Words like this are notoriously difficult to translate because the interpreters have to pick some word in the destination language that will make sense t... | You do realize it's gopher wood right? Other versions of the Bible might translate it as something else, but other translations of the Bible are not as accurate as the KJV. That is a common known fact. Stick to KJV in all your questions and you'll not be misinformed. |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | ```
public String changeSecond(String time)
{
String result;
int ind_hour=time.indexOf("hour");
int ind_minute=time.indexOf("minute");
int ind_second=time.indexOf("second");
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+6, ind_minute));; // value 6 is l... | Its not the way to do it.But It will work.Try this,
```
String hour="200hour 0minute 0second";
String[] secondarray=hour.split("hour");
String second=secondarray[0]; //here "second" will have the value 200
``` |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | You should make changes to the following lines:
```
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+5, ind_minute));
int second=Integer.parseInt(time.substring(ind_minute+7, ind_second));
``` | Its not the way to do it.But It will work.Try this,
```
String hour="200hour 0minute 0second";
String[] secondarray=hour.split("hour");
String second=secondarray[0]; //here "second" will have the value 200
``` |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | ```
public String changeSecond(String time)
{
String result;
int ind_hour=time.indexOf("hour");
int ind_minute=time.indexOf("minute");
int ind_second=time.indexOf("second");
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+6, ind_minute));; // value 6 is l... | You can split the tab into 3 parts : One will contains the hours, another the minutes and the last one the seconds.
```
public static String changeSecond(String time)
{
String tab[] = time.split(" ");
String result = "";
int ind_hour=tab[0].indexOf("hour");
int ind_minute=tab[1].ind... |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | ```
public String changeSecond(String time)
{
String result;
int ind_hour=time.indexOf("hour");
int ind_minute=time.indexOf("minute");
int ind_second=time.indexOf("second");
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+6, ind_minute));; // value 6 is l... | This is the cleanest solution I could come up with. Just split on " " then remove the text that's irrelevant.
```
public String changeSecond(final String time)
{
final String[] times = time.split(" ");
final int hour = Integer.parseInt(times[0].replace("hour", ""));
final int minute = Integer.parseInt(time... |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | ```
public String changeSecond(String time)
{
String result;
int ind_hour=time.indexOf("hour");
int ind_minute=time.indexOf("minute");
int ind_second=time.indexOf("second");
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+6, ind_minute));; // value 6 is l... | The initial code was throwing parsing errors since alpha characters were being passed to the `Integer.parseInt` method. The alpha characters were being included because the substring did not take into account the length of the terms hour, minute and second. I would recommend splitting the string to tidy things up.
```... |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | ```
public String changeSecond(String time)
{
String result;
int ind_hour=time.indexOf("hour");
int ind_minute=time.indexOf("minute");
int ind_second=time.indexOf("second");
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+6, ind_minute));; // value 6 is l... | Update your hours,minutes and seconds parsing as:
```
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour + "hour".length() + 1, ind_minute));
int second=Integer.parseInt(time.substring(ind_minute + "minute".length() + 1, ind_second));
``... |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | You should make changes to the following lines:
```
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+5, ind_minute));
int second=Integer.parseInt(time.substring(ind_minute+7, ind_second));
``` | You can split the tab into 3 parts : One will contains the hours, another the minutes and the last one the seconds.
```
public static String changeSecond(String time)
{
String tab[] = time.split(" ");
String result = "";
int ind_hour=tab[0].indexOf("hour");
int ind_minute=tab[1].ind... |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | You should make changes to the following lines:
```
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+5, ind_minute));
int second=Integer.parseInt(time.substring(ind_minute+7, ind_second));
``` | This is the cleanest solution I could come up with. Just split on " " then remove the text that's irrelevant.
```
public String changeSecond(final String time)
{
final String[] times = time.split(" ");
final int hour = Integer.parseInt(times[0].replace("hour", ""));
final int minute = Integer.parseInt(time... |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | You should make changes to the following lines:
```
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+5, ind_minute));
int second=Integer.parseInt(time.substring(ind_minute+7, ind_second));
``` | The initial code was throwing parsing errors since alpha characters were being passed to the `Integer.parseInt` method. The alpha characters were being included because the substring did not take into account the length of the terms hour, minute and second. I would recommend splitting the string to tidy things up.
```... |
16,645,965 | I am new to zend I want to add decoratives,size in my select box
example like this
'required' => true,
'filters' => array('StringTrim'),
'style' => array('width:103px'),
'multiOptions' => $list,
'decorators'=>Array(
```
'ViewHelper','Errors'
),
```
this is my code
$companyName = new Zend\_Form\_Element\... | 2013/05/20 | [
"https://Stackoverflow.com/questions/16645965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2173460/"
] | You should make changes to the following lines:
```
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour+5, ind_minute));
int second=Integer.parseInt(time.substring(ind_minute+7, ind_second));
``` | Update your hours,minutes and seconds parsing as:
```
int hour=Integer.parseInt(time.substring(0, ind_hour));
int minute=Integer.parseInt(time.substring(ind_hour + "hour".length() + 1, ind_minute));
int second=Integer.parseInt(time.substring(ind_minute + "minute".length() + 1, ind_second));
``... |
72,403,883 | I would like to split a column into several columns according to conditions.
For example, if the character starts with P it will go to one column and if it starts with F or C it will go to other columns.
```
df <- data.frame(
"name" = c("a", "b"),
"ID" = c("P_GO_10;C_GO_23;C_GO_32", "P_GO_65;F_GO15;C_GO_97;F_GO_8... | 2022/05/27 | [
"https://Stackoverflow.com/questions/72403883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18540501/"
] | To solve the issue, on Xcode, you need to go to Build Phases -> UnityFramework, and make sure the Headers is listed above the Compile Sources.
[](https://i.stack.imgur.com/TrBUx.png) | Changing build order in Xcode from 'Manual order' to 'Dependency order' may help.
[](https://i.stack.imgur.com/k4Auk.png)
[](https://i.stack.imgur.com/jmUNs.png) |
72,403,883 | I would like to split a column into several columns according to conditions.
For example, if the character starts with P it will go to one column and if it starts with F or C it will go to other columns.
```
df <- data.frame(
"name" = c("a", "b"),
"ID" = c("P_GO_10;C_GO_23;C_GO_32", "P_GO_65;F_GO15;C_GO_97;F_GO_8... | 2022/05/27 | [
"https://Stackoverflow.com/questions/72403883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18540501/"
] | To solve the issue, on Xcode, you need to go to Build Phases -> UnityFramework, and make sure the Headers is listed above the Compile Sources.
[](https://i.stack.imgur.com/TrBUx.png) | Running in Terminal
```
defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
```
To enable the new build system solved the issue for me. |
72,403,883 | I would like to split a column into several columns according to conditions.
For example, if the character starts with P it will go to one column and if it starts with F or C it will go to other columns.
```
df <- data.frame(
"name" = c("a", "b"),
"ID" = c("P_GO_10;C_GO_23;C_GO_32", "P_GO_65;F_GO15;C_GO_97;F_GO_8... | 2022/05/27 | [
"https://Stackoverflow.com/questions/72403883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18540501/"
] | To solve the issue, on Xcode, you need to go to Build Phases -> UnityFramework, and make sure the Headers is listed above the Compile Sources.
[](https://i.stack.imgur.com/TrBUx.png) | Move Headers above Compile Sources fixed the error. Please see the image for reference. I have referenced the following [Xcode 13.3 Build Failed because of Cycle in Dependencies between targets libsignal-protocol-swift](https://stackoverflow.com/questions/71732410/xcode-13-3-build-failed-because-of-cycle-in-dependencie... |
58,750,798 | I can't find a way to get a constant value of isAuthenticated variable across both server and client side with next.js
I am using a custom app.js to wrap the app within the Apollo Provider. I am using the layout to display if the user is authenticated or not. The defaultPage is a HOC component.
When a page is server ... | 2019/11/07 | [
"https://Stackoverflow.com/questions/58750798",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3415011/"
] | 1. on your repo, cleanup the history of commits for this remote :
```
git fetch upstream
```
2. if one of your own commits has a commit that includes the large file, rewrite your history so that this large file is no longer referenced
```
# using one or more of the following commands :
git rebase --interactive
git f... | you already got the bad-commit in your history and you need to get rid of it before continuing
let's assume you got `master` last commit diverted and haven't been able to do anything else (I really don't have your branches at sight, so I need to assume something to start with)
you can checkout to the previous commit ... |
63,471,522 | I have a string, and in it I need to find a substring and replace it. The one to be found and the one that'll replace it are of different length. My code, partially:
```
char *source_str = "aaa bbb CcCc dddd kkkk xxx yyyy";
char *pattern = "cccc";
char *new_sub_s = "mmmmm4343afdsafd";
char *sub_s1 = strcasestr(source... | 2020/08/18 | [
"https://Stackoverflow.com/questions/63471522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14126248/"
] | There are multiple problems in your code:
* you do not test if `sub_s1` was found in the string. What if there is no match?
* `printf("sub_str before pattern: %s\r\n", sub_s1 - source_str);` passes a difference of pointers for `%s` that expects a string. The behavior is undefined.
* `strcat(new_str, '\0');` has undefi... | >
>
> ```
> printf("sub_str before pattern: %s\r\n", sub_s1 - source_str); // Memory corruption
>
> ```
>
>
You're taking the difference of two pointers, and printing it as though it was a pointer to a string. In practice, on your machine, this probably calculates a meaningless number and interprets it as a memor... |
63,471,522 | I have a string, and in it I need to find a substring and replace it. The one to be found and the one that'll replace it are of different length. My code, partially:
```
char *source_str = "aaa bbb CcCc dddd kkkk xxx yyyy";
char *pattern = "cccc";
char *new_sub_s = "mmmmm4343afdsafd";
char *sub_s1 = strcasestr(source... | 2020/08/18 | [
"https://Stackoverflow.com/questions/63471522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14126248/"
] | There are multiple problems in your code:
* you do not test if `sub_s1` was found in the string. What if there is no match?
* `printf("sub_str before pattern: %s\r\n", sub_s1 - source_str);` passes a difference of pointers for `%s` that expects a string. The behavior is undefined.
* `strcat(new_str, '\0');` has undefi... | `snprintf` can be used to calculate the memory needed and then print the string to the allocated pointer.
```
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ( void) {
char *source_str = "aaa bbb CcCc dddd kkkk xxx yyyy";
char *pattern = "cccc";
char *new_sub_s = "m... |
63,967 | I have a problem that I've been inspecting for a while now, googling and everything but could not begin to understand. I'm really not used to java, even less tomcat. So there it is.
First, the setup.
* Centos 5.3 on a virtualized server.
* Bitnami Native Alfresco stack (tomcat5.5, mysql5, java, javajdk, JDBC)
Conten... | 2009/09/10 | [
"https://serverfault.com/questions/63967",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | This line in your error log would suggest the problem lies with your database configuration:
```
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'luceneIndexBackupComponent'
defined in class path resource [alfresco/core-services-context.xml]:
Invocation of init method fa... | It looks like the alfresco/file-servers.properties file contains some errors. |
26,165,544 | I have data that look like this
```
bankname bankid year deposit dep_cert capital surplus
Bank A 1 1881 244789 7250 20218 29513
Bank B 2 1881 195755 10243 185151 NA
Bank C 3 1881 107736 13357 177612 NA
Bank D 4 1881 170600 NA... | 2014/10/02 | [
"https://Stackoverflow.com/questions/26165544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4017140/"
] | The equivalent would be `rowSums` in this case:
```
rowSums(bankdata[c("deposit", "dep_cert", "capital", "surplus")], na.rm = TRUE)
# [1] 301770 391149 298705 190600 32665278
```
The main thing that you're missing is the `na.rm = TRUE` argument.
To add it to your `data.frame`, you would do:
```
bankdata$li... | Not a full answer, but is too long to be a comment:
Your Stata code as originally stated
```
foreach `x' of varlist deposit dep_cert capital surplus {
replace `x'=0 if missing(`x')
}
```
(1) would not work (2) is a bad idea any way.
This would work
```
foreach x of varlist deposit dep_cert capital surplus... |
26,165,544 | I have data that look like this
```
bankname bankid year deposit dep_cert capital surplus
Bank A 1 1881 244789 7250 20218 29513
Bank B 2 1881 195755 10243 185151 NA
Bank C 3 1881 107736 13357 177612 NA
Bank D 4 1881 170600 NA... | 2014/10/02 | [
"https://Stackoverflow.com/questions/26165544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4017140/"
] | The equivalent would be `rowSums` in this case:
```
rowSums(bankdata[c("deposit", "dep_cert", "capital", "surplus")], na.rm = TRUE)
# [1] 301770 391149 298705 190600 32665278
```
The main thing that you're missing is the `na.rm = TRUE` argument.
To add it to your `data.frame`, you would do:
```
bankdata$li... | Using `data.table`
```
library(data.table)
nm1 <- c("deposit", "dep_cert", "capital", "surplus")
setDT(bankdata)[,liabiliy:=Reduce(`+`,
lapply(.SD, function(x) replace(x, is.na(x), 0))),.SDcols=nm1]
bankdata
# bankname bankid year deposit dep_cert capital surplus liabiliy
#1: Bank A 1 1881 ... |
26,165,544 | I have data that look like this
```
bankname bankid year deposit dep_cert capital surplus
Bank A 1 1881 244789 7250 20218 29513
Bank B 2 1881 195755 10243 185151 NA
Bank C 3 1881 107736 13357 177612 NA
Bank D 4 1881 170600 NA... | 2014/10/02 | [
"https://Stackoverflow.com/questions/26165544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4017140/"
] | The equivalent would be `rowSums` in this case:
```
rowSums(bankdata[c("deposit", "dep_cert", "capital", "surplus")], na.rm = TRUE)
# [1] 301770 391149 298705 190600 32665278
```
The main thing that you're missing is the `na.rm = TRUE` argument.
To add it to your `data.frame`, you would do:
```
bankdata$li... | For both tasks, you can also use `mutate` from the [dplyr](https://cran.r-project.org/web/packages/dplyr/index.html) package.
```
library(dplyr)
vars <- c("deposit", "dep_cert", "capital", "surplus")
```
### Calculating the row sum/total
As explained by A Handcart And Mohair in their [answer](https://stackoverflow.... |
26,165,544 | I have data that look like this
```
bankname bankid year deposit dep_cert capital surplus
Bank A 1 1881 244789 7250 20218 29513
Bank B 2 1881 195755 10243 185151 NA
Bank C 3 1881 107736 13357 177612 NA
Bank D 4 1881 170600 NA... | 2014/10/02 | [
"https://Stackoverflow.com/questions/26165544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4017140/"
] | Not a full answer, but is too long to be a comment:
Your Stata code as originally stated
```
foreach `x' of varlist deposit dep_cert capital surplus {
replace `x'=0 if missing(`x')
}
```
(1) would not work (2) is a bad idea any way.
This would work
```
foreach x of varlist deposit dep_cert capital surplus... | For both tasks, you can also use `mutate` from the [dplyr](https://cran.r-project.org/web/packages/dplyr/index.html) package.
```
library(dplyr)
vars <- c("deposit", "dep_cert", "capital", "surplus")
```
### Calculating the row sum/total
As explained by A Handcart And Mohair in their [answer](https://stackoverflow.... |
26,165,544 | I have data that look like this
```
bankname bankid year deposit dep_cert capital surplus
Bank A 1 1881 244789 7250 20218 29513
Bank B 2 1881 195755 10243 185151 NA
Bank C 3 1881 107736 13357 177612 NA
Bank D 4 1881 170600 NA... | 2014/10/02 | [
"https://Stackoverflow.com/questions/26165544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4017140/"
] | Using `data.table`
```
library(data.table)
nm1 <- c("deposit", "dep_cert", "capital", "surplus")
setDT(bankdata)[,liabiliy:=Reduce(`+`,
lapply(.SD, function(x) replace(x, is.na(x), 0))),.SDcols=nm1]
bankdata
# bankname bankid year deposit dep_cert capital surplus liabiliy
#1: Bank A 1 1881 ... | For both tasks, you can also use `mutate` from the [dplyr](https://cran.r-project.org/web/packages/dplyr/index.html) package.
```
library(dplyr)
vars <- c("deposit", "dep_cert", "capital", "surplus")
```
### Calculating the row sum/total
As explained by A Handcart And Mohair in their [answer](https://stackoverflow.... |
6,939,807 | I've tried putting 10px of padding in but no success. You can see an example of it [lower down on this page](http://www.glamourunderground.com/309/organic-networking-the-5-point-guide/).
```
#menu li {
float: left;
margin: 0px 0 0px 0;
padding: 0 0 0 10px;
}
```
Thanks to everyone w... | 2011/08/04 | [
"https://Stackoverflow.com/questions/6939807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/725430/"
] | Not sure how your page is made, but adding a margin-left of 200px on the ul element works. (Assuming we are talking about the ul under "When you’re Asking for Advice") | You should wrap your content in a `div` with a new formatting context after `#sidebox2000`. |
52,638,441 | I am using Picasso for loading the image in my application. I am getting null value for image from service. How to handle the null value.
my code:
```
if(reviewdata.get(position).user.getPhotoUrl().isEmpty() || reviewdata.get(position).user.getPhotoUrl() == null){
Picasso.with(getApplicationContext()).... | 2018/10/04 | [
"https://Stackoverflow.com/questions/52638441",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4919402/"
] | First priority If a condition is true then do something like this following:
```
if(reviewdata.get(position).user.getPhotoUrl()!=null && !reviewdata.get(position).user.getPhotoUrl().isEmpty())
{
Picasso.with(getApplicationContext()).load(reviewdata.get(position).user.getPhotoUrl()).placeholder(R.drawable.profile)
... | Change your condition order in `if`
```
if(reviewdata.get(position).user.getPhotoUrl() == null || reviewdata.get(position).user.getPhotoUrl().isEmpty() )
``` |
52,638,441 | I am using Picasso for loading the image in my application. I am getting null value for image from service. How to handle the null value.
my code:
```
if(reviewdata.get(position).user.getPhotoUrl().isEmpty() || reviewdata.get(position).user.getPhotoUrl() == null){
Picasso.with(getApplicationContext()).... | 2018/10/04 | [
"https://Stackoverflow.com/questions/52638441",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4919402/"
] | Change your condition order in `if`
```
if(reviewdata.get(position).user.getPhotoUrl() == null || reviewdata.get(position).user.getPhotoUrl().isEmpty() )
``` | >
> **Try this:**
>
>
>
> ```
> public boolean isEmpty(String s) {
> return s.trim().equals("") || s == null || s.isEmpty() || s.equals("null");
> }
>
> ```
>
>
```
if(!isEmpty(reviewdata.get(position).user.getPhotoUrl())){
Picasso.with(getApplicationContext()).load(reviewdata.get(positi... |
52,638,441 | I am using Picasso for loading the image in my application. I am getting null value for image from service. How to handle the null value.
my code:
```
if(reviewdata.get(position).user.getPhotoUrl().isEmpty() || reviewdata.get(position).user.getPhotoUrl() == null){
Picasso.with(getApplicationContext()).... | 2018/10/04 | [
"https://Stackoverflow.com/questions/52638441",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4919402/"
] | Change your condition order in `if`
```
if(reviewdata.get(position).user.getPhotoUrl() == null || reviewdata.get(position).user.getPhotoUrl().isEmpty() )
``` | **No need to check null values** using Picasso. Picasso is smart enough, it will handle null values.
```
Picasso.with(getApplicationContext()).load(reviewdata.get(position).user.getPhotoUrl()).placeholder(R.drawable.profile).into(viewHolder.user_image);}
```
If URL is null or empty, it will show `placeholder` image. |
52,638,441 | I am using Picasso for loading the image in my application. I am getting null value for image from service. How to handle the null value.
my code:
```
if(reviewdata.get(position).user.getPhotoUrl().isEmpty() || reviewdata.get(position).user.getPhotoUrl() == null){
Picasso.with(getApplicationContext()).... | 2018/10/04 | [
"https://Stackoverflow.com/questions/52638441",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4919402/"
] | First priority If a condition is true then do something like this following:
```
if(reviewdata.get(position).user.getPhotoUrl()!=null && !reviewdata.get(position).user.getPhotoUrl().isEmpty())
{
Picasso.with(getApplicationContext()).load(reviewdata.get(position).user.getPhotoUrl()).placeholder(R.drawable.profile)
... | >
> **Try this:**
>
>
>
> ```
> public boolean isEmpty(String s) {
> return s.trim().equals("") || s == null || s.isEmpty() || s.equals("null");
> }
>
> ```
>
>
```
if(!isEmpty(reviewdata.get(position).user.getPhotoUrl())){
Picasso.with(getApplicationContext()).load(reviewdata.get(positi... |
52,638,441 | I am using Picasso for loading the image in my application. I am getting null value for image from service. How to handle the null value.
my code:
```
if(reviewdata.get(position).user.getPhotoUrl().isEmpty() || reviewdata.get(position).user.getPhotoUrl() == null){
Picasso.with(getApplicationContext()).... | 2018/10/04 | [
"https://Stackoverflow.com/questions/52638441",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4919402/"
] | First priority If a condition is true then do something like this following:
```
if(reviewdata.get(position).user.getPhotoUrl()!=null && !reviewdata.get(position).user.getPhotoUrl().isEmpty())
{
Picasso.with(getApplicationContext()).load(reviewdata.get(position).user.getPhotoUrl()).placeholder(R.drawable.profile)
... | **No need to check null values** using Picasso. Picasso is smart enough, it will handle null values.
```
Picasso.with(getApplicationContext()).load(reviewdata.get(position).user.getPhotoUrl()).placeholder(R.drawable.profile).into(viewHolder.user_image);}
```
If URL is null or empty, it will show `placeholder` image. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | I use fiddler ( <http://www.fiddler2.com> ) | Sounds like you're after some kind of "packet sniffing" utility.
Here's a couple of links to articles on the Code Project site for packet sniffers (with downloadable source code) written in C#:
[Packet Capture and Analayzer](http://www.codeproject.com/KB/cs/pacanal.aspx)
[A Network Sniffer in C#](http://www.codeproj... |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | I use fiddler ( <http://www.fiddler2.com> ) | I hope if [Wirehark](http://www.wireshark.org/) works for you.
It's free and cross-platform.
Also,
"Wireshark is the world's foremost network protocol analyzer, and is the de facto (and often de jure) standard across many industries and educational institutions"
Have look,
[Wireshark-Wikipedia](http://en.wikipedia.org... |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | Sounds like you're after some kind of "packet sniffing" utility.
Here's a couple of links to articles on the Code Project site for packet sniffers (with downloadable source code) written in C#:
[Packet Capture and Analayzer](http://www.codeproject.com/KB/cs/pacanal.aspx)
[A Network Sniffer in C#](http://www.codeproj... | You're probably going to save lots of time and effort with some kind of proxy setup. A decent local-machine solution would be [Fiddler](http://www.fiddlertool.com/) (requires Windows), or something like a [Squid](http://www.squid-cache.org/) server for a networked solution. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | You may want to use existing network interfaces capturing libraries like pcap or winpcap to do so.
Rewriting all the necessary stuff by yourself would be quite time expensive.
Link to [Pcap](http://www.tcpdump.org/pcap.htm)
Link to [WinPcap](http://www.winpcap.org/)
Edit : Just saw someone also wrote the C# bindings... | Also, writing a simple http proxy for this purpose in C# is a trivial task. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | Sounds like you're after some kind of "packet sniffing" utility.
Here's a couple of links to articles on the Code Project site for packet sniffers (with downloadable source code) written in C#:
[Packet Capture and Analayzer](http://www.codeproject.com/KB/cs/pacanal.aspx)
[A Network Sniffer in C#](http://www.codeproj... | Also, writing a simple http proxy for this purpose in C# is a trivial task. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | I use fiddler ( <http://www.fiddler2.com> ) | You're probably going to save lots of time and effort with some kind of proxy setup. A decent local-machine solution would be [Fiddler](http://www.fiddlertool.com/) (requires Windows), or something like a [Squid](http://www.squid-cache.org/) server for a networked solution. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | I use fiddler ( <http://www.fiddler2.com> ) | Also, writing a simple http proxy for this purpose in C# is a trivial task. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | You're probably going to save lots of time and effort with some kind of proxy setup. A decent local-machine solution would be [Fiddler](http://www.fiddlertool.com/) (requires Windows), or something like a [Squid](http://www.squid-cache.org/) server for a networked solution. | Also, writing a simple http proxy for this purpose in C# is a trivial task. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | I hope if [Wirehark](http://www.wireshark.org/) works for you.
It's free and cross-platform.
Also,
"Wireshark is the world's foremost network protocol analyzer, and is the de facto (and often de jure) standard across many industries and educational institutions"
Have look,
[Wireshark-Wikipedia](http://en.wikipedia.org... | Also, writing a simple http proxy for this purpose in C# is a trivial task. |
532,746 | Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
I need a browser independent way of logging visited URLs. | 2009/02/10 | [
"https://Stackoverflow.com/questions/532746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62560/"
] | You may want to use existing network interfaces capturing libraries like pcap or winpcap to do so.
Rewriting all the necessary stuff by yourself would be quite time expensive.
Link to [Pcap](http://www.tcpdump.org/pcap.htm)
Link to [WinPcap](http://www.winpcap.org/)
Edit : Just saw someone also wrote the C# bindings... | You're probably going to save lots of time and effort with some kind of proxy setup. A decent local-machine solution would be [Fiddler](http://www.fiddlertool.com/) (requires Windows), or something like a [Squid](http://www.squid-cache.org/) server for a networked solution. |
14,698,847 | I'm trying to improve an actual code that make a bluetooth connection with an Android phone to an Atmega with Arduino (An electronic micro-controller). I can receive and send data to the micro-controller but the bluetooth need to be put at ON before lunching my application or it will hang and close. I do check for a bl... | 2013/02/05 | [
"https://Stackoverflow.com/questions/14698847",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2041450/"
] | You have all your code in onResume. onResume is going to get called right at startup of the activity, so it will execute almost immediately. I don't see any code in there that should delay it at all. If you don't want to try to connect until the user selects something, then all the connection code should be in a button... | In addition to @GabeSechan's comment about all of your code being in `onResume()`, you are also calling the Bluetooth `connect()` in your main activity thread which according to the [this documentation](http://developer.android.com/guide/topics/connectivity/bluetooth.html#ConnectingAsAClient) is a blocking call and "sh... |
54,351,138 | :) I have a problem I can't solve myself( I tried a lot with `time.time()` but I never solved my problem).
I would like my program to exit and stop waiting for finger if 15 seconds passed. I would be really happy and grateful if someone knows how to do it in python!
Thank you very much! Ask me if there are any questio... | 2019/01/24 | [
"https://Stackoverflow.com/questions/54351138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10932588/"
] | As LENGTH is supposed to be a compile time constant (C++, no C99 VLA), `foo` is just going to use space on the stack. Very fast. | "Allocating" an object of primitive data type and with automatic storage duration is usually not a big deal. The question is more: Do you want that the contents of `foo` to survive the execution of the function or not?
Consider, for example, following function:
```
char* bar() {
char foo[LENGTH];
strcpy(foo, "H... |
54,351,138 | :) I have a problem I can't solve myself( I tried a lot with `time.time()` but I never solved my problem).
I would like my program to exit and stop waiting for finger if 15 seconds passed. I would be really happy and grateful if someone knows how to do it in python!
Thank you very much! Ask me if there are any questio... | 2019/01/24 | [
"https://Stackoverflow.com/questions/54351138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10932588/"
] | As LENGTH is supposed to be a compile time constant (C++, no C99 VLA), `foo` is just going to use space on the stack. Very fast. | First off, time to allocate automatic array of char is not dependent on it's size, and on any sane implementation is a constant time complexity of incrementing stack pointer, which is superfast. Please note, this would be the same even for VLA (which are not valid in C++), only that increment would be a run-time operan... |
54,351,138 | :) I have a problem I can't solve myself( I tried a lot with `time.time()` but I never solved my problem).
I would like my program to exit and stop waiting for finger if 15 seconds passed. I would be really happy and grateful if someone knows how to do it in python!
Thank you very much! Ask me if there are any questio... | 2019/01/24 | [
"https://Stackoverflow.com/questions/54351138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10932588/"
] | First off, time to allocate automatic array of char is not dependent on it's size, and on any sane implementation is a constant time complexity of incrementing stack pointer, which is superfast. Please note, this would be the same even for VLA (which are not valid in C++), only that increment would be a run-time operan... | "Allocating" an object of primitive data type and with automatic storage duration is usually not a big deal. The question is more: Do you want that the contents of `foo` to survive the execution of the function or not?
Consider, for example, following function:
```
char* bar() {
char foo[LENGTH];
strcpy(foo, "H... |
4,670,992 | I am trying to use a script for custom styled select boxes, and as I have plenty entries inside one of select box I need to make but am stuck in creation of scrolling function ( a script that counts the number items and if it's over X then need to bre some Overflow attribute to the UL that the script is creating.) any ... | 2011/01/12 | [
"https://Stackoverflow.com/questions/4670992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/573006/"
] | PHP5s magic method `__get($key)` and `__set($key, $value)` might be what you need. More information about them is available in the [PHP manual](http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members). | You are probably heading in the wrong direction. You normally want to define a getter `getLazyVar()`. There is a reason why people always make properties protected and defined getters / setters: So they can pre- or postprocess the values. |
4,670,992 | I am trying to use a script for custom styled select boxes, and as I have plenty entries inside one of select box I need to make but am stuck in creation of scrolling function ( a script that counts the number items and if it's over X then need to bre some Overflow attribute to the UL that the script is creating.) any ... | 2011/01/12 | [
"https://Stackoverflow.com/questions/4670992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/573006/"
] | This sounds like PHP5.3: lambda / closures / anonymous functions
<http://php.net/manual/en/functions.anonymous.php>:
```
<?php
$greet = function($name) {
printf("Hello %s\r\n", $name);
};
$greet('World');
$greet('PHP');
?>
``` | You are probably heading in the wrong direction. You normally want to define a getter `getLazyVar()`. There is a reason why people always make properties protected and defined getters / setters: So they can pre- or postprocess the values. |
25,948,261 | I am trying to select a row in one table and if it does exists in the second table,do something and if it doesn't,copy the values from table one into the second.
The problem is that,once it finds match (a row that is present in the first and second table),it shows errors for all other rows that did not match.
This is... | 2014/09/20 | [
"https://Stackoverflow.com/questions/25948261",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | It would be appear that your on the right track from the update you got. But it would also seem you have a few issues also, then just the stated problem
try adding your code into a catch and echo out message from paypal
```
try{
//your code here
}
catch(PayPal\Exception\PayPalConnectionException $e) {
//This wil... | **Add this**
...
```
$transaction->setDescription("Payment description")
```
... |
25,948,261 | I am trying to select a row in one table and if it does exists in the second table,do something and if it doesn't,copy the values from table one into the second.
The problem is that,once it finds match (a row that is present in the first and second table),it shows errors for all other rows that did not match.
This is... | 2014/09/20 | [
"https://Stackoverflow.com/questions/25948261",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I found the answer, we need more details for create a transaction, and you have to set correct number to subTotal(), total() etc...
```
Each price item * Quantity = Subtotal
Subtotal +- Tax, Shipping etc... = total
```
This is what I have :
```
$sdkConfig = array(
"mode" => "sandbox"
)... | **Add this**
...
```
$transaction->setDescription("Payment description")
```
... |
25,948,261 | I am trying to select a row in one table and if it does exists in the second table,do something and if it doesn't,copy the values from table one into the second.
The problem is that,once it finds match (a row that is present in the first and second table),it shows errors for all other rows that did not match.
This is... | 2014/09/20 | [
"https://Stackoverflow.com/questions/25948261",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | It would be appear that your on the right track from the update you got. But it would also seem you have a few issues also, then just the stated problem
try adding your code into a catch and echo out message from paypal
```
try{
//your code here
}
catch(PayPal\Exception\PayPalConnectionException $e) {
//This wil... | I found the answer, we need more details for create a transaction, and you have to set correct number to subTotal(), total() etc...
```
Each price item * Quantity = Subtotal
Subtotal +- Tax, Shipping etc... = total
```
This is what I have :
```
$sdkConfig = array(
"mode" => "sandbox"
)... |
46,585 | I heard so many sentences that are begun with 'Typically' or 'In particular' while I do not even know what the exact meaning of them is.
What are simply the differences between these sentences below?
>
> **Typically**, mouse needs more physical space
>
>
> **In particular**, mouse needs more physical space
>
>
>... | 2015/01/13 | [
"https://ell.stackexchange.com/questions/46585",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/-1/"
] | In
>
> **Typically**, *a* mouse needs more physical space.
>
>
>
Here *typically* means *most of the time* or *usually*
But in
>
> **In particular**, *a* mouse needs more physical space.
>
>
>
*in particular* means *specifically*. You are pointing out the importance of this condition compared with others m... | The first one means *Usually* or *most often*:
>
> Mice usually need more space.
>
>
>
The second one means *compared to (something)*:
>
> Mice, **more than other animals,** need more space.
>
>
>
So, mice, compared to something. Maybe more than other lab animals. Maybe more than other mammals, etc. |
32,652,959 | I have written a python script to append href attribute and tag to a string holding a url which is in a csv file. The problem is that the result is not as expected. The resulted html string has got an extra double quote instead of single. Any suggestion how to fix this?
Below is the snippet:
```
InputFile = open('dat... | 2015/09/18 | [
"https://Stackoverflow.com/questions/32652959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4681604/"
] | This is correct behaviour. Double quotes are escaped inside csv value.
If you want to output without escaping try [csv.QUOTE\_NONE](https://docs.python.org/3.3/library/csv.html)
```
csv.writer(OutputFile, delimiter=',', quotechar='\"', quoting=csv.QUOTE_NONE)
``` | I ran into this when trying to store a JSON object as a string in a column in a csv. I had single quotes around a string filled with double quotes.
my row of data looked like
```
['foo', 'bar', '{"foo":"bar". "bar":"foo"}']
```
Doing this solved it for me
```
writer = csv.writer(csv_file, delimiter=',', quotechar="... |
32,652,959 | I have written a python script to append href attribute and tag to a string holding a url which is in a csv file. The problem is that the result is not as expected. The resulted html string has got an extra double quote instead of single. Any suggestion how to fix this?
Below is the snippet:
```
InputFile = open('dat... | 2015/09/18 | [
"https://Stackoverflow.com/questions/32652959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4681604/"
] | This is correct behaviour. Double quotes are escaped inside csv value.
If you want to output without escaping try [csv.QUOTE\_NONE](https://docs.python.org/3.3/library/csv.html)
```
csv.writer(OutputFile, delimiter=',', quotechar='\"', quoting=csv.QUOTE_NONE)
``` | For those who are having a `"Error: need to escape"` error:
Try this:
```
writer = csv.writer(f, quoting=csv.QUOTE_NONE, delimiter='|', quotechar='',escapechar='\\')
``` |
32,652,959 | I have written a python script to append href attribute and tag to a string holding a url which is in a csv file. The problem is that the result is not as expected. The resulted html string has got an extra double quote instead of single. Any suggestion how to fix this?
Below is the snippet:
```
InputFile = open('dat... | 2015/09/18 | [
"https://Stackoverflow.com/questions/32652959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4681604/"
] | I ran into this when trying to store a JSON object as a string in a column in a csv. I had single quotes around a string filled with double quotes.
my row of data looked like
```
['foo', 'bar', '{"foo":"bar". "bar":"foo"}']
```
Doing this solved it for me
```
writer = csv.writer(csv_file, delimiter=',', quotechar="... | For those who are having a `"Error: need to escape"` error:
Try this:
```
writer = csv.writer(f, quoting=csv.QUOTE_NONE, delimiter='|', quotechar='',escapechar='\\')
``` |
56,558,424 | I have a "todo list" (mostly "borrowed" from W3) where the user can enter data, and the data is then listed as a "li" object on the site. I want to store the data that the user inputs to a file, so that if the user refreshes, the items on the list will re-appear as they were.
I'm running this locally, so I preferably ... | 2019/06/12 | [
"https://Stackoverflow.com/questions/56558424",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8562999/"
] | I don't think this is a bug. Everyone says that you have to highlight all of the code to extract it, and it worked with them, but for me, I've made it like this.
First I put the cursor at the specific widget.
[](https://i.stack.imgur.com/Szp28.png)
... | Ensure Two Steps:
1. Your Code is 'Dart Formatted' (if using AndroidStudio, else regular formatted with appropriate commas if using VSCode), and
2. Your Cursor is at the beginning of the widget code block that you want to extract as a widget. Cursor position is the only problem here. Even after selecting the entire co... |
15,355,051 | Since i want the app to run in both ios 5 as well as in ios 6 ,I am trying to run the app in ios 5 which is working perfectly in ios 6 as i have used the autolayout feature but when i use to run the app in ios 5 it crashes since autolayout feature is not available in previous versions of ios .Is there any solution to f... | 2013/03/12 | [
"https://Stackoverflow.com/questions/15355051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1999748/"
] | If you want to run your app in iOS 5 then you have to turn off the **Autolayout feature**.
You can do that from Interface builder.
For more help you can refer [this](http://yashesh87.wordpress.com/2012/08/22/solved-iphone-app-crash-in-ios-5-1-1-or-below-when-you-have-developed-it-on-xcode-4-5-developer-preview/). | 1. **You Need to unCheck the Auto Layout.**

2. **And make sure you are changing here also.. select ios 5.1**
 |
15,355,051 | Since i want the app to run in both ios 5 as well as in ios 6 ,I am trying to run the app in ios 5 which is working perfectly in ios 6 as i have used the autolayout feature but when i use to run the app in ios 5 it crashes since autolayout feature is not available in previous versions of ios .Is there any solution to f... | 2013/03/12 | [
"https://Stackoverflow.com/questions/15355051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1999748/"
] | If you want to run your app in iOS 5 then you have to turn off the **Autolayout feature**.
You can do that from Interface builder.
For more help you can refer [this](http://yashesh87.wordpress.com/2012/08/22/solved-iphone-app-crash-in-ios-5-1-1-or-below-when-you-have-developed-it-on-xcode-4-5-developer-preview/). | You have to use `AutoResizing` mask for your view instead of `autolayouts` since autolayouts are supported iOS 6 onwards.Check the example below |
15,355,051 | Since i want the app to run in both ios 5 as well as in ios 6 ,I am trying to run the app in ios 5 which is working perfectly in ios 6 as i have used the autolayout feature but when i use to run the app in ios 5 it crashes since autolayout feature is not available in previous versions of ios .Is there any solution to f... | 2013/03/12 | [
"https://Stackoverflow.com/questions/15355051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1999748/"
] | If you want to run your app in iOS 5 then you have to turn off the **Autolayout feature**.
You can do that from Interface builder.
For more help you can refer [this](http://yashesh87.wordpress.com/2012/08/22/solved-iphone-app-crash-in-ios-5-1-1-or-below-when-you-have-developed-it-on-xcode-4-5-developer-preview/). | If you are using iOS 6 or later , then u can create a separate xib for the iphone 5 called **Retina 4 Full screen**. You need to check this in your `ViewController` Size. Also to check for for both of these xib's . That means to run either of your xib's in iphone 5 or lower versions use these conditions whether in the ... |
49,494,114 | So, I've stumbled upon a strange CSS behaviour trying to override nth-child
Consider the following example
```css
li:nth-child(2n+1){
color: red;
font-weight:normal;
}
.hmm{
color:green;
font-weight:bold;
}
```
```html
<ul>
<li class="hmm">HMM</li>
<li>test</li>
<li class="hmm"... | 2018/03/26 | [
"https://Stackoverflow.com/questions/49494114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2963652/"
] | This is because of [Specificity](https://css-tricks.com/specifics-on-css-specificity/). Like more general rules will be overridden by more specific rules. `li:nth-child` is more specific than `.hmm`. So just increase the specificity of `.hmm` by adding `li.hmm`
```css
li:nth-child(2n+1){
color: red;
font-weight:... | Type selectors (e.g., `h1`) and pseudo-elements (e.g., `::before`) are the first ones in the order.
After them you have class selectors (e.g., `.example`), attributes selectors (e.g., `[type="radio"]`)
Some useful link <https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity> |
49,494,114 | So, I've stumbled upon a strange CSS behaviour trying to override nth-child
Consider the following example
```css
li:nth-child(2n+1){
color: red;
font-weight:normal;
}
.hmm{
color:green;
font-weight:bold;
}
```
```html
<ul>
<li class="hmm">HMM</li>
<li>test</li>
<li class="hmm"... | 2018/03/26 | [
"https://Stackoverflow.com/questions/49494114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2963652/"
] | This is because of [Specificity](https://css-tricks.com/specifics-on-css-specificity/). Like more general rules will be overridden by more specific rules. `li:nth-child` is more specific than `.hmm`. So just increase the specificity of `.hmm` by adding `li.hmm`
```css
li:nth-child(2n+1){
color: red;
font-weight:... | Since the CSS rule has specificity. Means the precedence rule. The element and class have different specificity. Element and pseudo-elements have higher priority so its css rules have precedence over classes. My solution is
```
<style>
li:nth-child(2n + 1){
font-weight:normal;
color : red;
}
... |
49,494,114 | So, I've stumbled upon a strange CSS behaviour trying to override nth-child
Consider the following example
```css
li:nth-child(2n+1){
color: red;
font-weight:normal;
}
.hmm{
color:green;
font-weight:bold;
}
```
```html
<ul>
<li class="hmm">HMM</li>
<li>test</li>
<li class="hmm"... | 2018/03/26 | [
"https://Stackoverflow.com/questions/49494114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2963652/"
] | Type selectors (e.g., `h1`) and pseudo-elements (e.g., `::before`) are the first ones in the order.
After them you have class selectors (e.g., `.example`), attributes selectors (e.g., `[type="radio"]`)
Some useful link <https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity> | Since the CSS rule has specificity. Means the precedence rule. The element and class have different specificity. Element and pseudo-elements have higher priority so its css rules have precedence over classes. My solution is
```
<style>
li:nth-child(2n + 1){
font-weight:normal;
color : red;
}
... |
46,265,804 | I'm using the tensorflow object detection tutorial and everything works great. I get the right number of detected objects. I'm having some issues trying to find a way to count the detected objects and print out the number.
I've looked around the community and found that someone has done it with boxes.shape[0] however... | 2017/09/17 | [
"https://Stackoverflow.com/questions/46265804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7513765/"
] | ```
taco = [category_index.get(value) for index,value in enumerate(classes[0]) if scores[0,index] > 0.5]
print(len(taco))
``` | The `num` variable should contain the number of detected boxes. |
32,329,224 | I use a random for browse list I do like this:
```
var oServer = new SmtpServer("");
var random = new Random();
var randomIndex = random.Next(list.Count());
var socks = list[randomIndex];
oServer.SocksProxyServer = socks.IpAddress.ToString();
oServer.SocksProxyPort = socks.Port;
```
I want that if value selected, w... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32329224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5284099/"
] | If you *can't remove* from `list` itself, remove from `possibleIndexes`:
```
private static random = new Random();
...
List<int> possibleIndexes = Enumerable
.Range(0, list.Count())
.ToList();
...
int idx = random.Next(possibleIndexes.Count());
int index = possibleIndexes[idx];
possibleIndexes.RemoveAt(idx);
va... | Just remove the item from the list if you don't want to use it again:
```
var socks = list[randomIndex];
list.RemoveAt(randomIndex);
``` |
32,329,224 | I use a random for browse list I do like this:
```
var oServer = new SmtpServer("");
var random = new Random();
var randomIndex = random.Next(list.Count());
var socks = list[randomIndex];
oServer.SocksProxyServer = socks.IpAddress.ToString();
oServer.SocksProxyPort = socks.Port;
```
I want that if value selected, w... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32329224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5284099/"
] | Just remove the item from the list if you don't want to use it again:
```
var socks = list[randomIndex];
list.RemoveAt(randomIndex);
``` | If you don't want to lose data in orginal list first copy the list to another one then remove item from your copy list
```
var copyList=new List<yourListType>();
copyList.AddRange(list);//copy form your orginal list
var socks = copyList[randomIndex];
copyList.RemoveAt(randomIndex);
```... |
32,329,224 | I use a random for browse list I do like this:
```
var oServer = new SmtpServer("");
var random = new Random();
var randomIndex = random.Next(list.Count());
var socks = list[randomIndex];
oServer.SocksProxyServer = socks.IpAddress.ToString();
oServer.SocksProxyPort = socks.Port;
```
I want that if value selected, w... | 2015/09/01 | [
"https://Stackoverflow.com/questions/32329224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5284099/"
] | If you *can't remove* from `list` itself, remove from `possibleIndexes`:
```
private static random = new Random();
...
List<int> possibleIndexes = Enumerable
.Range(0, list.Count())
.ToList();
...
int idx = random.Next(possibleIndexes.Count());
int index = possibleIndexes[idx];
possibleIndexes.RemoveAt(idx);
va... | If you don't want to lose data in orginal list first copy the list to another one then remove item from your copy list
```
var copyList=new List<yourListType>();
copyList.AddRange(list);//copy form your orginal list
var socks = copyList[randomIndex];
copyList.RemoveAt(randomIndex);
```... |
57,535,736 | I am trying to make a connection to a database and would like to see that my code stops executing while the connection has not been established yet. So it can print an error/success message to the console at the right time (before the program will output that startup was successful).
My current code to establish the c... | 2019/08/17 | [
"https://Stackoverflow.com/questions/57535736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10754437/"
] | You **must** use `wxPaintDC` when drawing in your `wxEVT_PAINT` handler, not `wxClientDC`. While `wxClientDC` also "works", at least for now and at least under some platforms, this is definitely not the right way to do it.
When using `wxPaintDC`, `Refresh()` would work as expected and will result in a call to your pai... | I solved this problem by myself.
As `wxPanel` is the only child of `wxFrame`, it will automatically cover the whole area of `wxFrame`. Now drawing on `wxFrame` is necessarily having no effect. So I have to draw on `wxPanel`:
```
void paintNow(wxCommandEvent& event) {
wxClientDC bdc =wxClientDC(panel);
... |
1,065,153 | I'd like to scan a variables that form vectors from white space delimited text file and the stumbling block (all to often for me) is lack of elegance.
Currently my scanning code requires delineating the size of the vector as the first element in the file:
```
7 : 1 3 6 8 -9 .123 1.1
```
Which bothers me because the... | 2009/06/30 | [
"https://Stackoverflow.com/questions/1065153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32836/"
] | what's wrong with something like:
```
int scan_vector(FILE *fh)
{
char pad[2];
int i;
if (fscanf(fh,"%d %1[:]", &v.Length, &pad) != 2)
return -1;
v.value = malloc(v.Length * sizeof(double));
for (i = 0; i < v.Length; i++) {
if (fscanf(fh, "%lf", &v.value[i]) != 1)
return... | If you use [`realloc()`](http://www.cplusplus.com/reference/clibrary/cstdlib/realloc/) you can always ask for more memory if you don't allocate enough with the initial `malloc()`. A common strategy is to allocate an arbitrary `n` items to start. Whenever you run out then of space you double `n` and resize the buffer.
... |
1,065,153 | I'd like to scan a variables that form vectors from white space delimited text file and the stumbling block (all to often for me) is lack of elegance.
Currently my scanning code requires delineating the size of the vector as the first element in the file:
```
7 : 1 3 6 8 -9 .123 1.1
```
Which bothers me because the... | 2009/06/30 | [
"https://Stackoverflow.com/questions/1065153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32836/"
] | what's wrong with something like:
```
int scan_vector(FILE *fh)
{
char pad[2];
int i;
if (fscanf(fh,"%d %1[:]", &v.Length, &pad) != 2)
return -1;
v.value = malloc(v.Length * sizeof(double));
for (i = 0; i < v.Length; i++) {
if (fscanf(fh, "%lf", &v.value[i]) != 1)
return... | How big can your vectors be?
One way to go is,
* scan a line into local buffer (this is one vector data I presume)
* scan over that local buffer to count the white space delimiters (quite easy to code)
* **then** make the correct allocation
* and, initialize the vector
Like you observe, the dimension `'7'` need no... |
1,065,153 | I'd like to scan a variables that form vectors from white space delimited text file and the stumbling block (all to often for me) is lack of elegance.
Currently my scanning code requires delineating the size of the vector as the first element in the file:
```
7 : 1 3 6 8 -9 .123 1.1
```
Which bothers me because the... | 2009/06/30 | [
"https://Stackoverflow.com/questions/1065153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32836/"
] | what's wrong with something like:
```
int scan_vector(FILE *fh)
{
char pad[2];
int i;
if (fscanf(fh,"%d %1[:]", &v.Length, &pad) != 2)
return -1;
v.value = malloc(v.Length * sizeof(double));
for (i = 0; i < v.Length; i++) {
if (fscanf(fh, "%lf", &v.value[i]) != 1)
return... | Here's a version which doesn't need the vector's size as first entry in the file:
```
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define LINE_MAX 256
#define VECTOR_SIZE_MAX 32
struct vector
{
size_t size;
double *values;
};
// returns 1 on error
_Bool scan_vector(FILE *fi... |
49,276,431 | ```
#include<iostream>
#include<string.h>
using namespace std;
int main() {
char b[] = {'a','b',' ','c'};
cout << sizeof(b) << endl;
cout << strlen(b) << endl;
return 0;
}
```
Why the above output is 4,6 isnt that 4,4 is the correct answer? | 2018/03/14 | [
"https://Stackoverflow.com/questions/49276431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8494948/"
] | The behaviour of your code is undefined: `strlen` requires that `b` **must** contain a `NUL` character within the bounds of the array.
(Note that `' '` is a space, **not** `NUL`. A space is processed no differently by `strlen` to any other non-`NUL` character.)
If you had written
```
char b[5]={'a','b',' ','c'};
`... | Your code exhibits *undefined behavior*:
The behavior of `strlen` is not defined if the argument passed to it is not `NUL`-terminated.
You seem to confuse the NUL character with the space character. |
49,276,431 | ```
#include<iostream>
#include<string.h>
using namespace std;
int main() {
char b[] = {'a','b',' ','c'};
cout << sizeof(b) << endl;
cout << strlen(b) << endl;
return 0;
}
```
Why the above output is 4,6 isnt that 4,4 is the correct answer? | 2018/03/14 | [
"https://Stackoverflow.com/questions/49276431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8494948/"
] | The behaviour of your code is undefined: `strlen` requires that `b` **must** contain a `NUL` character within the bounds of the array.
(Note that `' '` is a space, **not** `NUL`. A space is processed no differently by `strlen` to any other non-`NUL` character.)
If you had written
```
char b[5]={'a','b',' ','c'};
`... | `strlen` traverses the array **until** it encounters a `NULL` character. Your array does not contain `NULL` characters (ASCII 0) but it contains a space (ASCII 32).
So `strlen` continues **past** your array. It happens to exist a `NULL` character at position 6 (two characters after the end of the array in memory), so ... |
49,276,431 | ```
#include<iostream>
#include<string.h>
using namespace std;
int main() {
char b[] = {'a','b',' ','c'};
cout << sizeof(b) << endl;
cout << strlen(b) << endl;
return 0;
}
```
Why the above output is 4,6 isnt that 4,4 is the correct answer? | 2018/03/14 | [
"https://Stackoverflow.com/questions/49276431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8494948/"
] | The behaviour of your code is undefined: `strlen` requires that `b` **must** contain a `NUL` character within the bounds of the array.
(Note that `' '` is a space, **not** `NUL`. A space is processed no differently by `strlen` to any other non-`NUL` character.)
If you had written
```
char b[5]={'a','b',' ','c'};
`... | >
> what does strlen do if it enounter a space in between char array?
>
>
>
While all the other answers (according to your code sample, legitimately!!!) hint to the undefined behaviour due to the missing null character within your array, I'll be answering your original question:
Nothing special, it will count the... |
49,276,431 | ```
#include<iostream>
#include<string.h>
using namespace std;
int main() {
char b[] = {'a','b',' ','c'};
cout << sizeof(b) << endl;
cout << strlen(b) << endl;
return 0;
}
```
Why the above output is 4,6 isnt that 4,4 is the correct answer? | 2018/03/14 | [
"https://Stackoverflow.com/questions/49276431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8494948/"
] | Your code exhibits *undefined behavior*:
The behavior of `strlen` is not defined if the argument passed to it is not `NUL`-terminated.
You seem to confuse the NUL character with the space character. | `strlen` traverses the array **until** it encounters a `NULL` character. Your array does not contain `NULL` characters (ASCII 0) but it contains a space (ASCII 32).
So `strlen` continues **past** your array. It happens to exist a `NULL` character at position 6 (two characters after the end of the array in memory), so ... |
49,276,431 | ```
#include<iostream>
#include<string.h>
using namespace std;
int main() {
char b[] = {'a','b',' ','c'};
cout << sizeof(b) << endl;
cout << strlen(b) << endl;
return 0;
}
```
Why the above output is 4,6 isnt that 4,4 is the correct answer? | 2018/03/14 | [
"https://Stackoverflow.com/questions/49276431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8494948/"
] | Your code exhibits *undefined behavior*:
The behavior of `strlen` is not defined if the argument passed to it is not `NUL`-terminated.
You seem to confuse the NUL character with the space character. | >
> what does strlen do if it enounter a space in between char array?
>
>
>
While all the other answers (according to your code sample, legitimately!!!) hint to the undefined behaviour due to the missing null character within your array, I'll be answering your original question:
Nothing special, it will count the... |
40,102,554 | I uploaded an image to assets folder and assigned the image to 1x, 2x and 3x.
selected the table view controller of the respective tab bar item -> selected the Attributes -> assigned the image to the image field in the Bar Items section.
After running the application a Blue Square box is showing up on selection and ... | 2016/10/18 | [
"https://Stackoverflow.com/questions/40102554",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3696729/"
] | Go to Assets folder.
Select your tab image.
On the right side under Attributes you will find "Render As".
Select "Original Image". | [](https://i.stack.imgur.com/1SdX0.png)
First drop your image in the Assets or Images section then click on the image and show to option for Render As in the right side menu. So change the option from default to Original Image same as shown in... |
40,102,554 | I uploaded an image to assets folder and assigned the image to 1x, 2x and 3x.
selected the table view controller of the respective tab bar item -> selected the Attributes -> assigned the image to the image field in the Bar Items section.
After running the application a Blue Square box is showing up on selection and ... | 2016/10/18 | [
"https://Stackoverflow.com/questions/40102554",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3696729/"
] | Go to Assets folder.
Select your tab image.
On the right side under Attributes you will find "Render As".
Select "Original Image". | add tab bar item under view controller, if you embed in view controller in navigation controller tab bar item must be come under Navigation controller.
* View controller when icon not shown
 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.