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 |
|---|---|---|---|---|---|
5,988,700 | Hello i want to parse xml.Please help me.Here is my node
```
<RadioButton id="1" name="Gender">
<Item>Male</Item>
<Item>Female</Item>
</RadioButton>
```
i want to parse and i want to create comma separated string | 2011/05/13 | [
"https://Stackoverflow.com/questions/5988700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/681605/"
] | Here are releated the SO post,
[Parser XML with NSXMLParser](https://stackoverflow.com/questions/4209860/parser-xml-with-nsxmlparser)
<http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project>
[NSXMLParser example](https://stackoverflow.com/questions/4705588/nsxmlparser-example)
bel... | <http://sivatechranti.wordpress.com/2010/03/05/parsing-xml-on-iphone/>
easy to explain
anonter site very useful
<http://mac.softpedia.com/progDownload/TouchXML-Download-47225.html>
direct download...and see this project and implemant in yr project and drag in your project and use directly..... |
20,509,235 | I am creating a game that ends when the timer is up and a new end game view appears I have not been able to get the view to switch to the next view in the story board when time expires, all that appears is a black screen. This is the code where it switches view controllers
```
- (void)subtractTime {
// 1
secon... | 2013/12/11 | [
"https://Stackoverflow.com/questions/20509235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1828081/"
] | So for anyone who happens to stumble upon this in the future, if you utilized a collectionView to render elements in a dynamic segment instead of a handlebars each statement, be sure to set the 'contentBinding' property like this
```
App.MyCollectionView = Ember.CollectionView.extend({
contentBinding:"controller... | elements are cached, so didInsertElement doesn't refire. set up a jsbin at emberjs.jsbin.com for more help. |
2,104,791 | I don't know how can I make a correct proof about the following statement:
$T\_{n}= [0,1-\frac{1}{n}]$
$\bigcup\_{n\in \mathbb{N}}^{ } T\_{n}=[0,1)$
I understand the logic, but I don't know how can I prove it in a formal way. | 2017/01/19 | [
"https://math.stackexchange.com/questions/2104791",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/408377/"
] | Since $T\_n\subset[0,1)$ for every $n\in\Bbb N$, then $\bigcup\_{n\in\Bbb N}T\_n\subset[0,1)$. This is trivial. Let us prove the converse inclusion. To this end take $x\in[0,1)$. Bacause $\lim\limits\_{n\to\infty}\left(1-\dfrac{1}{n}\right)=1$, there exists $n\in\Bbb N$ s.t. $0\le x\le 1-\dfrac{1}{n}$. Hence $x\in T\_n... | We can show that $\cup\_{n \in \mathbb{N}}T\_n$ is a subset of $[0,1)$ and vice versa, as Fabio Somenzi suggests in his comment.
First, let $x \in \cup\_{n \in \mathbb{N}}T\_n$. Thus there exists an $n$ such that $x \in T\_n$, i.e. such that $x \leq 1 - \frac{1}{n}$. This implies that $x < 1$, so that $x \in [0,1)$. ... |
2,109 | Maybe it's just my impression, but I have the impression that DRM questions are quite tendentious on this site.
Currently I am [reviewing this question](https://security.stackexchange.com/review/close/66172) which is about how one could limit the number of times a flash disk is being used. I remember having seen a lot... | 2015/12/23 | [
"https://security.meta.stackexchange.com/questions/2109",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/32746/"
] | DRM itself as a topic, absolutely is in scope here.
Questions on DRM, however, may be difficult to ask here, as DRM itself is fundamentally useless for most implementations - such as preventing piracy - and if we exclude environments where every piece of hardware and every access is completely controlled, it just does... | I'm going to agree and disagree with Rory. I agree that DRM questions are on-topic. I disagree that asking questions about the ability of DRM aren't of any value.
DRM is often a failing game depending on who you're trying to protect your thing from. But much of the world is still convinced that you can somehow have p... |
2,109 | Maybe it's just my impression, but I have the impression that DRM questions are quite tendentious on this site.
Currently I am [reviewing this question](https://security.stackexchange.com/review/close/66172) which is about how one could limit the number of times a flash disk is being used. I remember having seen a lot... | 2015/12/23 | [
"https://security.meta.stackexchange.com/questions/2109",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/32746/"
] | DRM itself as a topic, absolutely is in scope here.
Questions on DRM, however, may be difficult to ask here, as DRM itself is fundamentally useless for most implementations - such as preventing piracy - and if we exclude environments where every piece of hardware and every access is completely controlled, it just does... | I disagree with the characterization this the question is about DRM. I agree that the question is tangentially related to DRM, and hence security and therefore on topic, but the question as asked is about how it would be possible to implement a feature over USB, which is a function of the USB drivers, the OS, and then ... |
2,109 | Maybe it's just my impression, but I have the impression that DRM questions are quite tendentious on this site.
Currently I am [reviewing this question](https://security.stackexchange.com/review/close/66172) which is about how one could limit the number of times a flash disk is being used. I remember having seen a lot... | 2015/12/23 | [
"https://security.meta.stackexchange.com/questions/2109",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/32746/"
] | DRM itself as a topic, absolutely is in scope here.
Questions on DRM, however, may be difficult to ask here, as DRM itself is fundamentally useless for most implementations - such as preventing piracy - and if we exclude environments where every piece of hardware and every access is completely controlled, it just does... | The querent appears to be primarily asking for DRM-like functionality, but wrapped in a specific question regarding USB flash drives. Telling them to ask over on SuperUser may get them a direct technical answer, like "USB doesn't support auto-erase". But if they are actually trying to prevent copying, that won't help t... |
2,109 | Maybe it's just my impression, but I have the impression that DRM questions are quite tendentious on this site.
Currently I am [reviewing this question](https://security.stackexchange.com/review/close/66172) which is about how one could limit the number of times a flash disk is being used. I remember having seen a lot... | 2015/12/23 | [
"https://security.meta.stackexchange.com/questions/2109",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/32746/"
] | I disagree with the characterization this the question is about DRM. I agree that the question is tangentially related to DRM, and hence security and therefore on topic, but the question as asked is about how it would be possible to implement a feature over USB, which is a function of the USB drivers, the OS, and then ... | I'm going to agree and disagree with Rory. I agree that DRM questions are on-topic. I disagree that asking questions about the ability of DRM aren't of any value.
DRM is often a failing game depending on who you're trying to protect your thing from. But much of the world is still convinced that you can somehow have p... |
2,109 | Maybe it's just my impression, but I have the impression that DRM questions are quite tendentious on this site.
Currently I am [reviewing this question](https://security.stackexchange.com/review/close/66172) which is about how one could limit the number of times a flash disk is being used. I remember having seen a lot... | 2015/12/23 | [
"https://security.meta.stackexchange.com/questions/2109",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/32746/"
] | I'm going to agree and disagree with Rory. I agree that DRM questions are on-topic. I disagree that asking questions about the ability of DRM aren't of any value.
DRM is often a failing game depending on who you're trying to protect your thing from. But much of the world is still convinced that you can somehow have p... | The querent appears to be primarily asking for DRM-like functionality, but wrapped in a specific question regarding USB flash drives. Telling them to ask over on SuperUser may get them a direct technical answer, like "USB doesn't support auto-erase". But if they are actually trying to prevent copying, that won't help t... |
2,109 | Maybe it's just my impression, but I have the impression that DRM questions are quite tendentious on this site.
Currently I am [reviewing this question](https://security.stackexchange.com/review/close/66172) which is about how one could limit the number of times a flash disk is being used. I remember having seen a lot... | 2015/12/23 | [
"https://security.meta.stackexchange.com/questions/2109",
"https://security.meta.stackexchange.com",
"https://security.meta.stackexchange.com/users/32746/"
] | I disagree with the characterization this the question is about DRM. I agree that the question is tangentially related to DRM, and hence security and therefore on topic, but the question as asked is about how it would be possible to implement a feature over USB, which is a function of the USB drivers, the OS, and then ... | The querent appears to be primarily asking for DRM-like functionality, but wrapped in a specific question regarding USB flash drives. Telling them to ask over on SuperUser may get them a direct technical answer, like "USB doesn't support auto-erase". But if they are actually trying to prevent copying, that won't help t... |
317,904 | I like electronics but I basically don't know anything about it (electricity is too complex), the thing is that I've opened a battery from an old laptop that reads "10.8 V 4300 mAh Li-ion"
The battery-pack contains other 6 batteries and a circuit inside, I suppose that the circuit is just for showing battery info in t... | 2017/07/17 | [
"https://electronics.stackexchange.com/questions/317904",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/156156/"
] | If you know nothing about them then be aware that some batteries are not designed to be recharged and can explode if charging is attempted.
For rechargable batteries there is a different charging scheme for each technology. Do it wrong and the battery is likely to explode or catch fire.
I strongly urge that, since ... | **It is not safe to charge them anymore.**
If Lithium batteries drop below a certain voltage, it is dangerous to recharge them. That small board that you have seen has many utilities. It cuts the current to ensure that you never discharge your battery more than this level plus a security margin. It also prevents you t... |
317,904 | I like electronics but I basically don't know anything about it (electricity is too complex), the thing is that I've opened a battery from an old laptop that reads "10.8 V 4300 mAh Li-ion"
The battery-pack contains other 6 batteries and a circuit inside, I suppose that the circuit is just for showing battery info in t... | 2017/07/17 | [
"https://electronics.stackexchange.com/questions/317904",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/156156/"
] | You have a standard 2P (two parallel) and 3S (3 in series) laptop battery. And yes, all laptop batteries are made of standard cells, from variants of 18650 or 17650 cells. Or flat proprietary cells.
As Simon noted, you have one dead section. While the chances to recover full functionality are small, you can try.
You ... | **It is not safe to charge them anymore.**
If Lithium batteries drop below a certain voltage, it is dangerous to recharge them. That small board that you have seen has many utilities. It cuts the current to ensure that you never discharge your battery more than this level plus a security margin. It also prevents you t... |
57,286,622 | ```
import React from 'react';
const ImageList = ({ image }) => {
const imgs = image.map(img => (
<img
key={img.id}
src={img.urls.regular}
/>
));
return (
<div>
{' '}
{imgs}
{' '}
</div>
);
};
export default ImageList;
```
Ill like to add another component that ... | 2019/07/31 | [
"https://Stackoverflow.com/questions/57286622",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11336281/"
] | `<textarea>` elements are for user input. `readonly` is designed to be a temporary state for something which *is* used for user input but might be frozen for some reason.
Use `<code>` (possibly combined with `<pre>`). | Using `<code>` is the right solution. If ever there is a fitting HTML tag for a purpose just use it. The browser and screen reader will convert that into helpful information for the user. ARIA as stated by the W3C should only be used if no HTML solution is available. ARIA will force a kind of behaviour. This is often u... |
30,798,669 | For the below xml , how do i get the the specific values using javascript. For ex : Value of num-chords in D3410
```
<?xml version="1.0" ?>
<product-info>
<!-- II and III -->
<D3410 desc="xx" product-type="Gas" num-chords="1" flow-profile-corr="true" diag-func-end-ver="624" reg-def="D3410.xml" />
</model-info... | 2015/06/12 | [
"https://Stackoverflow.com/questions/30798669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4874288/"
] | The first one stores the same object reference in all 100 slots of the array.
The second version creates 100 different objects, and store them (the reference to these objects) in the array.
First one: 1 object, 100 references
Second one: 100 objects, 100 references?
It's definitely not the same thing. | In the second approach, in each iteration you are going to instantiate a new object which also needs it's own space in memory. While in the first approach you are referencing always the same object in memory.
So there is a big difference regarding memory allocation. This is with respect to Java and the `add` method st... |
30,798,669 | For the below xml , how do i get the the specific values using javascript. For ex : Value of num-chords in D3410
```
<?xml version="1.0" ?>
<product-info>
<!-- II and III -->
<D3410 desc="xx" product-type="Gas" num-chords="1" flow-profile-corr="true" diag-func-end-ver="624" reg-def="D3410.xml" />
</model-info... | 2015/06/12 | [
"https://Stackoverflow.com/questions/30798669",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4874288/"
] | The first one stores the same object reference in all 100 slots of the array.
The second version creates 100 different objects, and store them (the reference to these objects) in the array.
First one: 1 object, 100 references
Second one: 100 objects, 100 references?
It's definitely not the same thing. | Extending to Gosu answer, adding the object to array using fist method will not be of any practical use because if you change value of any of the object in array, it will get changed for all 100 item, because of being reference type.
And yes, it is same for both Java and c# |
1,559,870 | Let $f(x)\in\mathbb Z[x]$ and integer $k>1$ such that $f(n)$ is a perfect $k$-th power for every positive integer $n$. Is it true that there is a $g(x)\in\mathbb Z[x]$ such that $f(x)=\left(g(x)\right)^k$ ?
If not , then does the stronger assumption , $f(n)$ is a perfect $k$-th power for every integer $n$ implies the... | 2015/12/04 | [
"https://math.stackexchange.com/questions/1559870",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Perhaps there exist a simpler answer.(I think that what follows is in Polya-Szego, but I am not sure).
We work first in $\mathbb{Q}[x]$.
1) Suppose first that we have $f(x)=c^k x^{mk}+\cdots$. Define $\displaystyle h\_1(x)=\frac{f(x)}{c^k x^{mk}}=1+\frac{a\_1}{x}+\cdots+\frac{a\_{mk}}{x^{mk}}$. We have that all $a\_k... | Let $f\in\Bbb{Z}[x]$ with roots $\alpha\_1,\ldots,\alpha\_d\in\Bbb{C}$ and multiplicities $m\_1,\ldots,m\_d$, so that
$$f=c\cdot\prod\_{i=1}^d(x-\alpha\_i)^{m\_i},$$
for some $c\in\Bbb{Z}$.
For each root there are infinitely many primes that split completely in $\Bbb{Q}(\alpha\_i)$. Choose such a prime $p\_i$ for every... |
1,559,870 | Let $f(x)\in\mathbb Z[x]$ and integer $k>1$ such that $f(n)$ is a perfect $k$-th power for every positive integer $n$. Is it true that there is a $g(x)\in\mathbb Z[x]$ such that $f(x)=\left(g(x)\right)^k$ ?
If not , then does the stronger assumption , $f(n)$ is a perfect $k$-th power for every integer $n$ implies the... | 2015/12/04 | [
"https://math.stackexchange.com/questions/1559870",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Perhaps there exist a simpler answer.(I think that what follows is in Polya-Szego, but I am not sure).
We work first in $\mathbb{Q}[x]$.
1) Suppose first that we have $f(x)=c^k x^{mk}+\cdots$. Define $\displaystyle h\_1(x)=\frac{f(x)}{c^k x^{mk}}=1+\frac{a\_1}{x}+\cdots+\frac{a\_{mk}}{x^{mk}}$. We have that all $a\_k... | HINT: Let's show that the function $ x \mapsto h(x) = \sqrt[k]{f(x)}$ is a polynomial with rational coefficients. First, it takes only natural values for $n$ large enough. Second, taking the divided difference $\Delta^N h(x) \to 0$ for $x \to \infty$, provided that $N > \frac{\deg f}{k}$. Since the values of the sequen... |
17,996,874 | I have a function which works well, for converting dates from a webservice returned in json format. The webservices gives dates in the following type of format:
**Data example:** The dates look like this in the json data
```
\/Date(1373875200000)\/
```
**Current function:** This is the current function I have
```
... | 2013/08/01 | [
"https://Stackoverflow.com/questions/17996874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/364312/"
] | If you don't use a library, then you have to do some work, that is you have to put the `"0"` yourself.
Instead of simply concatenating `day`, you need to concatenate
```
(day<10 ? '0'+day : day)
```
and the same for the other fields.
But note that there are good javascript libraries filling this kind of gap. I per... | You could also try [moment.js](http://momentjs.com/). A 6.5kb library for formatting dates
```
var m = moment( new Date() );
m.format( "DD/MM/YYYY HH:mm");
``` |
17,996,874 | I have a function which works well, for converting dates from a webservice returned in json format. The webservices gives dates in the following type of format:
**Data example:** The dates look like this in the json data
```
\/Date(1373875200000)\/
```
**Current function:** This is the current function I have
```
... | 2013/08/01 | [
"https://Stackoverflow.com/questions/17996874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/364312/"
] | I'd suggest using a library for this kind of thing -- something like [Moment.js](http://momentjs.com/) would do the job perfectly (and give you a load more functionality like date addition/subtraction into the bargain).
With moment.js, your code could look like this:
```
function HumanDate(date) {
return moment(d... | If you don't use a library, then you have to do some work, that is you have to put the `"0"` yourself.
Instead of simply concatenating `day`, you need to concatenate
```
(day<10 ? '0'+day : day)
```
and the same for the other fields.
But note that there are good javascript libraries filling this kind of gap. I per... |
17,996,874 | I have a function which works well, for converting dates from a webservice returned in json format. The webservices gives dates in the following type of format:
**Data example:** The dates look like this in the json data
```
\/Date(1373875200000)\/
```
**Current function:** This is the current function I have
```
... | 2013/08/01 | [
"https://Stackoverflow.com/questions/17996874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/364312/"
] | I'd suggest using a library for this kind of thing -- something like [Moment.js](http://momentjs.com/) would do the job perfectly (and give you a load more functionality like date addition/subtraction into the bargain).
With moment.js, your code could look like this:
```
function HumanDate(date) {
return moment(d... | You could also try [moment.js](http://momentjs.com/). A 6.5kb library for formatting dates
```
var m = moment( new Date() );
m.format( "DD/MM/YYYY HH:mm");
``` |
232,184 | Old iPhone 5 16Gb all backed up on iCloud. Tried to set up my brand new iPhone 6 but turned out the last (manual) backup attempted on the 5 hadn't fully completed. Reinitiated a new mail backup on my old 5 to iCloud (18 mins), just attempted to set up new 6 using iCloud but get "error connecting to iCloud". Reset new 6... | 2016/03/23 | [
"https://apple.stackexchange.com/questions/232184",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/176614/"
] | iCloud syncing over iPhones of different generations can be tricky. I highly recommend backing up your iPhone 5 directly to your computer (not iCloud) and then syncing that back up file to your new iPhone 6.
Once all the old data is on your iPhone 6 you can then sync it to iCloud through your iPhone 6 (which can be do... | One thing to check is the exact build on the iPhone 5 and iPhone 6. If the 6 is at a lesser build version than the 5, no backups will be shown by design.
Once you've gotten both devices updated and backed up, If iCloud servers are under increased load and have elevated API errors, you might need to be patient. Once th... |
56,385 | Delivering content on the web has over the years become more complex and heavier. Dependencies on third parties and external web services is increasing, causing longer loading times. The “click and wait” analogy is frustrating for users, and to overcome this problem, asynchronous technologies have been implemented on t... | 2014/04/28 | [
"https://ux.stackexchange.com/questions/56385",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/4679/"
] | Assuming that the technology in use supports it, an improved experience will be
* If have never retrieved data from that source, but do know the size, render a place-holder image. A subtle loading animated gif, with different desaturated icon per source.
* If have never retrieved data from that source, and don't know ... | Nobody got it right actually. It has to do with smartphones and touchscreens. Once you get past the BS of smartphones being a *computer in your pocket* you will soon quickly realize that touch and non touch devices are more different then they are alike.
Webpages are designed now with touch pad first which asynchronou... |
8,433,571 | **Current verbose rails path helpers**
I'm constantly writing code to get URLs like:
```
link_to @applicant.name, company_job_applicant_path(@company, @job, @applicant)
```
However this code looks more like this (redundant) piece:
```
link_to @applicant.name, company_job_applicant_path(@applicant.job.company, @app... | 2011/12/08 | [
"https://Stackoverflow.com/questions/8433571",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/400790/"
] | Yes, DRY is the "Rails way" to do things. If you're repeating this method over and over again, it makes sense to create a view helper for it. Instead of modifying the path helpers, I'd simply wrap rails `link_to` method.
You can do something quick and easy like this:
```
# app/helpers/application_helper.rb
def link_t... | You're describing a very typical Rails helper.
They go in `app/helpers`.
By default that directory will have an `ApplicationHelper` module, or you can add your own if you want to organize them differently. |
46,370,075 | I am looking for the most simple and direct way to return a data frame or list of column names that have the value "1".
Say I start with this:
```
import pandas as pd
dates = pd.date_range('1/1/2017', periods=4, freq='D')
df = pd.DataFrame({'W01': [0, 0, 0, 1], 'W02': [0, 1, 0, 0], 'W03': [0, 0, 0, 1]
... | 2017/09/22 | [
"https://Stackoverflow.com/questions/46370075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7372165/"
] | You could
```
In [2784]: (df.apply(lambda x: ', '.join(x.index[x.astype(bool)]), axis=1)
.replace('', np.nan))
Out[2784]:
2017-01-01 NaN
2017-01-02 W02
2017-01-03 NaN
2017-01-04 W01, W03
Freq: D, dtype: object
```
Or,
```
In [2787]: df.apply(lambda x: pd.Series(x.index[x.ast... | setting up
```
df1=df.reset_index().melt('index')
df1=df1[df1.value.eq(1)]
```
1
```
df1.groupby('index')['variable'].apply(lambda x : ','.join(x)).to_frame().reindex(df.index)
Out[846]:
variable
2017-01-01 NaN
2017-01-02 W02
2017-01-03 NaN
2017-01-04 W01,W03
```
2
```
df1.groupby('... |
495,057 | I am using XenServer with several virtual machines having local postgres databases. Even when all applications are unused and the databases are idle, each vm causes constant storage network traffic which degrades the performance of the iscsi storage device.
After running `iotop` I have noted that the postgres stats co... | 2013/04/01 | [
"https://serverfault.com/questions/495057",
"https://serverfault.com",
"https://serverfault.com/users/116756/"
] | Since upgrading PostgreSQL is not an option, I have tried placing the pg\_stat\_tmp directory on a tmpfs file system, which delivered a significant performance improvement. I am now running this on a few dozen systems for a couple of months without any noticeable drawbacks.
To do this, simply mount pg\_stat\_tmp with ... | Upgrade PostgreSQL. At absolute minimum make sure you're on the latest 8.4 release; if that doesn't address it and it's practical to do so you should probably upgrade to 9.2. At least some issues around the stats collector have been addressed since 8.4, and [will be reaching end-of-life in about a year](http://www.post... |
495,057 | I am using XenServer with several virtual machines having local postgres databases. Even when all applications are unused and the databases are idle, each vm causes constant storage network traffic which degrades the performance of the iscsi storage device.
After running `iotop` I have noted that the postgres stats co... | 2013/04/01 | [
"https://serverfault.com/questions/495057",
"https://serverfault.com",
"https://serverfault.com/users/116756/"
] | Since upgrading PostgreSQL is not an option, I have tried placing the pg\_stat\_tmp directory on a tmpfs file system, which delivered a significant performance improvement. I am now running this on a few dozen systems for a couple of months without any noticeable drawbacks.
To do this, simply mount pg\_stat\_tmp with ... | Same problem here. I also disabled `track_*` and so on.
The side effect is that `autovacuum` is using this collected data to fire up.
So, I take care to schedule nightly a `vacuumdb`.
Other solution is to set `autovacuum_naptime` higher enough to have system resting. |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | The column name comes from the DataElementName property, or if that is blank, the Name property. Unfortunatly, neither allow commas or quoting.
There is a blog post here:
<http://www.behindthecode.net/Blog/post/2008/01/29/How-to-modify-Reporting-Services-CSV-export-Behavior.aspx>
on how to change settings in the con... | Append the following query parameters to your url:
* **For `#`** - *[url]*`&rs:format=CSV&rc:FieldDelimiter=%23`
* **For `;`** - *[url]*`&rs:format=CSV&rc:FieldDelimiter=";"`
Not sure you can do it directly from Report Manager without altering config files somewhere
**Update**: After rereading this, are you returnin... |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | In short, **No, it's not possible**.
From [SSRS 2008 Column issue when exporting to a CSV file](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/bc7bcae8-cce2-4626-8cb9-132a239a4ab8/#f9bd33ae-6d92-4050-94d8-92c6e26e00cc):
>
> For csv export, the header of a column is determined by the `DataElementName` prope... | Append the following query parameters to your url:
* **For `#`** - *[url]*`&rs:format=CSV&rc:FieldDelimiter=%23`
* **For `;`** - *[url]*`&rs:format=CSV&rc:FieldDelimiter=";"`
Not sure you can do it directly from Report Manager without altering config files somewhere
**Update**: After rereading this, are you returnin... |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | This solution works: <https://stackoverflow.com/a/32110072/674237>
In summary:
1. Modify your query to have the first row in the data set be your desired column headers. E.g., select header names and union them to the data set.
2. Add a new CSV rendering extension to the report server that excludes headers.
This wor... | Append the following query parameters to your url:
* **For `#`** - *[url]*`&rs:format=CSV&rc:FieldDelimiter=%23`
* **For `;`** - *[url]*`&rs:format=CSV&rc:FieldDelimiter=";"`
Not sure you can do it directly from Report Manager without altering config files somewhere
**Update**: After rereading this, are you returnin... |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | The column name comes from the DataElementName property, or if that is blank, the Name property. Unfortunatly, neither allow commas or quoting.
There is a blog post here:
<http://www.behindthecode.net/Blog/post/2008/01/29/How-to-modify-Reporting-Services-CSV-export-Behavior.aspx>
on how to change settings in the con... | In short, **No, it's not possible**.
From [SSRS 2008 Column issue when exporting to a CSV file](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/bc7bcae8-cce2-4626-8cb9-132a239a4ab8/#f9bd33ae-6d92-4050-94d8-92c6e26e00cc):
>
> For csv export, the header of a column is determined by the `DataElementName` prope... |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | The column name comes from the DataElementName property, or if that is blank, the Name property. Unfortunatly, neither allow commas or quoting.
There is a blog post here:
<http://www.behindthecode.net/Blog/post/2008/01/29/How-to-modify-Reporting-Services-CSV-export-Behavior.aspx>
on how to change settings in the con... | Column names for Csv, Dbf and Xml are picked up from `<Name>` field by default.
Solved this issue by adding appropriate names for each of this formats in `<Tag>` field in \*.mrt file. E.g:
`<Name>Txt_InternalName</Name>
<Tag>CSV:"Name for Csv"; DBF: "Name for DBF"; XML: "Name for Xml"; Default: "Default Name for Csv ... |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | The column name comes from the DataElementName property, or if that is blank, the Name property. Unfortunatly, neither allow commas or quoting.
There is a blog post here:
<http://www.behindthecode.net/Blog/post/2008/01/29/How-to-modify-Reporting-Services-CSV-export-Behavior.aspx>
on how to change settings in the con... | This solution works: <https://stackoverflow.com/a/32110072/674237>
In summary:
1. Modify your query to have the first row in the data set be your desired column headers. E.g., select header names and union them to the data set.
2. Add a new CSV rendering extension to the report server that excludes headers.
This wor... |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | In short, **No, it's not possible**.
From [SSRS 2008 Column issue when exporting to a CSV file](https://social.msdn.microsoft.com/Forums/sqlserver/en-US/bc7bcae8-cce2-4626-8cb9-132a239a4ab8/#f9bd33ae-6d92-4050-94d8-92c6e26e00cc):
>
> For csv export, the header of a column is determined by the `DataElementName` prope... | Column names for Csv, Dbf and Xml are picked up from `<Name>` field by default.
Solved this issue by adding appropriate names for each of this formats in `<Tag>` field in \*.mrt file. E.g:
`<Name>Txt_InternalName</Name>
<Tag>CSV:"Name for Csv"; DBF: "Name for DBF"; XML: "Name for Xml"; Default: "Default Name for Csv ... |
2,631,800 | By default, csv takes the text box name as the csv header name for the columns. The text box does not allow a space.
How do I make a different header than the text box for the csv?
Is there a way to display comma in the header when exported to csv?
**Note**: The solution has to be only for one report; not global. | 2010/04/13 | [
"https://Stackoverflow.com/questions/2631800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/313413/"
] | This solution works: <https://stackoverflow.com/a/32110072/674237>
In summary:
1. Modify your query to have the first row in the data set be your desired column headers. E.g., select header names and union them to the data set.
2. Add a new CSV rendering extension to the report server that excludes headers.
This wor... | Column names for Csv, Dbf and Xml are picked up from `<Name>` field by default.
Solved this issue by adding appropriate names for each of this formats in `<Tag>` field in \*.mrt file. E.g:
`<Name>Txt_InternalName</Name>
<Tag>CSV:"Name for Csv"; DBF: "Name for DBF"; XML: "Name for Xml"; Default: "Default Name for Csv ... |
20,656,407 | ```
$text=" ma mee ma mee meena mia meenaùs";
```
**$text is a string** with hundreds of words,above is a short illustration.
what i want is i want to check if the $text contains '**mee**' if yes than replace mee with " "(i.e. space).
i am using `preg_replace` for the same but as obvious it searches for the patter... | 2013/12/18 | [
"https://Stackoverflow.com/questions/20656407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ```
if ($text == "mee")
$text = " ";
```
That's it.
If you want the word `"mee"` changed in a string that contains this word many times, use `$text = preg_replace('/\bmee\b/', ' ', $text);`. | You may go for a combination of `preg_match` and `preg_replace`.
Check the string for the exact matched text first:
```
<?php
$text=" ma mee ma mee meena mia";
echo $text."<br/>";
$key = "mee";
$rep_text = "YES";
$text = preg_replace("/\b".$key."\b/u", $rep_text, $text);
echo $text."<br/>... |
20,656,407 | ```
$text=" ma mee ma mee meena mia meenaùs";
```
**$text is a string** with hundreds of words,above is a short illustration.
what i want is i want to check if the $text contains '**mee**' if yes than replace mee with " "(i.e. space).
i am using `preg_replace` for the same but as obvious it searches for the patter... | 2013/12/18 | [
"https://Stackoverflow.com/questions/20656407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | As a regular expression it would be `^mee$` which you would use with `preg_replace` like so:
```
$text = preg_replace("/^mee$/","", $text);
```
`^` matches the start of the string
`$` matches the end of the string
This is quite a simple replacement to do however so it may be more efficient to do it without using... | You may go for a combination of `preg_match` and `preg_replace`.
Check the string for the exact matched text first:
```
<?php
$text=" ma mee ma mee meena mia";
echo $text."<br/>";
$key = "mee";
$rep_text = "YES";
$text = preg_replace("/\b".$key."\b/u", $rep_text, $text);
echo $text."<br/>... |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | It's really simple.
On Drupal 6/7, set the "#access" property of the fieldset to `FALSE`, or use logic to determine visibility.
This will also hide all the content of the fieldset, and yet keep the values intact so that when the form is submitted they are not cleared, but retained. | I use the hide function, for instance
```
hide($form['title']);
```
if you need to set certain parameters of the form before hiding it do it in this fashion
```
$form['title']['#required'] = FALSE;
``` |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | It's really simple.
On Drupal 6/7, set the "#access" property of the fieldset to `FALSE`, or use logic to determine visibility.
This will also hide all the content of the fieldset, and yet keep the values intact so that when the form is submitted they are not cleared, but retained. | I have developed a module to do so: the [Hide Group (fieldset)](http://drupal.org/project/hide_group) module.
The #access property has the effect to remove entirely the fieldset from the form; my module only set it to hidden via CSS styles. |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | It's really simple.
On Drupal 6/7, set the "#access" property of the fieldset to `FALSE`, or use logic to determine visibility.
This will also hide all the content of the fieldset, and yet keep the values intact so that when the form is submitted they are not cleared, but retained. | I found that you had to do the following:
```
$form['last_field_in_tabgroup']['#required'] = FALSE;
```
and
```
hide($form['last_field_in_tabgroup']);
```
to make sure an empty tab doesn't show. |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | It's really simple.
On Drupal 6/7, set the "#access" property of the fieldset to `FALSE`, or use logic to determine visibility.
This will also hide all the content of the fieldset, and yet keep the values intact so that when the form is submitted they are not cleared, but retained. | Use `hide($form['element']);` and `show($form['element']);` if you want to be able to display the element later (for instance in a Dynamic / Ajax form).
Setting the `#access` property to False works for hiding the element, but it seems you can't subsequently set it True if you want to show it again. |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | It's really simple.
On Drupal 6/7, set the "#access" property of the fieldset to `FALSE`, or use logic to determine visibility.
This will also hide all the content of the fieldset, and yet keep the values intact so that when the form is submitted they are not cleared, but retained. | When you unset the form fields inside fieldset it should not be shown automatically, but you can also implement `hook_field_widget_WIDGET_TYPE_form_alter()` in your module for other cases.
You can use this guide.
<https://3cwebservices.com/drupal/how-remove-fieldset-drupal-address-field> |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | I found that you had to do the following:
```
$form['last_field_in_tabgroup']['#required'] = FALSE;
```
and
```
hide($form['last_field_in_tabgroup']);
```
to make sure an empty tab doesn't show. | I use the hide function, for instance
```
hide($form['title']);
```
if you need to set certain parameters of the form before hiding it do it in this fashion
```
$form['title']['#required'] = FALSE;
``` |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | I found that you had to do the following:
```
$form['last_field_in_tabgroup']['#required'] = FALSE;
```
and
```
hide($form['last_field_in_tabgroup']);
```
to make sure an empty tab doesn't show. | I have developed a module to do so: the [Hide Group (fieldset)](http://drupal.org/project/hide_group) module.
The #access property has the effect to remove entirely the fieldset from the form; my module only set it to hidden via CSS styles. |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | I found that you had to do the following:
```
$form['last_field_in_tabgroup']['#required'] = FALSE;
```
and
```
hide($form['last_field_in_tabgroup']);
```
to make sure an empty tab doesn't show. | Use `hide($form['element']);` and `show($form['element']);` if you want to be able to display the element later (for instance in a Dynamic / Ajax form).
Setting the `#access` property to False works for hiding the element, but it seems you can't subsequently set it True if you want to show it again. |
5,020 | I am trying to use hook\_form\_alter() to change the way a form is displayed. The form has 4 fieldsets and I only want to display one of them. How can I make these fieldsets invisible using hook\_form\_alter()? | 2011/06/12 | [
"https://drupal.stackexchange.com/questions/5020",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/1498/"
] | I found that you had to do the following:
```
$form['last_field_in_tabgroup']['#required'] = FALSE;
```
and
```
hide($form['last_field_in_tabgroup']);
```
to make sure an empty tab doesn't show. | When you unset the form fields inside fieldset it should not be shown automatically, but you can also implement `hook_field_widget_WIDGET_TYPE_form_alter()` in your module for other cases.
You can use this guide.
<https://3cwebservices.com/drupal/how-remove-fieldset-drupal-address-field> |
23,306,183 | I have a `UITableView` which is being filled from Core Data by a `NSFetchedResultsController`. Everything works great. However, I have just implemented a `UISegmentedControl` at the top of the `UITableView`, which I would like to sort the results. There are three segments: `@"All", @"Boys", @"Girls"`. In `viewDidLoad`,... | 2014/04/26 | [
"https://Stackoverflow.com/questions/23306183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3179804/"
] | It seems to me that it would be easier to put the segmentation logic into the fetched results controller method. When switching the segmented control, just set your FRC to `nil` and account for the proper filter in the FRC creation code. You do not need 3 FRCs. Thus:
```
-(void)segmentedControlDidChange:(UISegmentedCo... | It turns out I made a silly mistake when initializing my UITableViewCell. Instead of calling
```
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
```
I was calling
```
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier **forIndexPath:indexPath*... |
22,508,903 | I am looking at an existing c# windows service project and I have this function that's called in it's constructor ie. before the win service OnStart event. Please can someone please explain what this does? What if I remove this from my service?
```
private void Compose()
{
CompositionContainer containe... | 2014/03/19 | [
"https://Stackoverflow.com/questions/22508903",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1809943/"
] | Its MEF right there (allows you to load plugins on demand). More detailed info at
<http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.hosting.compositioncontainer(v=vs.110).aspx> | Without knowing for sure what is in the `catalog`, my guess is that this code should not be removed. The [`CompositionContainer`](http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.hosting.compositioncontainer%28v=vs.110%29.aspx) class is part of the [Managed Extensibility Framework](http://msdn.... |
32,562,446 | I "pod update", and my RestKit version now is 0.25.0, my RKValueTransformers is 1.1.2, and an error appeared "RKObjectMapping.h" not found.
What did RestKit change in the new version, that I check on the its github cannot find anything.
The following steps can reproduce the error:
1) Create a new project
2) pod ini... | 2015/09/14 | [
"https://Stackoverflow.com/questions/32562446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1832951/"
] | After a while struggling, I noticed the error is not from RestKit. It comes from upgrading the latest version of cocoapods (0.39.beta.4).
The Header Search Path is not in recursive mode anymore.
The workaround is just downgrade the version of cocoapods to 0.38.0.
1) remove the latest version of cocoapod
```
sudo ... | I solved this by building pods as frameworks.
```
use_frameworks!
``` |
32,562,446 | I "pod update", and my RestKit version now is 0.25.0, my RKValueTransformers is 1.1.2, and an error appeared "RKObjectMapping.h" not found.
What did RestKit change in the new version, that I check on the its github cannot find anything.
The following steps can reproduce the error:
1) Create a new project
2) pod ini... | 2015/09/14 | [
"https://Stackoverflow.com/questions/32562446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1832951/"
] | After a while struggling, I noticed the error is not from RestKit. It comes from upgrading the latest version of cocoapods (0.39.beta.4).
The Header Search Path is not in recursive mode anymore.
The workaround is just downgrade the version of cocoapods to 0.38.0.
1) remove the latest version of cocoapod
```
sudo ... | This has finally been fixed in the development branch of RestKit with the final patch being in 1d8f3e332, I think.
Hopefully it will be merged into master soon.
For now, if you're feeling brave, you can use
```
pod 'RestKit', :git => 'git@github.com:RestKit/RestKit.git', :commit => '1d8f3e3325d959094a3f96c832bf9f54c... |
32,562,446 | I "pod update", and my RestKit version now is 0.25.0, my RKValueTransformers is 1.1.2, and an error appeared "RKObjectMapping.h" not found.
What did RestKit change in the new version, that I check on the its github cannot find anything.
The following steps can reproduce the error:
1) Create a new project
2) pod ini... | 2015/09/14 | [
"https://Stackoverflow.com/questions/32562446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1832951/"
] | There is easy way to work around this problem when you don't want to touch cocoapods. because fixing them itself a hassle. I have fixed my problem as follows:
>
> Click on your project file
>
> Then go to **build settings**
> search for "**header search path**"
>
> With the **drop down** just make them **r... | I solved this by building pods as frameworks.
```
use_frameworks!
``` |
32,562,446 | I "pod update", and my RestKit version now is 0.25.0, my RKValueTransformers is 1.1.2, and an error appeared "RKObjectMapping.h" not found.
What did RestKit change in the new version, that I check on the its github cannot find anything.
The following steps can reproduce the error:
1) Create a new project
2) pod ini... | 2015/09/14 | [
"https://Stackoverflow.com/questions/32562446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1832951/"
] | There is easy way to work around this problem when you don't want to touch cocoapods. because fixing them itself a hassle. I have fixed my problem as follows:
>
> Click on your project file
>
> Then go to **build settings**
> search for "**header search path**"
>
> With the **drop down** just make them **r... | This has finally been fixed in the development branch of RestKit with the final patch being in 1d8f3e332, I think.
Hopefully it will be merged into master soon.
For now, if you're feeling brave, you can use
```
pod 'RestKit', :git => 'git@github.com:RestKit/RestKit.git', :commit => '1d8f3e3325d959094a3f96c832bf9f54c... |
32,562,446 | I "pod update", and my RestKit version now is 0.25.0, my RKValueTransformers is 1.1.2, and an error appeared "RKObjectMapping.h" not found.
What did RestKit change in the new version, that I check on the its github cannot find anything.
The following steps can reproduce the error:
1) Create a new project
2) pod ini... | 2015/09/14 | [
"https://Stackoverflow.com/questions/32562446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1832951/"
] | This has finally been fixed in the development branch of RestKit with the final patch being in 1d8f3e332, I think.
Hopefully it will be merged into master soon.
For now, if you're feeling brave, you can use
```
pod 'RestKit', :git => 'git@github.com:RestKit/RestKit.git', :commit => '1d8f3e3325d959094a3f96c832bf9f54c... | I solved this by building pods as frameworks.
```
use_frameworks!
``` |
5,669,941 | I'm working with PHPExcel and I'm trying to format a cell using Excel's built-in "Accounting" format. I'm aware of the Format Code:
```
PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE
```
But this simply formats to two decimal places and adds a $ in front of the number. The result I'm looking for is the righ... | 2011/04/14 | [
"https://Stackoverflow.com/questions/5669941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/97506/"
] | I reverse engineered the format code from an existing spreadsheet using PHPExcel and got this:
```
_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)
```
This is the code Excel places on the cell when you select the "Accounting" format... or click that "$" toolbar button in Excel 2007.
If you didn't need cu... | There are no other **pre-defined** formats beyond those listed in PHPExcel\_Style\_NumberFormat, but you should be able to set the format code to any string that you could use when setting an MS Excel custom format...
e.g.
```
[green]$#,##0.00;[red]$(-#,##0.00)
```
As regards cell alignment, set this to right you... |
5,669,941 | I'm working with PHPExcel and I'm trying to format a cell using Excel's built-in "Accounting" format. I'm aware of the Format Code:
```
PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE
```
But this simply formats to two decimal places and adds a $ in front of the number. The result I'm looking for is the righ... | 2011/04/14 | [
"https://Stackoverflow.com/questions/5669941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/97506/"
] | `$objPHPExcel->getActiveSheet()->getStyle('C1')->getNumberFormat()->setFormatCode("#,##0.00");`
or use
`$objPHPExcel->getActiveSheet()->getStyle('C1')->getNumberFormat()->setFormatCode("#.##0,00");`
Set in `getStyle` CELL. | There are no other **pre-defined** formats beyond those listed in PHPExcel\_Style\_NumberFormat, but you should be able to set the format code to any string that you could use when setting an MS Excel custom format...
e.g.
```
[green]$#,##0.00;[red]$(-#,##0.00)
```
As regards cell alignment, set this to right you... |
5,669,941 | I'm working with PHPExcel and I'm trying to format a cell using Excel's built-in "Accounting" format. I'm aware of the Format Code:
```
PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE
```
But this simply formats to two decimal places and adds a $ in front of the number. The result I'm looking for is the righ... | 2011/04/14 | [
"https://Stackoverflow.com/questions/5669941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/97506/"
] | I reverse engineered the format code from an existing spreadsheet using PHPExcel and got this:
```
_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)
```
This is the code Excel places on the cell when you select the "Accounting" format... or click that "$" toolbar button in Excel 2007.
If you didn't need cu... | `$objPHPExcel->getActiveSheet()->getStyle('C1')->getNumberFormat()->setFormatCode("#,##0.00");`
or use
`$objPHPExcel->getActiveSheet()->getStyle('C1')->getNumberFormat()->setFormatCode("#.##0,00");`
Set in `getStyle` CELL. |
127,584 | I have a package of my own loaded when a certain option is passed to a class of my own (based in turn on the `memoir` class). The package is devised for typesetting letters. Except for the body of the letter itself, everything is defined in the class, in the package, and in the document's preamble -- in the latter, it ... | 2013/08/10 | [
"https://tex.stackexchange.com/questions/127584",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/15952/"
] | Perhaps adding `\@afterindentfalse\@afterheading` at the end of `\AtBeginDocument` helps in your case? (This is borrowed from cgnieder's [answer](https://tex.stackexchange.com/a/126487/510) to [Reliable code for automatic \noindent after specific environments?](https://tex.stackexchange.com/questions/112404/reliable-co... | Try replacing
```
Salutation,\ignorespaces% A literal string (no unwanted space appears here)
\par\vspace*{\baselineskip}\noindent\ignorespaces\relax%%
```
with
```
Salutation\\[\baselineskip]
```
That will give a blank line after Salutation without interrupting the current paragraph, and should ignore any ... |
13,950,949 | I would like the user to select/check a radiobutton (for this example I used directions). With a button you can append some elements to another div (sidebar).
What I would like to accomplish:
Depending on wich radiobutton is checked, I want another image/div to append. So when 'Left' is checked, I want the '.Left' di... | 2012/12/19 | [
"https://Stackoverflow.com/questions/13950949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525701/"
] | You can easily attach extra handlers to these buttons with the help of the [edit](http://docs.kendoui.com/api/web/grid#edit) event:
```
$(function(){
$('#GridName').data().kendoGrid.bind('edit',function(e){
if(e.model.isNew()){
e.container.find('.k-grid-update').click(function(){
... | From what I understand, you can just write your own custom cell template for whatever buttons you want to add on and stick that into your row template.
```
var template = "<div class='btn-group' style='text-align: center'>" +
"<a class='btn btn-mini' rel='tooltip' title='Edit' href=''><i class='icon-ed... |
1,590,247 | The integral I'd like to evaluate is $\int\_0^\infty \frac{\log^2 x \, dx}{(1+x)^2}$. I consider the function $f(z) = \frac{\text{Log}^2 z}{(1+z)^2}$, which has a pole of order 2 at $z=-1$ and has a branch point at $z=0$. I set up the integral $\oint\_C f(z) dz$ along the contour $C = C\_1 + C\_2 + C\_3 + C\_4 + C\_5 +... | 2015/12/27 | [
"https://math.stackexchange.com/questions/1590247",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/301132/"
] | I would consider the integral
$$\oint\_C dz \frac{\log^3{z}}{(1+z)^2} $$
where $C$ is a keyhole contour about the real axis of radius $R$. Then as $R \to \infty$ the integral is equal to
$$-i 6 \pi \int\_0^{\infty} dx \frac{\log^2{x}}{(1+x)^2} + 12 \pi^2 \int\_0^{\infty} dx \frac{\log{x}}{(1+x)^2} +i 8 \pi^3 \int\_0... | We have
$$\int\_1^{\infty} \dfrac{\log^2(x)}{(1+x)^2}dx = \int\_1^0 \dfrac{\log^2(1/x)}{(1+1/x)^2} \left(-\dfrac{dx}{x^2}\right) = \int\_0^1 \dfrac{\log^2(x)}{(1+x)^2}dx$$
Hence, our integral becomes
\begin{align}
I & = \int\_0^{\infty}\dfrac{\log^2(x)}{(1+x)^2}dx = 2\int\_0^1\dfrac{\log^2(x)}{(1+x)^2}dx = 2\int\_0^1 \... |
41,324,003 | When I run `ionic resources` or `ionic resources android`, it says the splash screen and icons are generating for both iOS and Android. However, when I check the res folder under platforms for android, the icons are unchanged after running `ionic build android` or `ionic run android --device`. I have tried cleaning the... | 2016/12/25 | [
"https://Stackoverflow.com/questions/41324003",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3862607/"
] | I also had this problem this week. Here is what I did.
Based on [this blog post](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) I got it working for me with the following steps:
1) Create a new hook in
>
> hooks/after\_prepare/020\_android\_move\_custom\_resources.js
>
>
>
```
#... | I too faced this problem. This seems to be an issue with Cordova 6 and is supposed to have been fixed in 6.1. Here is the related url - <https://github.com/driftyco/ionic-cli/issues/1638>
The files seem to be copied into the res folder under root folder correctly when you run the ionic resources command but somewhere ... |
41,324,003 | When I run `ionic resources` or `ionic resources android`, it says the splash screen and icons are generating for both iOS and Android. However, when I check the res folder under platforms for android, the icons are unchanged after running `ionic build android` or `ionic run android --device`. I have tried cleaning the... | 2016/12/25 | [
"https://Stackoverflow.com/questions/41324003",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3862607/"
] | I also had this problem this week. Here is what I did.
Based on [this blog post](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) I got it working for me with the following steps:
1) Create a new hook in
>
> hooks/after\_prepare/020\_android\_move\_custom\_resources.js
>
>
>
```
#... | Here's what I did to get this to work as fast as possible.
```
ionic cordova resources android;
cd resources/android/splash;
mkdir ../assets;
mkdir ../assets/drawable-land-hdpi;
mkdir ../assets/drawable-land-ldpi;
mkdir ../assets/drawable-land-mdpi;
mkdir ../assets/drawable-land-xhdpi;
mkdir ../assets/drawable-land-xx... |
6,624,449 | I have a problem parsing an xml, actually transforming it.
The error I get is:
```
ERROR: 'Namespace for prefix 'SOAP-ENV' has not been declared.'
Jul 8, 2011 3:24:54 PM kumar.runs.start$2 run
SEVERE: null
javax.xml.transform.TransformerException: java.lang.RuntimeException: Namespace for prefix 'SOAP-ENV' has not b... | 2011/07/08 | [
"https://Stackoverflow.com/questions/6624449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/481828/"
] | We don't have enough information, but the first two things I would suspect are:
1. The input XML doesn't declare the namespace properly; i.e. it is invalid XML.
2. There is a bug in your custom `XMLTrimFilter` class.
---
The Sun bug is against a really old version of JAXP and was fixed a long time ago. And it doesn'... | After checking your XML in a suitable editor, I noticed that there's no namespace defined for the prefix "swp", the one that element `addOwnRet` falls under. It's possible that for SOAP usage purposes this is alright (I'm not very familiar with the protocol), but for an XSLT processor this is simply an XML document and... |
34,958 | Ozone readily decomposes when impacted by UV radiation.
Sulfur dioxide, having the same bond structure and valence electrons in each atom as ozone, is much more stable.
Would someone please help me understand what makes sulfur dioxide a more stable compound? | 2015/08/11 | [
"https://chemistry.stackexchange.com/questions/34958",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/19073/"
] | I'm going to attempt to answer this from three points of view.
Qualitative considerations and MO theory:
-----------------------------------------
**First**, why isn't ozone linear? You can imagine $\ce{O3}$ like a $\ce{CO2}$ molecule that lacks two electrons. This lack of electrons will result in less $s$-character,... | The bonding of ozone is explained in other questions. The important point is that its bonds are weaker than SO$\_2$ even in the ground state. The dissociation energy of SO$\_2$ ground state is approx 5 times larger than O$\_3$. The effect of 3 vs 4 bonds to put it casually.
However, this question asks about the stabi... |
73,874 | 1 Samuel 28:12-14:
>
> 12 And the woman seeth Samuel, and crieth with a loud voice, and the woman speaketh unto Saul, saying, `Why hast thou deceived me -- and thou Saul?' 13 And the king saith to her, `Do not fear; for what hast thou seen?' **and the woman saith unto Saul, `Gods I have seen coming up out of the eart... | 2022/01/23 | [
"https://hermeneutics.stackexchange.com/questions/73874",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/-1/"
] | Hebrew is not Greek nor English. The Hebrew אֱלהִים (elohim) meant more than just what we call "god". It included other things such as:
* ruler and judges, Ex 22:7, 8, 27, 1 Sam 2:25, Judges 5:8, Ps 82:1, etc
* superhuman beings, Ps 8:6, Job 1:6, 2:1, 38:7, etc.
* false gods, Ex 18:11, 22:19, 1 Sam 4:8, etc.
thus, it... | The word used here is אֱלהִים (elohim), a masculine plural noun referring to Deity (and occasionally, Deity's representatives). It is the same word used, for example, to refer to God in the creation, and in the commandment "thou shalt have no other gods before me".
There are numerous Old Testament examples of people w... |
2,375,952 | in how many different ways may eight red and eight green counters be placed on the squares of an 8x8 chessboard so that there are not two counters on any one square and there is on red counter and one green counter in each row and column.
The book I'm using doesn't contain the solution and I tried to find the solution... | 2017/07/29 | [
"https://math.stackexchange.com/questions/2375952",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/460672/"
] | There are $8!$ ways of placing the red counters. If you place them on
the main diagonal, then the green counters must correspond to a
[derangement](https://en.wikipedia.org/wiki/Derangement). The total number of possibilities will be $8!$
times the 8-th derangement number. | Lord Shark's answer is correct, and you really need the derangements to have an easy solution.
To point out where the $8!7!$ reasoning fails is that when you have the first red on $A1$ and the first green on $A2$, and the second green on $B2$, then you have $7$ options for that second red. |
3,615,122 | I'm trying to get a sense of the similarities between languages in syntax. How similar are Python, jQuery and C? I started programming in Actionscript 3 and then moved on to Javascript , then went on and learned Prototype, and then I started using jQuery and found that the syntax is very different. So is jQuery more li... | 2010/09/01 | [
"https://Stackoverflow.com/questions/3615122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/339768/"
] | C is much different from the languages you've asked about. Remember that C isn't an interpreted language and will not be treated as such in your code. In short, you're up for a lot more material to learn --while dealing with C-- in terms of things like memory management and semantics than the other languages.
In regar... | Syntax wise, JavaScript (the language jQuery is implemented in) is similar to C. Python uses a different syntax which does not rely on semicolons and braces, but instead on indentation.
Semantically, JavaScript is closer to Python, so this would be easier to learn. I don't understand how you "moved" from ActionScript ... |
3,615,122 | I'm trying to get a sense of the similarities between languages in syntax. How similar are Python, jQuery and C? I started programming in Actionscript 3 and then moved on to Javascript , then went on and learned Prototype, and then I started using jQuery and found that the syntax is very different. So is jQuery more li... | 2010/09/01 | [
"https://Stackoverflow.com/questions/3615122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/339768/"
] | C is much different from the languages you've asked about. Remember that C isn't an interpreted language and will not be treated as such in your code. In short, you're up for a lot more material to learn --while dealing with C-- in terms of things like memory management and semantics than the other languages.
In regar... | For jQuery, the answer is pretty simple: jQuery isn't a language, therefore it doesn't have syntax.
For Python and C, the answer from a high-level point of view is also very simple: Python's syntax is directly inspired by C's syntax. (Or more precisely, both Python's and C's syntax are inspired by ALGOL's syntax.) The... |
3,611,320 | Why are half-scale divisions used in continuity corrections for binomial approx to normal distribution?
Why specifically half and not another correction? | 2020/04/05 | [
"https://math.stackexchange.com/questions/3611320",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/756968/"
] | Use the Heron's formula
$$A =\sqrt{s(s-a)(s-b)(s-c)}, \>\>\>\>\> s=\frac p2$$
and apply the AM-GM inequality to get
$$A =\sqrt{s(s-a)(s-b)(s-c)} \le \left[ s \left( \frac{3s-(a+b+c)}{3} \right) ^3\right]^{1/2}
= \frac{s^2}{3\sqrt3}=\frac{p^2}{12\sqrt3}$$
where the equality, or the maximum area, occurs at $a=b=c=\fra... | Just for giving another way to deduce a solution. Take a closed string and leaving a fixed side, say $a$, of the triangle draw an ellipse as usual. It is evident that the triangle with the largest area occurs with an isosceles triangle because it has the same base as all but has a greater height (actually a vertical se... |
3,611,320 | Why are half-scale divisions used in continuity corrections for binomial approx to normal distribution?
Why specifically half and not another correction? | 2020/04/05 | [
"https://math.stackexchange.com/questions/3611320",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/756968/"
] | Use the Heron's formula
$$A =\sqrt{s(s-a)(s-b)(s-c)}, \>\>\>\>\> s=\frac p2$$
and apply the AM-GM inequality to get
$$A =\sqrt{s(s-a)(s-b)(s-c)} \le \left[ s \left( \frac{3s-(a+b+c)}{3} \right) ^3\right]^{1/2}
= \frac{s^2}{3\sqrt3}=\frac{p^2}{12\sqrt3}$$
where the equality, or the maximum area, occurs at $a=b=c=\fra... | Area of triangle with vertices $a,b,c$
$$
\frac12(a\times b+b\times c+c\times a)=\frac12\left(a^R\cdot b+b^R\cdot c+c^R\cdot a\right)\tag1
$$
where $(x,y)^R=(-y,x)$ is $\frac\pi2$ rotation counter-clockwise.
Perimeter of triangle
$$
|a-b|+|b-c|+|c-a|\tag2
$$
maximize $(1)$
$$
a^R\cdot(\delta b-\delta c)+b^R\cdot(\delt... |
3,611,320 | Why are half-scale divisions used in continuity corrections for binomial approx to normal distribution?
Why specifically half and not another correction? | 2020/04/05 | [
"https://math.stackexchange.com/questions/3611320",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/756968/"
] | Just for giving another way to deduce a solution. Take a closed string and leaving a fixed side, say $a$, of the triangle draw an ellipse as usual. It is evident that the triangle with the largest area occurs with an isosceles triangle because it has the same base as all but has a greater height (actually a vertical se... | Area of triangle with vertices $a,b,c$
$$
\frac12(a\times b+b\times c+c\times a)=\frac12\left(a^R\cdot b+b^R\cdot c+c^R\cdot a\right)\tag1
$$
where $(x,y)^R=(-y,x)$ is $\frac\pi2$ rotation counter-clockwise.
Perimeter of triangle
$$
|a-b|+|b-c|+|c-a|\tag2
$$
maximize $(1)$
$$
a^R\cdot(\delta b-\delta c)+b^R\cdot(\delt... |
38,381,662 | I am trying to create more or less realistic looking leds with HTML and CSS. Adding a a glow to every led would be pretty straight forward if the color of the led was static. But I actually want the glow to automatically adjust to the led color.
So this wouldn't work: <https://fiddle.jshell.net/dwv5xxws/>
And please d... | 2016/07/14 | [
"https://Stackoverflow.com/questions/38381662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2879085/"
] | Okay, so I used JS to iterate all the elements with the class 'led', then set their box shadows to their background colours:
```
leds = document.getElementsByClassName('led');
for (var l = 0; l < leds.length; l++) {
led = leds[l];
led.style.boxShadow = '0 0 10px 1px ' + led.style.backgroundColor;
}
```
If yo... | It is your idea, after all ...
```css
.led {
width: 20px;
height: 20px;
border-radius: 50%;
box-shadow: inset 0px 0px 11px 3px rgba(255,255,255,0.8);
float:left;
margin-right: 10px;
}
```
```html
<div class="led" style="background-color:red"></div>
<div class="led" style="background-color:green"><... |
38,381,662 | I am trying to create more or less realistic looking leds with HTML and CSS. Adding a a glow to every led would be pretty straight forward if the color of the led was static. But I actually want the glow to automatically adjust to the led color.
So this wouldn't work: <https://fiddle.jshell.net/dwv5xxws/>
And please d... | 2016/07/14 | [
"https://Stackoverflow.com/questions/38381662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2879085/"
] | CSS Variables are still at a very early stage, but one well-established, reliable variable in CSS is `currentColor` - which, as its name suggests, always takes the current value of whatever `color:` is.
So a slight tweak to your code above will give you exactly what you want:
```css
.led {
width: 10px;
height: ... | Okay, so I used JS to iterate all the elements with the class 'led', then set their box shadows to their background colours:
```
leds = document.getElementsByClassName('led');
for (var l = 0; l < leds.length; l++) {
led = leds[l];
led.style.boxShadow = '0 0 10px 1px ' + led.style.backgroundColor;
}
```
If yo... |
38,381,662 | I am trying to create more or less realistic looking leds with HTML and CSS. Adding a a glow to every led would be pretty straight forward if the color of the led was static. But I actually want the glow to automatically adjust to the led color.
So this wouldn't work: <https://fiddle.jshell.net/dwv5xxws/>
And please d... | 2016/07/14 | [
"https://Stackoverflow.com/questions/38381662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2879085/"
] | CSS Variables are still at a very early stage, but one well-established, reliable variable in CSS is `currentColor` - which, as its name suggests, always takes the current value of whatever `color:` is.
So a slight tweak to your code above will give you exactly what you want:
```css
.led {
width: 10px;
height: ... | It is your idea, after all ...
```css
.led {
width: 20px;
height: 20px;
border-radius: 50%;
box-shadow: inset 0px 0px 11px 3px rgba(255,255,255,0.8);
float:left;
margin-right: 10px;
}
```
```html
<div class="led" style="background-color:red"></div>
<div class="led" style="background-color:green"><... |
12,568,247 | **I got this XML structure:**
```
<Tax>
<Money currency="USD">0.00</Money>
<Description xml:lang="en">
17.5% Non-Recoverable
<ShortName>vatspecial</ShortName>
</Description>
</Tax>
```
**Notice that `Description` node has `MixedContent` *(composed with text and XML)* and this is the `XSD` part regardi... | 2012/09/24 | [
"https://Stackoverflow.com/questions/12568247",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1178686/"
] | As you mentioned you need to add the `mixed` attribute to indicate that your type supports mixed content. Without this specified your XML content is invalid:
```
<xsd:complexType name="TaxDescriptionType" mixed="true">
<xsd:sequence>
<xsd:element name="ShortName" type="xsd:string" />
</xsd:sequence>
... | With mixed=true, in ObjectFactory there should be a function like `JAXBElement<ShortNameType> createTaxDescriptionTypeShortNameType(ShortNameType)`, which generates the serializable element for you.
```
@XmlElementDecl(namespace = "", name = "shortnametype", scope = TaxDescriptionType.class)
public JAXBElement<Sh... |
51,174,801 | I am trying to find out a way to extract or read just one type of content from a text file using java.
**Let's say my text file contains:**
>
> What's your name, 00 5 6 0 K Write your 0 9 2 Name Let's not Talk
> about 1 1 0 5 it
>
>
>
Now what i want it - my java program to run and able to only find the binary... | 2018/07/04 | [
"https://Stackoverflow.com/questions/51174801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7529936/"
] | First: **capabilities** you were trying to use are for **[IOS only](https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md)**
On Android you have to find popup via `findElement` and *close them yourself*.
Second: since you start Appium session for **web application**, before searching for... | Try to set the capabilities like this:
```
caps.setCapability("autoDismissAlerts", true);
caps.setCapability("autoGrantPermissions", true);
caps.setCapability("autoAcceptAlerts", true);
......
driver.switchTo().alert().accept();
```
If it won't help, try to find your 'ALLOW' button using this xPath:
```
//*[. = 'Al... |
51,174,801 | I am trying to find out a way to extract or read just one type of content from a text file using java.
**Let's say my text file contains:**
>
> What's your name, 00 5 6 0 K Write your 0 9 2 Name Let's not Talk
> about 1 1 0 5 it
>
>
>
Now what i want it - my java program to run and able to only find the binary... | 2018/07/04 | [
"https://Stackoverflow.com/questions/51174801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7529936/"
] | I had similar problem like yourself, here is how I solved this:
This is part of code from my page object where when clicking on useGPS, native Android notification is shown to allow or block GPS usage,
```
public Alert clickButtonUseGPSwithAlert() {
buttonUseGps.click();
Validate.action(getSessionInfo(), "cli... | Try to set the capabilities like this:
```
caps.setCapability("autoDismissAlerts", true);
caps.setCapability("autoGrantPermissions", true);
caps.setCapability("autoAcceptAlerts", true);
......
driver.switchTo().alert().accept();
```
If it won't help, try to find your 'ALLOW' button using this xPath:
```
//*[. = 'Al... |
51,174,801 | I am trying to find out a way to extract or read just one type of content from a text file using java.
**Let's say my text file contains:**
>
> What's your name, 00 5 6 0 K Write your 0 9 2 Name Let's not Talk
> about 1 1 0 5 it
>
>
>
Now what i want it - my java program to run and able to only find the binary... | 2018/07/04 | [
"https://Stackoverflow.com/questions/51174801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7529936/"
] | First: **capabilities** you were trying to use are for **[IOS only](https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md)**
On Android you have to find popup via `findElement` and *close them yourself*.
Second: since you start Appium session for **web application**, before searching for... | I had similar problem like yourself, here is how I solved this:
This is part of code from my page object where when clicking on useGPS, native Android notification is shown to allow or block GPS usage,
```
public Alert clickButtonUseGPSwithAlert() {
buttonUseGps.click();
Validate.action(getSessionInfo(), "cli... |
17,461,228 | ```
<input type="button" value="Button 1" id="btn1" />
<input type="button" value="Button 2" id="btn2" />
<input type="button" value="Button 3" id="btn3" onclick="buttonClicked();"/>
<script type="text/javascript">
function buttonClicked(){
var text = (this === window) ? 'window' : this.id;
... | 2013/07/04 | [
"https://Stackoverflow.com/questions/17461228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2507818/"
] | ```
button1.onclick = buttonClicked;
```
It shows `btn1` because onclick (a property of button1) now points to `buttonClicked`, so the context of this call is `button1`
```
button2.onclick = function(){
buttonClicked();
};
```
It shows `window` because onclick (a property of button2) now points to an anonymo... | **Basics**
When a click handler is defined like this:
```
button.onclick = some_function;
```
As the button is clicked, JavaScript will actually run this:
```
some_function.call(button, ...);
```
In other words, a reference to the button element is bound as `this` inside the handler.
**Anonymous function**
Le... |
70,141,171 | I need help with debugging this code.
The program should modify the list (magicians) by adding
the phrase "the Great" after each item. Call show\_magicians() to
see that the list has actually been modified.
```py
#Add 'Great' suffix to magician names
def make_great(magicians):
print("Greatifying Magicians...")
mag... | 2021/11/28 | [
"https://Stackoverflow.com/questions/70141171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15752190/"
] | In place modification
=====================
```
magicians[:] = ['{0} the Great'.format(mag) for mag in magicians]
```
In place modification is required to actually change the values. When you use the equals assign, it creates a new variable altogether, which we do not want. While this may seem awkward, putting the `... | You must return the value of the `make_great` function then assign a variable to it.
```
def make_great(magicians):
print("Greatifying Magicians...")
magicians = ['{0} the Great'.format(mag) for mag in magicians]
return magicians
#Display magician names
def show_magicians(magicians):
for magician in magicians... |
21,715,375 | Is there any way to use a memory stream as input for [php\_strip\_whitespace](http://www.php.net/manual/en/function.php-strip-whitespace.php)?
I've tried this, but it's not working because php://memory is recreated each time a handle is open:
```
$stream = 'php://memory';
$fp = fopen($stream, 'r+');
fwrite($fp,... | 2014/02/11 | [
"https://Stackoverflow.com/questions/21715375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/528065/"
] | Finally I got this solution, thanks to Wrikken:
```
class DummyMemoryStreamWrapper {
const WRAPPER_NAME = 'var';
private static $_content;
private $_position;
/**
* Prepare a new memory stream with the specified content
* @return string
*/
public static function prepare($content) {
if (!in_array(self::WRAPPE... | Why not just create a temporary file?
```
<?php
$temp = tmpfile();
fwrite($temp, "writing to tempfile");
$info = stream_get_meta_data($temp);
var_dump(php_strip_whitespace($info['uri']));
fclose($temp); // this removes the file
?>
``` |
22,326,074 | ```
if (isset($_POST['button']) and $_POST['button'] == 'Join')
{
include '../includes/db.inc.php';
$id = mysqli_real_escape_string($link, $_POST['id']);
$user = $_SESSION['user'];
$start = date("d-m-Y");
$finish = 'NULL';
$job = 'NULL';
$sql = "INSERT INTO userproj SET user='$user', projectid='$id', dat... | 2014/03/11 | [
"https://Stackoverflow.com/questions/22326074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2106265/"
] | This is not correct: `job='$job'`, because in job is `NULL`, then it will be `job='NULL'`, but it should be `job=NULL`. Also the same with `datestop`.
Change your query to this:
```
$sql = "INSERT INTO userproj SET user='$user', projectid='$id', datestart='$start', datestop=$finish, job=$job";
``` | Try using different name for button
```
<form name="form2" action="?goto=display&id=<?php htmlout($id); ?>" method="post">
<input type="hidden" name="id" value="<?php htmlout($id); ?>"/>
<input type="submit" name="mesubmit" value="Join"/>
</form>
``` |
22,326,074 | ```
if (isset($_POST['button']) and $_POST['button'] == 'Join')
{
include '../includes/db.inc.php';
$id = mysqli_real_escape_string($link, $_POST['id']);
$user = $_SESSION['user'];
$start = date("d-m-Y");
$finish = 'NULL';
$job = 'NULL';
$sql = "INSERT INTO userproj SET user='$user', projectid='$id', dat... | 2014/03/11 | [
"https://Stackoverflow.com/questions/22326074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2106265/"
] | Try `$_SERVER['PHP_SELF'];`
```
<form action="<?php $_SERVER['PHP_SELF'];?>?goto=display&id=<?php htmlout($id); ?>" method="post">
``` | Try using different name for button
```
<form name="form2" action="?goto=display&id=<?php htmlout($id); ?>" method="post">
<input type="hidden" name="id" value="<?php htmlout($id); ?>"/>
<input type="submit" name="mesubmit" value="Join"/>
</form>
``` |
10,518,352 | I'm attempting to find the correct Razor syntax for mutually exclusive radio buttons that both reflect the value of a boolean property on my model. My model has this:
```
public bool IsFemale{ get; set; }
```
I would like to display this with two radio buttons, one "Male" and the other "Female," but everything I've ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10518352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27457/"
] | Try like this:
```
@Html.RadioButtonFor(model => model.IsFemale, "false") Male
@Html.RadioButtonFor(model => model.IsFemale, "true") Female
```
And here's the full code:
Model:
```
public class MyViewModel
{
public bool IsFemale { get; set; }
}
```
Controller:
```
public class HomeController : Controller
{
... | In MVC 6 (ASP.NET Core) this can also be achieved with tag helpers:
```
<label>
<input type="radio" asp-for="IsFemale" value="false" /> Male
</label>
<label>
<input type="radio" asp-for="IsFemale" value="true" /> Female
</label>
``` |
10,518,352 | I'm attempting to find the correct Razor syntax for mutually exclusive radio buttons that both reflect the value of a boolean property on my model. My model has this:
```
public bool IsFemale{ get; set; }
```
I would like to display this with two radio buttons, one "Male" and the other "Female," but everything I've ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10518352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27457/"
] | Try like this:
```
@Html.RadioButtonFor(model => model.IsFemale, "false") Male
@Html.RadioButtonFor(model => model.IsFemale, "true") Female
```
And here's the full code:
Model:
```
public class MyViewModel
{
public bool IsFemale { get; set; }
}
```
Controller:
```
public class HomeController : Controller
{
... | As far as September 2022.
Boolean radio button using: .NET Framework 4.7.2, MVC 5.2.7, Bootstrap 5.1.3.
Model
=====
```cs
public class TheViewModel
{
public bool IndustrialDegree { get; set; }
}
```
View
====
```
<div class="col-4 col-md-2 mb-3">
@Html.Label("Industrial Degree", new { @class = "d-block fo... |
10,518,352 | I'm attempting to find the correct Razor syntax for mutually exclusive radio buttons that both reflect the value of a boolean property on my model. My model has this:
```
public bool IsFemale{ get; set; }
```
I would like to display this with two radio buttons, one "Male" and the other "Female," but everything I've ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10518352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27457/"
] | In MVC 6 (ASP.NET Core) this can also be achieved with tag helpers:
```
<label>
<input type="radio" asp-for="IsFemale" value="false" /> Male
</label>
<label>
<input type="radio" asp-for="IsFemale" value="true" /> Female
</label>
``` | As far as September 2022.
Boolean radio button using: .NET Framework 4.7.2, MVC 5.2.7, Bootstrap 5.1.3.
Model
=====
```cs
public class TheViewModel
{
public bool IndustrialDegree { get; set; }
}
```
View
====
```
<div class="col-4 col-md-2 mb-3">
@Html.Label("Industrial Degree", new { @class = "d-block fo... |
16,614,382 | I'm struggling a little bit with how to design a system to keep track of bills and payments. I currently have two functioning objects (`Bill` and `Payment`), but can't settle on a way to keep track of the accounting between them.
Fundamentally, I just need to know which specific bills have been paid off and the total ... | 2013/05/17 | [
"https://Stackoverflow.com/questions/16614382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1575497/"
] | One table: transactions. Bills have a positive value, payments have a negative value. You can give it a column for transaction\_type if you want (Invoice, Payment, Credit, Refund), and you can even use Rails STI on that column if you *really* feel like it. Other useful columns - number, payment\_type (credit/cash/check... | If you can use a database, create only a table for bills and add a field of type boolean 'paid'. When you want to know if a bill has been paid check this field, when you want to know the global balance add the amounts of the paid bills and substract the unpaid ones.
If not, you could use a static var into any of those... |
16,614,382 | I'm struggling a little bit with how to design a system to keep track of bills and payments. I currently have two functioning objects (`Bill` and `Payment`), but can't settle on a way to keep track of the accounting between them.
Fundamentally, I just need to know which specific bills have been paid off and the total ... | 2013/05/17 | [
"https://Stackoverflow.com/questions/16614382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1575497/"
] | One table: transactions. Bills have a positive value, payments have a negative value. You can give it a column for transaction\_type if you want (Invoice, Payment, Credit, Refund), and you can even use Rails STI on that column if you *really* feel like it. Other useful columns - number, payment\_type (credit/cash/check... | * A Bill has\_many Payments, thus a Payment has\_one Bill (and your payments table will have a bill\_id field). This is the only sensible way to model this, I'd argue.
* Don't worry about "continue to do the same calculation over and over". Get your object model right, and then worry about optimization later on. CPU ti... |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | The 'Enter some junk value' answer didn't do the trick for me, my site was continuing to load despite the entered junk.
Instead I added the following line to the top of the .htaccess file:
```
deny from all
```
This will quickly let you know if .htaccess is being picked up or not. If the .htaccess is being used, th... | Check whether the permission to read and execute the .htaccess by apache process is possible. Looking into the error\_log of Apache will help you to sort the permission related error. |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | Enter some junk value into your `.htaccess`
e.g. `foo bar`, `sakjnaskljdnas`
any keyword not recognized by htaccess
and visit your URL. If it is working, you should get a
>
> 500 Internal Server Error
>
>
> Internal Server Error
> =====================
>
>
> The server encountered an internal error or misconfig... | Why not put some junk in your .htaccess file and try to reload apache. If apache fails to start you know its working. Remove the junk then reload apache if it loads congrats you configured .htaccess correctly. |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | Generally any change in the .htaccess should have visible effects. If no effect, check your configuration apache files, something like:
```
<Directory ..>
...
AllowOverride None
...
</Directory>
```
Should be changed to
```
AllowOverride All
```
And you'll be able to change directives in .htaccess fi... | If you have access to apache bin directory you can use,
`httpd -M` to check loaded modules first.
>
>
> ```
> info_module (shared)
> isapi_module (shared)
> log_config_module (shared)
> cache_disk_module (shared)
> mime_module (shared)
> negotiation_module (shared)
> proxy_module (shared)
> proxy_ajp_module... |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | Enter some junk value into your `.htaccess`
e.g. `foo bar`, `sakjnaskljdnas`
any keyword not recognized by htaccess
and visit your URL. If it is working, you should get a
>
> 500 Internal Server Error
>
>
> Internal Server Error
> =====================
>
>
> The server encountered an internal error or misconfig... | If you have access to apache bin directory you can use,
`httpd -M` to check loaded modules first.
>
>
> ```
> info_module (shared)
> isapi_module (shared)
> log_config_module (shared)
> cache_disk_module (shared)
> mime_module (shared)
> negotiation_module (shared)
> proxy_module (shared)
> proxy_ajp_module... |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | Generally any change in the .htaccess should have visible effects. If no effect, check your configuration apache files, something like:
```
<Directory ..>
...
AllowOverride None
...
</Directory>
```
Should be changed to
```
AllowOverride All
```
And you'll be able to change directives in .htaccess fi... | Why not put some junk in your .htaccess file and try to reload apache. If apache fails to start you know its working. Remove the junk then reload apache if it loads congrats you configured .htaccess correctly. |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | If you have access to apache bin directory you can use,
`httpd -M` to check loaded modules first.
>
>
> ```
> info_module (shared)
> isapi_module (shared)
> log_config_module (shared)
> cache_disk_module (shared)
> mime_module (shared)
> negotiation_module (shared)
> proxy_module (shared)
> proxy_ajp_module... | Why not put some junk in your .htaccess file and try to reload apache. If apache fails to start you know its working. Remove the junk then reload apache if it loads congrats you configured .htaccess correctly. |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | To answer the first question of the three asked, a simple way to see if the .htaccess file is working or not is to trigger a custom error at the top of the .htaccess file:
```
ErrorDocument 200 "Hello. This is your .htaccess file talking."
RewriteRule ^ - [L,R=200]
```
On to your second question, if the .htaccess fi... | Why not put some junk in your .htaccess file and try to reload apache. If apache fails to start you know its working. Remove the junk then reload apache if it loads congrats you configured .htaccess correctly. |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | The 'Enter some junk value' answer didn't do the trick for me, my site was continuing to load despite the entered junk.
Instead I added the following line to the top of the .htaccess file:
```
deny from all
```
This will quickly let you know if .htaccess is being picked up or not. If the .htaccess is being used, th... | Why not put some junk in your .htaccess file and try to reload apache. If apache fails to start you know its working. Remove the junk then reload apache if it loads congrats you configured .htaccess correctly. |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | To answer the first question of the three asked, a simple way to see if the .htaccess file is working or not is to trigger a custom error at the top of the .htaccess file:
```
ErrorDocument 200 "Hello. This is your .htaccess file talking."
RewriteRule ^ - [L,R=200]
```
On to your second question, if the .htaccess fi... | To test your htaccess rewrite rules, simply fill in the url that you're applying the rules to, place the contents of your htaccess on the larger input area and press "Test" button.
<http://htaccess.mwl.be/> |
9,234,289 | I have a `RewriteRule` in a `.htaccess` file that isn't doing anything. How do I troubleshoot this?
* How can I verify if the `.htaccess` file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where would that line be echoed out?
* If the `.htaccess` file isn't bei... | 2012/02/10 | [
"https://Stackoverflow.com/questions/9234289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431918/"
] | To test your htaccess rewrite rules, simply fill in the url that you're applying the rules to, place the contents of your htaccess on the larger input area and press "Test" button.
<http://htaccess.mwl.be/> | Why not put some junk in your .htaccess file and try to reload apache. If apache fails to start you know its working. Remove the junk then reload apache if it loads congrats you configured .htaccess correctly. |
11,726,043 | I'm no code genius, but a fan of action script.
Can you help me on this:
I have a function that depending on the object selected, will call event listeners to a set of 'sub-items' that are already on stage (I want to reuse this subitems with changed parameters upon click, instead of creating several instances and seve... | 2012/07/30 | [
"https://Stackoverflow.com/questions/11726043",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1563550/"
] | (I'm not sure I got your question right, and I haven't developed in AS3 for a while.)
If you want to simply create function with parameters which will be called upon a click (or other event) you can simply use this:
```
btUa1.addEventListener(MouseEvent.CLICK, function() {
fooMenu(parameters);
});
btUa2.addEventLi... | Your question is rather vague; what "variables" do you want to "pass"? And what do you mean by "passing the variable to a sub item"? Usually "passing" means invoking a function.
If you can be more specific on what exactly your trying to do that would be helpful. In the meantime, here are three things that may get at w... |
12,539,361 | Let's say I have an unordered list, like this:
```
<ul id="birds">
<li>Bald Eagle</li>
<li>Falcon</li>
<li>Condor</li>
<li>Albatross</li>
<li>Parrot</li>
</ul>
```
With plain JavaScript (not including jQuery), I would like to be able to do reverse the order of this list - so that it matches the following e... | 2012/09/21 | [
"https://Stackoverflow.com/questions/12539361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/678629/"
] | You can do it like this (in plain javascript). You can just cycle through the `li` tags in reverse order and append them to the parent. This will have the natural effect of reversing their order. You get the last one, append it to the end of the list, get the 2nd to last one, append it to the list. Get the 3rd to last ... | There's actually no need for JavaScript. If you were to use the semantically correct `<ol>` (ordered list) element here (since ordering does obviously matter to you), then you can use the `reversed` attribute to do the exact same thing without any script-dependencies! To reverse the order of the items visually, we'd sp... |
12,539,361 | Let's say I have an unordered list, like this:
```
<ul id="birds">
<li>Bald Eagle</li>
<li>Falcon</li>
<li>Condor</li>
<li>Albatross</li>
<li>Parrot</li>
</ul>
```
With plain JavaScript (not including jQuery), I would like to be able to do reverse the order of this list - so that it matches the following e... | 2012/09/21 | [
"https://Stackoverflow.com/questions/12539361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/678629/"
] | You can do it like this (in plain javascript). You can just cycle through the `li` tags in reverse order and append them to the parent. This will have the natural effect of reversing their order. You get the last one, append it to the end of the list, get the 2nd to last one, append it to the list. Get the 3rd to last ... | Untested, but try:
```
var parent = document.getElementById("birds");
var birdList = parent.getElementsByTagName("li");
for(var i = birdList.length-1; i > 0; --i) {
parent.appendChild(birdList[i];
}
``` |
12,539,361 | Let's say I have an unordered list, like this:
```
<ul id="birds">
<li>Bald Eagle</li>
<li>Falcon</li>
<li>Condor</li>
<li>Albatross</li>
<li>Parrot</li>
</ul>
```
With plain JavaScript (not including jQuery), I would like to be able to do reverse the order of this list - so that it matches the following e... | 2012/09/21 | [
"https://Stackoverflow.com/questions/12539361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/678629/"
] | You can do it like this (in plain javascript). You can just cycle through the `li` tags in reverse order and append them to the parent. This will have the natural effect of reversing their order. You get the last one, append it to the end of the list, get the 2nd to last one, append it to the list. Get the 3rd to last ... | Manipulating the `birdList` doesn't re-order the elements because `birdList` is just a collection - a [`NodeList`](https://developer.mozilla.org/en-US/docs/DOM/NodeList) - which is independent of the DOM itself.
You actually need to get a reference to the `<ul id="birds">` element and then use a combination of [`remov... |
12,539,361 | Let's say I have an unordered list, like this:
```
<ul id="birds">
<li>Bald Eagle</li>
<li>Falcon</li>
<li>Condor</li>
<li>Albatross</li>
<li>Parrot</li>
</ul>
```
With plain JavaScript (not including jQuery), I would like to be able to do reverse the order of this list - so that it matches the following e... | 2012/09/21 | [
"https://Stackoverflow.com/questions/12539361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/678629/"
] | ```js
const list = document.querySelector("ul");
Array.from(list.children).reverse().forEach(element =>list.appendChild(element));
``` | You can also do this. It works as follows:
* Grab all the bird list items (the `<li>` elements) and return them as a NodeList
* Convert the NodeList into an an array and reverse the array (since items in arrays can be reversed, but not items in NodeLists)
* Append each bird list item from the array into the original l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.