qid int64 4 8.14M | question stringlengths 20 48.3k | answers list | date stringlengths 10 10 | metadata list | input stringlengths 12 45k | output stringlengths 2 31.8k |
|---|---|---|---|---|---|---|
736,678 | <p>I have a paste command like this
<code>paste -d , file1.csv file2.csv file3.csv</code></p>
<p>And file2.csv contains numbers like this</p>
<pre><code>0.2
0.3339
0.111111
</code></pre>
<p>I want the values in file2.csv having 3 decimals like this:</p>
<pre><code>0.200
0.334
0.111
</code></pre>
<p>For one value this i... | [
{
"answer_id": 736684,
"author": "DopeGhoti",
"author_id": 20246,
"author_profile": "https://unix.stackexchange.com/users/20246",
"pm_score": 4,
"selected": true,
"text": "<p>You're close; you just need to tell <code>printf</code> to zero-pad to the right of the decimal point:</p>\n<pre>... | 2023/02/24 | [
"https://unix.stackexchange.com/questions/736678",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/558210/"
] | I have a paste command like this
`paste -d , file1.csv file2.csv file3.csv`
And file2.csv contains numbers like this
```
0.2
0.3339
0.111111
```
I want the values in file2.csv having 3 decimals like this:
```
0.200
0.334
0.111
```
For one value this is working:
`printf "%.3f" "0.3339"` -> `0.334`
But for multi... | You're close; you just need to tell `printf` to zero-pad to the right of the decimal point:
```
$ cat 736678.txt
0.2
0.3339
0.111111
$ for value in $( cat 736678.txt ); do printf "%.3f\n" "$value"; done
0.200
0.334
0.111
```
The format string `%.3f` means "a floating-point number with precisely three decimal places ... |
736,706 | <p>I have two files that both have the field "tumor id". Both are comma delimited. I need to add a field that is uniquely in file 2 to file 1, and I want to add the lines of the field according to their corresponding strings in "tumor id". An example format is:</p>
<p>File 1</p>
<pre><code>Tumor_ID,... | [
{
"answer_id": 736684,
"author": "DopeGhoti",
"author_id": 20246,
"author_profile": "https://unix.stackexchange.com/users/20246",
"pm_score": 4,
"selected": true,
"text": "<p>You're close; you just need to tell <code>printf</code> to zero-pad to the right of the decimal point:</p>\n<pre>... | 2023/02/24 | [
"https://unix.stackexchange.com/questions/736706",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/477496/"
] | I have two files that both have the field "tumor id". Both are comma delimited. I need to add a field that is uniquely in file 2 to file 1, and I want to add the lines of the field according to their corresponding strings in "tumor id". An example format is:
File 1
```
Tumor_ID, Chromosome, start, end,
xxxxx, 2... | You're close; you just need to tell `printf` to zero-pad to the right of the decimal point:
```
$ cat 736678.txt
0.2
0.3339
0.111111
$ for value in $( cat 736678.txt ); do printf "%.3f\n" "$value"; done
0.200
0.334
0.111
```
The format string `%.3f` means "a floating-point number with precisely three decimal places ... |
736,748 | <p>I am trying to do the same for <a href="https://github.com/eneshecan/whatsapp-for-linux/releases" rel="nofollow noreferrer">https://github.com/eneshecan/whatsapp-for-linux/releases</a> as is described here: <a href="https://unix.stackexchange.com/questions/7641/download-and-install-latest-deb-package-from-github-via... | [
{
"answer_id": 736684,
"author": "DopeGhoti",
"author_id": 20246,
"author_profile": "https://unix.stackexchange.com/users/20246",
"pm_score": 4,
"selected": true,
"text": "<p>You're close; you just need to tell <code>printf</code> to zero-pad to the right of the decimal point:</p>\n<pre>... | 2023/02/24 | [
"https://unix.stackexchange.com/questions/736748",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/390472/"
] | I am trying to do the same for <https://github.com/eneshecan/whatsapp-for-linux/releases> as is described here: [Download and install latest deb package from github via terminal](https://unix.stackexchange.com/questions/7641/download-and-install-latest-deb-package-from-github-via-terminal)
but cant get it to work, it s... | You're close; you just need to tell `printf` to zero-pad to the right of the decimal point:
```
$ cat 736678.txt
0.2
0.3339
0.111111
$ for value in $( cat 736678.txt ); do printf "%.3f\n" "$value"; done
0.200
0.334
0.111
```
The format string `%.3f` means "a floating-point number with precisely three decimal places ... |
736,833 | <p>I'm running a headless Raspberry Pi, and would like to convert the console/terminal output to a single jpeg or video stream.</p>
<p>For example: capture the output of <code>pbytop</code> every few seconds and stream it to a website using mjpeg (or through ffmpeg as a h264 stream).</p>
<p>I'm just stuck on the jpeg/v... | [
{
"answer_id": 736684,
"author": "DopeGhoti",
"author_id": 20246,
"author_profile": "https://unix.stackexchange.com/users/20246",
"pm_score": 4,
"selected": true,
"text": "<p>You're close; you just need to tell <code>printf</code> to zero-pad to the right of the decimal point:</p>\n<pre>... | 2023/02/25 | [
"https://unix.stackexchange.com/questions/736833",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/374245/"
] | I'm running a headless Raspberry Pi, and would like to convert the console/terminal output to a single jpeg or video stream.
For example: capture the output of `pbytop` every few seconds and stream it to a website using mjpeg (or through ffmpeg as a h264 stream).
I'm just stuck on the jpeg/video capturing part, strea... | You're close; you just need to tell `printf` to zero-pad to the right of the decimal point:
```
$ cat 736678.txt
0.2
0.3339
0.111111
$ for value in $( cat 736678.txt ); do printf "%.3f\n" "$value"; done
0.200
0.334
0.111
```
The format string `%.3f` means "a floating-point number with precisely three decimal places ... |
736,886 | <p>I need an advice about a bad situation.</p>
<p>I was installing a new linux ditro by using my main PC. I booted with the ISO and then installed the distro on <code>/dev/sdc</code>, which was an external USB drive.
My bad, I didn't realized when installing, that I didn't change the <code>boot loader</code> installati... | [
{
"answer_id": 736891,
"author": "telcoM",
"author_id": 258991,
"author_profile": "https://unix.stackexchange.com/users/258991",
"pm_score": 1,
"selected": false,
"text": "<p>With your kernel boot options:</p>\n<pre><code>console=ttyAMA0,115200 console=tty0,115200\n</code></pre>\n<p>the ... | 2023/02/25 | [
"https://unix.stackexchange.com/questions/736886",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562197/"
] | I need an advice about a bad situation.
I was installing a new linux ditro by using my main PC. I booted with the ISO and then installed the distro on `/dev/sdc`, which was an external USB drive.
My bad, I didn't realized when installing, that I didn't change the `boot loader` installation on the same drive, but I lef... | Solved with [xuancong84's answer](https://unix.stackexchange.com/a/707329/339777) on a similar question:
`setsid sh -c 'exec sh </dev/ttyAMA0 >/dev/ttyAMA0 2>&1'` |
736,929 | <p>I am learning about UNIX file permissions and I saw that on my Ubuntu system, /var/mail has the setgid bit set. Why is this?</p>
<pre><code>$ ls /var/mail/ -dl
drwxrwsr-x 2 root mail 4096 Feb 23 05:57 /var/mail/
</code></pre>
<p>This book I'm reading says:</p>
<blockquote>
<p>Setgid is useful when you have groups o... | [
{
"answer_id": 736955,
"author": "Paul Miller",
"author_id": 494878,
"author_profile": "https://unix.stackexchange.com/users/494878",
"pm_score": 0,
"selected": false,
"text": "<p>Within /var/mail/ the individual files are uid the delivery user. This allows any user to be able to write o... | 2023/02/25 | [
"https://unix.stackexchange.com/questions/736929",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562224/"
] | I am learning about UNIX file permissions and I saw that on my Ubuntu system, /var/mail has the setgid bit set. Why is this?
```
$ ls /var/mail/ -dl
drwxrwsr-x 2 root mail 4096 Feb 23 05:57 /var/mail/
```
This book I'm reading says:
>
> Setgid is useful when you have groups of users who need to share a lot of fil... | The local email is not handled by just one service, but several services. Besides the actual Mail Transfer Agent (MTA for short: typically `postfix`, `exim`, `sendmail` or similar), there can be mail filtering/post-processing utilities (like the old `procmail`), services to enable remote access to user mailboxes (vario... |
736,977 | <p>I need to find all lines in my data file that contain NO_ID and then replace the string "confirmed" by "to be confirmed".</p>
<p>I tried this:</p>
<pre><code>sed '/NO_ID/, s/confirmed/to be confirmed/' stats.txt
</code></pre>
<p>which doesn't seem to work.</p>
| [
{
"answer_id": 736978,
"author": "Gilles Quénot",
"author_id": 12574,
"author_profile": "https://unix.stackexchange.com/users/12574",
"pm_score": 1,
"selected": false,
"text": "<p>Like this:</p>\n<pre><code>sed '/NO_ID/ s/confirmed/to be confirmed/' stats.txt\n# ^\n</code></pre>... | 2023/02/26 | [
"https://unix.stackexchange.com/questions/736977",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562270/"
] | I need to find all lines in my data file that contain NO\_ID and then replace the string "confirmed" by "to be confirmed".
I tried this:
```
sed '/NO_ID/, s/confirmed/to be confirmed/' stats.txt
```
which doesn't seem to work. | Remove the comma. The initial regular expression acts as the "address" for the subsequent `s` command (the space shown here between the address and the command is optional):
```bash
sed '/NO_ID/ s/confirmed/to be confirmed/' stats.txt
```
This could be further shortened if we replace the word `confirmed` with the th... |
736,990 | <p>Why does this not work?<br />
<code>find / -ls 2>/dev/null | awk '$7 > max {max = $7}; END {print max}'</code><br />
This does work:<br />
<code>find / -printf "%s\n" 2>/dev/null | sort -nr |head -n1</code></p>
<p>In the first one, $7 is the size of the file, so idk why it doesnt work</p>
| [
{
"answer_id": 736993,
"author": "JdeHaan",
"author_id": 44864,
"author_profile": "https://unix.stackexchange.com/users/44864",
"pm_score": 0,
"selected": false,
"text": "<p>Strange. I got this working though:</p>\n<pre><code>sudo find /boot -ls | awk '$7 > max {name = $11 ; max = $7}... | 2023/02/26 | [
"https://unix.stackexchange.com/questions/736990",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562224/"
] | Why does this not work?
`find / -ls 2>/dev/null | awk '$7 > max {max = $7}; END {print max}'`
This does work:
`find / -printf "%s\n" 2>/dev/null | sort -nr |head -n1`
In the first one, $7 is the size of the file, so idk why it doesnt work | You won't get the size in the 7th field in `find / -ls` output:
* for device files where you get the device major number instead
* if the user or group name contains blank characters
* if file paths (including targets of symlinks) have newline characters.
Also beware that some of those files may be virtual. For insta... |
736,996 | <p>I have a <strong>file1.html</strong>:</p>
<pre><code><!doctype html>
<html>
<head>
</head>
<body>
text
<!-- start-replacing -->
<p>more text1</p>
<p>more text2</p>
<!-- end-replacing -->
other text
</body>
</html>
</code></... | [
{
"answer_id": 736998,
"author": "HatLess",
"author_id": 480066,
"author_profile": "https://unix.stackexchange.com/users/480066",
"pm_score": 0,
"selected": false,
"text": "<p>Using <code>sed</code></p>\n<pre><code>$ sed -Ee '/start-replacing/{{r file2.txt' -e '};n;:a;N;s/.*\\n(.*end-rep... | 2023/02/26 | [
"https://unix.stackexchange.com/questions/736996",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/558210/"
] | I have a **file1.html**:
```
<!doctype html>
<html>
<head>
</head>
<body>
text
<!-- start-replacing -->
<p>more text1</p>
<p>more text2</p>
<!-- end-replacing -->
other text
</body>
</html>
```
and a **file2.txt**
```
<p>some text</p>
<div>some other text</div>
```
Now I'm looking for a command to... | With `perl`:
```
perl -0777 -pe '
BEGIN{$repl = <STDIN>}
s/<!-- start-replacing -->\K.*?(?=<!-- end-replacing -->)/$repl/sg
' file1.html < file2.txt > output.html
``` |
736,999 | <p>I want to copy all the files that <strong>begin with two digits followed by an underscore</strong>.
My code below did not copy any files to the <code>KIRC</code> folder.</p>
<pre><code>cp -R ~/KIRP/[0-9][0-9]_* ~/KIRC/
</code></pre>
<p>Example contents of the <code>KIRP</code> folder:</p>
<pre><code>11_abc.py
9_efg... | [
{
"answer_id": 737000,
"author": "Stéphane Chazelas",
"author_id": 22565,
"author_profile": "https://unix.stackexchange.com/users/22565",
"pm_score": 2,
"selected": false,
"text": "<p><code>9_efg.R</code> doesn't match that pattern as there's only one digit before the <code>_</code>. <co... | 2023/02/26 | [
"https://unix.stackexchange.com/questions/736999",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562286/"
] | I want to copy all the files that **begin with two digits followed by an underscore**.
My code below did not copy any files to the `KIRC` folder.
```
cp -R ~/KIRP/[0-9][0-9]_* ~/KIRC/
```
Example contents of the `KIRP` folder:
```
11_abc.py
9_efg.R
hij_12.csv
```
Expected output:
11\_abc.py
9\_efg.R | `9_efg.R` doesn't match that pattern as there's only one digit before the `_`. `11_abc.py` does though. Maybe you tried that from the `fish` shell that doesn't support the `[...]` glob operator.
If you want to copy files whose name starts with a number between 0 and 99 followed by `_` regardless of how many digits are... |
737,018 | <p>According to the JSON specification, forward slashes don't <em>have</em> to be escaped with a backslash but they <em>can</em> be.<br />
I have a JSON file which has all forward slashes in string values escaped for compatibly reasons (but not inside the keys):</p>
<pre class="lang-json prettyprint-override"><code>{
... | [
{
"answer_id": 737026,
"author": "Stéphane Chazelas",
"author_id": 22565,
"author_profile": "https://unix.stackexchange.com/users/22565",
"pm_score": 3,
"selected": true,
"text": "<p>I'd be surprised if you could. <code>jq</code> decodes its input, does its operations and encodes the res... | 2023/02/26 | [
"https://unix.stackexchange.com/questions/737018",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/438747/"
] | According to the JSON specification, forward slashes don't *have* to be escaped with a backslash but they *can* be.
I have a JSON file which has all forward slashes in string values escaped for compatibly reasons (but not inside the keys):
```json
{
"proto://some/path": "\/\/some\/path"
}
```
However, `jq` auto... | I'd be surprised if you could. `jq` decodes its input, does its operations and encodes the resulting object as json. Upon encoding and outputting, it outputs those strings encoded in JSON and the information that there were `\`s in front of `/`s has long been lost. Same would happen if those `/`s where initially writte... |
737,022 | <p>My FreeBSD 11 gives:</p>
<pre><code>[root@freebsd11 ~]# pkg install perl
Updating FreeBSD repository catalogue...
Certificate verification failed for /O=Digital Signature Trust Co./CN=DST Root CA X3
34406394360:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:/usr/src/crypto/openssl/... | [
{
"answer_id": 737026,
"author": "Stéphane Chazelas",
"author_id": 22565,
"author_profile": "https://unix.stackexchange.com/users/22565",
"pm_score": 3,
"selected": true,
"text": "<p>I'd be surprised if you could. <code>jq</code> decodes its input, does its operations and encodes the res... | 2023/02/26 | [
"https://unix.stackexchange.com/questions/737022",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/2972/"
] | My FreeBSD 11 gives:
```
[root@freebsd11 ~]# pkg install perl
Updating FreeBSD repository catalogue...
Certificate verification failed for /O=Digital Signature Trust Co./CN=DST Root CA X3
34406394360:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/s3_clnt.c... | I'd be surprised if you could. `jq` decodes its input, does its operations and encodes the resulting object as json. Upon encoding and outputting, it outputs those strings encoded in JSON and the information that there were `\`s in front of `/`s has long been lost. Same would happen if those `/`s where initially writte... |
737,039 | <p>I want to redirect the content of two files to a single file named <code>ooo.txt</code>.</p>
<p>I also want to only take some specific lines of the second file using <code>grep</code> (in this case 5 lines before and 25 lines after <strong>'lol'</strong>) WITHOUT using parenthesis</p>
<p>Here's the command that I us... | [
{
"answer_id": 737041,
"author": "Nasir Riley",
"author_id": 270732,
"author_profile": "https://unix.stackexchange.com/users/270732",
"pm_score": 2,
"selected": true,
"text": "<p>The commands are working exactly as designed.</p>\n<p>First:</p>\n<pre><code>cat [file1]\n</code></pre>\n<p>S... | 2023/02/26 | [
"https://unix.stackexchange.com/questions/737039",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/561708/"
] | I want to redirect the content of two files to a single file named `ooo.txt`.
I also want to only take some specific lines of the second file using `grep` (in this case 5 lines before and 25 lines after **'lol'**) WITHOUT using parenthesis
Here's the command that I used:
```bash
cat [file1] && cat [file2] | grep "... | The commands are working exactly as designed.
First:
```
cat [file1]
```
Sends the output of `file1` to `stdout`.
Next:
```
&&
```
Tells it run what comes after if what comes before as an exit status of `0` which it is.
Finally
```
cat [file2] | grep "lol" -B 5 -A 25 > ooo.txt
```
Use the `stdout` out of `... |
737,072 | <p>This is probably in the zsh manual, apologies for being lazy and asking it here. There seems to be something special about :t in zsh, as witnessed by the following example.</p>
<pre><code>% x=foo
% echo $x:bar
foo:bar
% echo $x:toad
foooad
</code></pre>
<p>The behavior with <code>$x:bar</code> is the expected one, ... | [
{
"answer_id": 737074,
"author": "Freddy",
"author_id": 332764,
"author_profile": "https://unix.stackexchange.com/users/332764",
"pm_score": 5,
"selected": true,
"text": "<p><code>:t</code> is a <a href=\"https://zsh.sourceforge.io/Doc/Release/Expansion.html#Modifiers\" rel=\"nofollow no... | 2023/02/27 | [
"https://unix.stackexchange.com/questions/737072",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562376/"
] | This is probably in the zsh manual, apologies for being lazy and asking it here. There seems to be something special about :t in zsh, as witnessed by the following example.
```
% x=foo
% echo $x:bar
foo:bar
% echo $x:toad
foooad
```
The behavior with `$x:bar` is the expected one, but `:t` seems to backspace. Can som... | `:t` is a [Modifier](https://zsh.sourceforge.io/Doc/Release/Expansion.html#Modifiers)
>
> `t [ digits ]`
>
> Remove all leading pathname components, leaving the final component (tail). This works like ‘`basename`’. Any trailing slashes
> are first removed. Decimal digits are handled as described above for
> (h), b... |
737,099 | <p>on the following example <code>fstab</code> file, we want to delete all lines that start with <code>UUID</code> , but except the <code>UUID</code> line with <code>boot</code> word</p>
<pre><code>/dev/mapper/VG100-lv_root / xfs defaults 0 0
UUID=735cb76a-51b5-4e06-b6fb-3b9577e38dc5 /b... | [
{
"answer_id": 737101,
"author": "Gilles Quénot",
"author_id": 12574,
"author_profile": "https://unix.stackexchange.com/users/12574",
"pm_score": 2,
"selected": false,
"text": "<h4>With <a href=\"/questions/tagged/perl\" class=\"post-tag\" title=\"show questions tagged 'perl'\" a... | 2023/02/27 | [
"https://unix.stackexchange.com/questions/737099",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/237298/"
] | on the following example `fstab` file, we want to delete all lines that start with `UUID` , but except the `UUID` line with `boot` word
```
/dev/mapper/VG100-lv_root / xfs defaults 0 0
UUID=735cb76a-51b5-4e06-b6fb-3b9577e38dc5 /boot xfs defaults 0 0
/dev/ma... | First tell sed to print lines which contain `boot`, then tell it to delete lines which contain `UUID`, separate expressions with `;`
```
sed -i '/boot/p;/UUID/d' /etc/fstab
```
Since the print expression was given before delete expression, line which contains boot will be printed, before the lines with UUID are dele... |
737,104 | <p>I want to apply a unified diff from <code>mypatch.diff</code> to stdin and output the result to stdout.</p>
<p>So far, I have tried:</p>
<pre><code>patch -i mypatch.diff -o - -u originalfile
</code></pre>
<p>Which successfully applies <code>mypatch.diff</code> and prints the result to stdout. However, I still have t... | [
{
"answer_id": 737101,
"author": "Gilles Quénot",
"author_id": 12574,
"author_profile": "https://unix.stackexchange.com/users/12574",
"pm_score": 2,
"selected": false,
"text": "<h4>With <a href=\"/questions/tagged/perl\" class=\"post-tag\" title=\"show questions tagged 'perl'\" a... | 2023/02/27 | [
"https://unix.stackexchange.com/questions/737104",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/296048/"
] | I want to apply a unified diff from `mypatch.diff` to stdin and output the result to stdout.
So far, I have tried:
```
patch -i mypatch.diff -o - -u originalfile
```
Which successfully applies `mypatch.diff` and prints the result to stdout. However, I still have to provide the original file as `originalfile`, not v... | First tell sed to print lines which contain `boot`, then tell it to delete lines which contain `UUID`, separate expressions with `;`
```
sed -i '/boot/p;/UUID/d' /etc/fstab
```
Since the print expression was given before delete expression, line which contains boot will be printed, before the lines with UUID are dele... |
737,105 | <p>Contrived example:</p>
<pre><code>#!/usr/bin/bash
MYVAR=$(cat /somedir | grep -i myval)
</code></pre>
<p>Now I want:</p>
<pre><code>#!/usr/bin/bash
BASEDIR=/somedir
MYVAR=$(cat [BASEDIR?] | grep -i myval)
</code></pre>
<p>How should variable be passed to subshell?</p>
| [
{
"answer_id": 737101,
"author": "Gilles Quénot",
"author_id": 12574,
"author_profile": "https://unix.stackexchange.com/users/12574",
"pm_score": 2,
"selected": false,
"text": "<h4>With <a href=\"/questions/tagged/perl\" class=\"post-tag\" title=\"show questions tagged 'perl'\" a... | 2023/02/27 | [
"https://unix.stackexchange.com/questions/737105",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/257712/"
] | Contrived example:
```
#!/usr/bin/bash
MYVAR=$(cat /somedir | grep -i myval)
```
Now I want:
```
#!/usr/bin/bash
BASEDIR=/somedir
MYVAR=$(cat [BASEDIR?] | grep -i myval)
```
How should variable be passed to subshell? | First tell sed to print lines which contain `boot`, then tell it to delete lines which contain `UUID`, separate expressions with `;`
```
sed -i '/boot/p;/UUID/d' /etc/fstab
```
Since the print expression was given before delete expression, line which contains boot will be printed, before the lines with UUID are dele... |
737,116 | <p>I have input piped to awk on a macOS system. I want the sum of two decimal values. One occurs every second row, the other is on every fourth row. I want the result of the sum on every fifth row. The values are delimited by colon+space before, and a comma after. Every sixth row is empty. This pattern repeats until e... | [
{
"answer_id": 737119,
"author": "steve",
"author_id": 104877,
"author_profile": "https://unix.stackexchange.com/users/104877",
"pm_score": 0,
"selected": false,
"text": "<p>Here's one way, which takes your existing output and achieves the new desired output. Works fine with gawk 5.1.0 ... | 2023/02/27 | [
"https://unix.stackexchange.com/questions/737116",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/495622/"
] | I have input piped to awk on a macOS system. I want the sum of two decimal values. One occurs every second row, the other is on every fourth row. I want the result of the sum on every fifth row. The values are delimited by colon+space before, and a comma after. Every sixth row is empty. This pattern repeats until end o... | First, let's simplify your pipeline a little. I don't know what output `getlist` produces, but based on what you show, this will be equivalent with the minor change of not adding the `Total` line since that is only making it harder to parse and we will be adding it later:
```
getlist |
tr -d '"' |
awk '/BB|SH|RJ|DD... |
737,128 | <p>I am concatenating thousands of .txt files together but I want to keep the path written above the text of each .txt file so I can refer back to the directory to review files if needed.</p>
<p>Example:</p>
<p>file1.txt has the following content:</p>
<pre><code>id: 1234
info: 1234
id: abcd
info: abcd
</code></pre>
<p>... | [
{
"answer_id": 737131,
"author": "ralz",
"author_id": 26263,
"author_profile": "https://unix.stackexchange.com/users/26263",
"pm_score": 0,
"selected": false,
"text": "<p>By your question and comments it would seem you are entering the folder and then doing something like this:</p>\n<pre... | 2023/02/27 | [
"https://unix.stackexchange.com/questions/737128",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/554984/"
] | I am concatenating thousands of .txt files together but I want to keep the path written above the text of each .txt file so I can refer back to the directory to review files if needed.
Example:
file1.txt has the following content:
```
id: 1234
info: 1234
id: abcd
info: abcd
```
*The path to file1.txt is pathto/dir... | Loop across the to level of directories, loop across each set of subdirectories, loop across the files. Something like this
```
for topdir in */
do
top=${topdir%/}
top=${top##*/}
for subdir in "$topdir"/*/
do
sub=${subdir%/}
sub=${sub##*/}
printf -- '-%s\n--%s\n\n' "$top" "$su... |
737,148 | <p>While setting up my new PC I also setup a new RAID 1 with 2 drives with LUKS on top.
After copying all the data to it I made sure everything was usable and afterwards shredded the old drive.</p>
<p>But now I have no RAID anymore. I've found out that it's most likely due to me using full disks while creating the RAID... | [
{
"answer_id": 737254,
"author": "frostschutz",
"author_id": 30851,
"author_profile": "https://unix.stackexchange.com/users/30851",
"pm_score": 1,
"selected": false,
"text": "<p>Since RAID 1 is a simple mirror, you can ignore the RAID issue and instead search for the LUKS header directly... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737148",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562471/"
] | While setting up my new PC I also setup a new RAID 1 with 2 drives with LUKS on top.
After copying all the data to it I made sure everything was usable and afterwards shredded the old drive.
But now I have no RAID anymore. I've found out that it's most likely due to me using full disks while creating the RAID instead ... | Since RAID 1 is a simple mirror, you can ignore the RAID issue and instead search for the LUKS header directly. If no partitioning was involved, it should be somewhere around the start of the drive. Maybe with a few hundred MiB offset since `mdadm` uses quite generous data offsets.
The following command searches the f... |
737,166 | <p>I have created a perl script to merge 10 file in one. Each file has Keyword header/Trailer in file. So merged file has multiple header and trailer keyword. but I require the header and trailer to be present in start and end of merged file only.</p>
<p>Example:</p>
<p>File1.txt --></p>
<pre><code>Header
Content1
T... | [
{
"answer_id": 737254,
"author": "frostschutz",
"author_id": 30851,
"author_profile": "https://unix.stackexchange.com/users/30851",
"pm_score": 1,
"selected": false,
"text": "<p>Since RAID 1 is a simple mirror, you can ignore the RAID issue and instead search for the LUKS header directly... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737166",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562482/"
] | I have created a perl script to merge 10 file in one. Each file has Keyword header/Trailer in file. So merged file has multiple header and trailer keyword. but I require the header and trailer to be present in start and end of merged file only.
Example:
File1.txt -->
```
Header
Content1
Trailer
```
File2.txt -->
... | Since RAID 1 is a simple mirror, you can ignore the RAID issue and instead search for the LUKS header directly. If no partitioning was involved, it should be somewhere around the start of the drive. Maybe with a few hundred MiB offset since `mdadm` uses quite generous data offsets.
The following command searches the f... |
737,179 | <p>I have a bash script that sources a file, which sources another:</p>
<pre><code>script.sh:
cd /script/dir
source funcs.sh
funcs.sh:
...
source mode.sh
</code></pre>
<p>Now this script runs OK when I run it from command line, from within /script/dir.
But when I run it from crontab, the funcs.sh file can't find mode... | [
{
"answer_id": 737191,
"author": "Kamil Maciorowski",
"author_id": 108618,
"author_profile": "https://unix.stackexchange.com/users/108618",
"pm_score": 2,
"selected": false,
"text": "<p>Possible problems:</p>\n<ol>\n<li><p>There is no <a href=\"https://en.wikipedia.org/wiki/Shebang_(Unix... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737179",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/121187/"
] | I have a bash script that sources a file, which sources another:
```
script.sh:
cd /script/dir
source funcs.sh
funcs.sh:
...
source mode.sh
```
Now this script runs OK when I run it from command line, from within /script/dir.
But when I run it from crontab, the funcs.sh file can't find mode.sh.
Probably because for... | Possible problems:
1. There is no [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)#Examples) inside `script.sh`. If cron is told to run `script.sh` then it will run like `/bin/sh -c script.sh` (unless `SHELL` inside your crontab points to something else than `/bin/sh`, we don't know this). Since there is no sheb... |
737,222 | <p>I have a txt file with blocks of text like this:</p>
<pre><code>17-01-2023
Purchase AAA
Apple Pay John Doe
Full Payment
-11,34€
0,11€
30-01-2023
Purchase BBB
Mastercard Jane Doe
Installment
-23,90€
0,24€
</code></pre>
<p>So, we have in sequence, the date, the kind of purchase, the type of payment and name, the kind ... | [
{
"answer_id": 737223,
"author": "AdminBee",
"author_id": 377345,
"author_profile": "https://unix.stackexchange.com/users/377345",
"pm_score": 2,
"selected": true,
"text": "<p>Assuming that the transaction amount is always in the 5th line of a record, a record start is indicated by a dat... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737222",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/45335/"
] | I have a txt file with blocks of text like this:
```
17-01-2023
Purchase AAA
Apple Pay John Doe
Full Payment
-11,34€
0,11€
30-01-2023
Purchase BBB
Mastercard Jane Doe
Installment
-23,90€
0,24€
```
So, we have in sequence, the date, the kind of purchase, the type of payment and name, the kind of payment, the value as... | Assuming that the transaction amount is always in the 5th line of a record, a record start is indicated by a date in "DD-MM-YYYY" format, and that this pattern can only ever occur at start-of-record, the following `awk` program will do:
```
awk -v dpt=$(locale decimal_point) '/^([[:digit:]]{2}-){2}[[:digit:]]{4}$/{lin... |
737,230 | <p>I have thousands of text files called file.txt. Because they all share the same name I cannot move them to the same folder without them overwriting.</p>
<p>I need a command that will locate all of the file.txt files that are within thousands of directories and subdirectories, append the full path name to the end of ... | [
{
"answer_id": 737250,
"author": "Noft",
"author_id": 557888,
"author_profile": "https://unix.stackexchange.com/users/557888",
"pm_score": 0,
"selected": false,
"text": "<p>I would do it like this:</p>\n<pre><code>while read -r file; do mv $file /path/to/dir/$(echo $file | tr '/' '_'); d... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737230",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/554984/"
] | I have thousands of text files called file.txt. Because they all share the same name I cannot move them to the same folder without them overwriting.
I need a command that will locate all of the file.txt files that are within thousands of directories and subdirectories, append the full path name to the end of the file ... | Using `find` and a shell script to convert the paths to relative paths to the start directory and replacing `/` with `_`:
```
find . -type f -iname 'file*.txt' -exec sh -c '
targetdir=$1; shift
for file; do
cp "$file" "$targetdir/$(realpath --relative-base=. "$file" | tr '/' '_')"
# uncomment ... |
737,234 | <p>Is it possible to use <code>tree</code> to create several output files without being cd ~/ into the directory I want to create a <code>tree</code> file?</p>
<p>For example, I have a directory called <code>parent-dir</code>.</p>
<p>Inside of <code>parent-dir</code> are subdirectories titled <code>a</code>, <code>b</c... | [
{
"answer_id": 737241,
"author": "ralz",
"author_id": 26263,
"author_profile": "https://unix.stackexchange.com/users/26263",
"pm_score": 1,
"selected": false,
"text": "<p>You don't need to cd to directory to use tree command on it, and you can specify multiple directories to use <code>tr... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737234",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/554984/"
] | Is it possible to use `tree` to create several output files without being cd ~/ into the directory I want to create a `tree` file?
For example, I have a directory called `parent-dir`.
Inside of `parent-dir` are subdirectories titled `a`, `b`, `c` to `z` and one also titled `0-9`.
Inside of those subdirectories are m... | In `zsh`:
```
for d (parent-dir/*/*(N/)) (cd -- $d && tree) > output-dir/$d:t.txt
``` |
737,235 | <p>File1 has data as below <code>,</code> is the field separator</p>
<pre><code>1,T_EXIT,9053.0,10325.0,, ,
2,V_TURN,120.0,11334.0,, ,
3,Q_ENTRY,122.0,190.0,, ,
4,Q_ENTRY_RUN,130.0,569.0,, ,
</code></pre>
<p>File2 has data</p>
<pre><code>VDS SYNC
Dig T_EXIT OPEN
Ana Q_ENTRY CLOSE
Dig CORE_T
</code></pre>
<p>I want... | [
{
"answer_id": 737237,
"author": "symcbean",
"author_id": 9178,
"author_profile": "https://unix.stackexchange.com/users/9178",
"pm_score": 0,
"selected": false,
"text": "<p>Awk seems like thewrong tool here. It also sounds like a homework problem. I would use:</p>\n<pre><code>tr ' ' ',' ... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737235",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/436992/"
] | File1 has data as below `,` is the field separator
```
1,T_EXIT,9053.0,10325.0,, ,
2,V_TURN,120.0,11334.0,, ,
3,Q_ENTRY,122.0,190.0,, ,
4,Q_ENTRY_RUN,130.0,569.0,, ,
```
File2 has data
```
VDS SYNC
Dig T_EXIT OPEN
Ana Q_ENTRY CLOSE
Dig CORE_T
```
I want to compare **column2 of file2** with **column2 of file1... | Really all you're missing is the change of input and output field separators between the files:
```
$ awk 'NR==FNR{A[$2]=$3;next} $2 in A{$7=$6=A[$2]}1' file2 FS=, OFS=, file1
1,T_EXIT,9053.0,10325.0,,OPEN,OPEN
2,V_TURN,120.0,11334.0,, ,
3,Q_ENTRY,122.0,190.0,,CLOSE,CLOSE
4,Q_ENTRY_RUN,130.0,569.0,, ,
``` |
737,240 | <p>I want to extract a specially formatted array from the list of current dir.</p>
<pre><code>$ ls
Output:
fileABC.ext1
filePQR.ext2
dirMNO
dirFGH
</code></pre>
<p>I want only the dir and files of specific extension</p>
<p>I want an array like this
<code>(1 dirFGH "is a dir" 2 dirMNO "is a dir" 3 fi... | [
{
"answer_id": 737243,
"author": "roaima",
"author_id": 100397,
"author_profile": "https://unix.stackexchange.com/users/100397",
"pm_score": 3,
"selected": true,
"text": "<p>There's no need to parse <code>ls</code>. Remember to double-quote each time you use your variables such as <code>... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737240",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/543427/"
] | I want to extract a specially formatted array from the list of current dir.
```
$ ls
Output:
fileABC.ext1
filePQR.ext2
dirMNO
dirFGH
```
I want only the dir and files of specific extension
I want an array like this
`(1 dirFGH "is a dir" 2 dirMNO "is a dir" 3 fileABC.ext1 "is an ext1 file")`
I am doing the same wit... | There's no need to parse `ls`. Remember to double-quote each time you use your variables such as `"$line"`, otherwise it will be subject to splitting on `$IFS` (typically whitespace) and globbing. (As an example, if `$line` was `hello world` then your `array+=($line)` would add two values, `hello` and `world`.)
```
#!... |
737,261 | <p>Is this a good way to allow an optional user argument <code>ngt</code> to an awk function ?</p>
<pre><code>function nbstring(str, ngt) {
## Test whether string STR is non-blank.
## Return true when STR is non-blank.
if (length(gensub(/[[:blank:]]+/, "", "g", str)) > 0) {
if ( ngt == &... | [
{
"answer_id": 737263,
"author": "roaima",
"author_id": 100397,
"author_profile": "https://unix.stackexchange.com/users/100397",
"pm_score": 0,
"selected": false,
"text": "<p>If you're looking for idiomatic <code>awk</code> code I could offer this, but it's not really much different to y... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737261",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/561972/"
] | Is this a good way to allow an optional user argument `ngt` to an awk function ?
```
function nbstring(str, ngt) {
## Test whether string STR is non-blank.
## Return true when STR is non-blank.
if (length(gensub(/[[:blank:]]+/, "", "g", str)) > 0) {
if ( ngt == "dump" ) { print "return 1 for " str }
return... | Are you just trying to test if a string contains any non-blanks? That'd be this in any POSIX awk (no need for the non-POSIX `gensub()`, nor any other `*sub()` function, nor a call to `length()`):
```
function nbstring(str, ngt, rslt) {
## Test whether string STR is non-blank.
## Return true when STR is non-blan... |
737,269 | <p>I've got a fragment of an image file produced by data-recovery software. I suspect the complete original is somewhere on my home fileserver.</p>
<p>If this were a fragment of a text file, I could just grab a unique-looking fragment, run <code>grep -r -l -F </code>, and come back in a few hours for the answer. Howe... | [
{
"answer_id": 737263,
"author": "roaima",
"author_id": 100397,
"author_profile": "https://unix.stackexchange.com/users/100397",
"pm_score": 0,
"selected": false,
"text": "<p>If you're looking for idiomatic <code>awk</code> code I could offer this, but it's not really much different to y... | 2023/02/28 | [
"https://unix.stackexchange.com/questions/737269",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/62988/"
] | I've got a fragment of an image file produced by data-recovery software. I suspect the complete original is somewhere on my home fileserver.
If this were a fragment of a text file, I could just grab a unique-looking fragment, run `grep -r -l -F` , and come back in a few hours for the answer. However, since this is a b... | Are you just trying to test if a string contains any non-blanks? That'd be this in any POSIX awk (no need for the non-POSIX `gensub()`, nor any other `*sub()` function, nor a call to `length()`):
```
function nbstring(str, ngt, rslt) {
## Test whether string STR is non-blank.
## Return true when STR is non-blan... |
737,281 | <p>I have many 10 columns in a CSV file, out of which column 1, 3 and 4 have duplicate records in it. Need to identify these duplicate records and store them into a separate TXT file.
File is a ',' delimited</p>
<p>for example:</p>
<pre><code>14479305,I,101013000000,I,31/03/2019,TD01,16573.34,0,C,6/03/2015
14479305,I,1... | [
{
"answer_id": 737288,
"author": "αғsнιη",
"author_id": 72456,
"author_profile": "https://unix.stackexchange.com/users/72456",
"pm_score": 2,
"selected": false,
"text": "<p>You were almost there! only you needed to process the input file twice (plus some fixes), first time finding the du... | 2023/03/01 | [
"https://unix.stackexchange.com/questions/737281",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/539635/"
] | I have many 10 columns in a CSV file, out of which column 1, 3 and 4 have duplicate records in it. Need to identify these duplicate records and store them into a separate TXT file.
File is a ',' delimited
for example:
```
14479305,I,101013000000,I,31/03/2019,TD01,16573.34,0,C,6/03/2015
14479305,I,101013000000,I,31/03... | You were almost there! only you needed to process the input file twice (plus some fixes), first time finding the duplicates count based on your criteria (column#1, #3, #4) and at the second time filter out those lines having count>1 into output file, so:
```
awk -F, 'NR==FNR{ dups[$1,$3,$4]++; next} dups[$1,$3,$4]>1' ... |
737,311 | <p>I want to rename .gz files according to names in separate txt-file.
I have a map with .gz files with the names:</p>
<pre><code>trooper10.gz
trooper11.gz
trooper12.gz
etc.
</code></pre>
<p>and I have a separate txt-file with the wanted name(s) in in the first column and the .gz-names in the other column (tab-separat... | [
{
"answer_id": 737312,
"author": "Stéphane Chazelas",
"author_id": 22565,
"author_profile": "https://unix.stackexchange.com/users/22565",
"pm_score": 3,
"selected": false,
"text": "<p>Could that not just be:</p>\n<pre><code><list_names.txt awk -F'\\t' '{printf "%s.gz\\0%s.gz\\0&q... | 2023/03/01 | [
"https://unix.stackexchange.com/questions/737311",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562660/"
] | I want to rename .gz files according to names in separate txt-file.
I have a map with .gz files with the names:
```
trooper10.gz
trooper11.gz
trooper12.gz
etc.
```
and I have a separate txt-file with the wanted name(s) in in the first column and the .gz-names in the other column (tab-separated).
```
B25 trooper... | Yes, you just start by reading the file instead of getting the gz files from the file system:
```
while IFS=$'\t' read -r newName oldName; do
mv -- "$oldName".gz "$newName.gz"
done < names_file
``` |
738,376 | <p>I have abc.txt file which contains two lines. I want to extract first word in line which contains <code>db</code> word in particular line.</p>
<p>abc.txt:</p>
<pre><code>XYZ/db_abc.sql
ijkl/tables/table_name/tl_abc.sql
</code></pre>
<p>When I tried grep <code>grep "db" abc.txt</code> I am getting line whic... | [
{
"answer_id": 738378,
"author": "Kusalananda",
"author_id": 116858,
"author_profile": "https://unix.stackexchange.com/users/116858",
"pm_score": 3,
"selected": true,
"text": "<pre class=\"lang-bash prettyprint-override\"><code>$ awk -F / -v q=db '$0 ~ q { print $(NF-1) }' file\nXYZ\n</c... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738376",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/546877/"
] | I have abc.txt file which contains two lines. I want to extract first word in line which contains `db` word in particular line.
abc.txt:
```
XYZ/db_abc.sql
ijkl/tables/table_name/tl_abc.sql
```
When I tried grep `grep "db" abc.txt` I am getting line which contains 'db' but I want to extract first word `XYZ` as outp... | ```bash
$ awk -F / -v q=db '$0 ~ q { print $(NF-1) }' file
XYZ
```
```bash
$ awk -F / -v q=tl '$0 ~ q { print $(NF-1) }' file
table_name
```
These two `awk` commands are identical but are given different arguments to query for different expressions. Whatever string is assigned to the `awk` variable `q` on the comma... |
738,384 | <p>I have below output with jq command , where I want to compare all the date & time and tell which is the latest one</p>
<pre><code>Mon Feb 20 09:22:25 2023
Mon Feb 20 17:42:13 2023
Thu Mar 2 05:55:07 2023
Tue Feb 28 16:02:40 2023
</code></pre>
<p>Please guide how I can do this I have seem multiple answers for co... | [
{
"answer_id": 738389,
"author": "ralz",
"author_id": 26263,
"author_profile": "https://unix.stackexchange.com/users/26263",
"pm_score": 0,
"selected": false,
"text": "<p>you can use <code>date</code> command to convert those dates to unix timestamps and just sort them, and you can then ... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738384",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/434257/"
] | I have below output with jq command , where I want to compare all the date & time and tell which is the latest one
```
Mon Feb 20 09:22:25 2023
Mon Feb 20 17:42:13 2023
Thu Mar 2 05:55:07 2023
Tue Feb 28 16:02:40 2023
```
Please guide how I can do this I have seem multiple answers for comparing two dates not sure h... | Assuming that you have some JSON document like this:
```json
[
{ "datestring": "Mon Feb 20 09:22:25 2023" },
{ "datestring": "Mon Feb 20 17:42:13 2023" },
{ "datestring": "Thu Mar 2 05:55:07 2023" },
{ "datestring": "Tue Feb 28 16:02:40 2023" }
]
```
... then you may use `jq` to convert these date strin... |
738,407 | <p>I'm aware that it's possible to flush the iptables using <code>iptables -F</code> or <code>iptables -X</code>, however, is it possible to flush the iptables except for one crucial chain/rule?</p>
| [
{
"answer_id": 738389,
"author": "ralz",
"author_id": 26263,
"author_profile": "https://unix.stackexchange.com/users/26263",
"pm_score": 0,
"selected": false,
"text": "<p>you can use <code>date</code> command to convert those dates to unix timestamps and just sort them, and you can then ... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738407",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/502596/"
] | I'm aware that it's possible to flush the iptables using `iptables -F` or `iptables -X`, however, is it possible to flush the iptables except for one crucial chain/rule? | Assuming that you have some JSON document like this:
```json
[
{ "datestring": "Mon Feb 20 09:22:25 2023" },
{ "datestring": "Mon Feb 20 17:42:13 2023" },
{ "datestring": "Thu Mar 2 05:55:07 2023" },
{ "datestring": "Tue Feb 28 16:02:40 2023" }
]
```
... then you may use `jq` to convert these date strin... |
738,434 | <p>I have 2 files, 1st file it has the output and another one template. I want to add ID's in the template from output without hardcode the value.</p>
<pre><code> Output.txt,
abc 8392382222
def 9283923829
ghi 2392832930
Template file,
name:
no:
London
UK
name:
n... | [
{
"answer_id": 738437,
"author": "choroba",
"author_id": 13792,
"author_profile": "https://unix.stackexchange.com/users/13792",
"pm_score": 2,
"selected": true,
"text": "<p>Using just bash, you can read two files simultaneously: just redirect on of it to a different file descriptor.</p>\... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738434",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/61108/"
] | I have 2 files, 1st file it has the output and another one template. I want to add ID's in the template from output without hardcode the value.
```
Output.txt,
abc 8392382222
def 9283923829
ghi 2392832930
Template file,
name:
no:
London
UK
name:
no:
Lond... | Using just bash, you can read two files simultaneously: just redirect on of it to a different file descriptor.
```bash
#!/bin/bash
while read -r -a values ; do
for i in {0..3} ; do
read -u 3 line
echo "$line ${values[$i]}"
done
done < output.txt 3<template.txt
```
Note that usually, the temp... |
738,441 | <p>I need to dual boot Ubuntu for work and Windows 11 for entertainment (gaming mostly) and I've got a 240 GB SSD and a 1 TB HDD. I was planning on leaving the SSD for Ubuntu and the HDD for Windows 11, since when I tried to have both OSes on the SSD, I had an extreme shortage of storage space, but some say that it wou... | [
{
"answer_id": 738437,
"author": "choroba",
"author_id": 13792,
"author_profile": "https://unix.stackexchange.com/users/13792",
"pm_score": 2,
"selected": true,
"text": "<p>Using just bash, you can read two files simultaneously: just redirect on of it to a different file descriptor.</p>\... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738441",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/563862/"
] | I need to dual boot Ubuntu for work and Windows 11 for entertainment (gaming mostly) and I've got a 240 GB SSD and a 1 TB HDD. I was planning on leaving the SSD for Ubuntu and the HDD for Windows 11, since when I tried to have both OSes on the SSD, I had an extreme shortage of storage space, but some say that it would ... | Using just bash, you can read two files simultaneously: just redirect on of it to a different file descriptor.
```bash
#!/bin/bash
while read -r -a values ; do
for i in {0..3} ; do
read -u 3 line
echo "$line ${values[$i]}"
done
done < output.txt 3<template.txt
```
Note that usually, the temp... |
738,444 | <p>The output of the following command is:</p>
<pre><code>$ rga --heading -l --context 3 --sort path -i -e "use cases?" -e "user stor(y|ies)" -e "Technical debt"
Stepanek G. - Software Project Secrets (The Expert's Voice in Project Management) - 2012.pdf
Strategic Project Management Made ... | [
{
"answer_id": 738449,
"author": "roaima",
"author_id": 100397,
"author_profile": "https://unix.stackexchange.com/users/100397",
"pm_score": 3,
"selected": true,
"text": "<p>All of these variations you've tried use <code>cat file.txt</code>. This ends up unrolling each filename, and is s... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738444",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/206574/"
] | The output of the following command is:
```
$ rga --heading -l --context 3 --sort path -i -e "use cases?" -e "user stor(y|ies)" -e "Technical debt"
Stepanek G. - Software Project Secrets (The Expert's Voice in Project Management) - 2012.pdf
Strategic Project Management Made Simple Solution Tools for Leaders and Teams... | All of these variations you've tried use `cat file.txt`. This ends up unrolling each filename, and is subject to splitting on `$IFS` - typically whitespace. For example, "The Phoenix Project.pdf" then becomes three words "The", "Phoenix", "Project.pdf". Obviously none of these exist as a file and therefore cannot be mo... |
738,451 | <p>I have 2 files , one that a biiiiig file (have 249430 rows)
and other is smaller than the first (500 rows)</p>
<p>the first file has this five columns and other columns (the first five columns same in the second file )
such as</p>
<pre><code>#CHROM POS ID REF ALT QUAL INFO
chr2 ... | [
{
"answer_id": 738456,
"author": "Ed Morton",
"author_id": 133219,
"author_profile": "https://unix.stackexchange.com/users/133219",
"pm_score": 1,
"selected": false,
"text": "<p>Using any awk:</p>\n<pre><code>awk '\n { key = $1 FS $2 FS $3 FS $4 FS $5 }\n NR==FNR { a[key]; next }\n... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738451",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/563872/"
] | I have 2 files , one that a biiiiig file (have 249430 rows)
and other is smaller than the first (500 rows)
the first file has this five columns and other columns (the first five columns same in the second file )
such as
```
#CHROM POS ID REF ALT QUAL INFO
chr2 32424454 r... | Using any awk:
```
awk '
{ key = $1 FS $2 FS $3 FS $4 FS $5 }
NR==FNR { a[key]; next }
key in a
' file2 file1
``` |
738,466 | <p>I need to change some instances of a sub-string on every line of a text file. These instances are all consecutive such as 3 to 6 or 2 to 5 etc. What command do I need for this operation? The nearest I got was:</p>
<pre><code>sed 's/this/that/3' file1
</code></pre>
<p>which changes only the third occurrence. I was ho... | [
{
"answer_id": 738552,
"author": "AdminBee",
"author_id": 377345,
"author_profile": "https://unix.stackexchange.com/users/377345",
"pm_score": 2,
"selected": false,
"text": "<p>This is probably not possible with <code>sed</code>, but the following GNU <code>awk</code> program would work:... | 2023/03/02 | [
"https://unix.stackexchange.com/questions/738466",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/562270/"
] | I need to change some instances of a sub-string on every line of a text file. These instances are all consecutive such as 3 to 6 or 2 to 5 etc. What command do I need for this operation? The nearest I got was:
```
sed 's/this/that/3' file1
```
which changes only the third occurrence. I was hoping that something like... | This is probably not possible with `sed`, but the following GNU `awk` program would work:
```
awk -v frst=2 -v lst=5 '{for (i=1; i<=(lst-frst+1);i++) $0=gensub(/a/,"w",frst)}1'
```
* This will pass the first and last occurences to replace as variables `frst` and `lst` to `awk`.
* It will then use `gensub()` to repla... |
738,485 | <p>I have a command like</p>
<pre><code>rga --files-with-matches --count-matches --sort path -i -e "use cases?" -e "user stor(y|ies)" -e "Technical debt" -e "Code Quality" -e "software development" -e "Agile Manifesto"
</code></pre>
<p>The output is like</p>
<... | [
{
"answer_id": 738552,
"author": "AdminBee",
"author_id": 377345,
"author_profile": "https://unix.stackexchange.com/users/377345",
"pm_score": 2,
"selected": false,
"text": "<p>This is probably not possible with <code>sed</code>, but the following GNU <code>awk</code> program would work:... | 2023/03/03 | [
"https://unix.stackexchange.com/questions/738485",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/206574/"
] | I have a command like
```
rga --files-with-matches --count-matches --sort path -i -e "use cases?" -e "user stor(y|ies)" -e "Technical debt" -e "Code Quality" -e "software development" -e "Agile Manifesto"
```
The output is like
```
a1.pdf:18
a2.pdf:10
a3.pdf:14
....
```
Here, `:NUM` is number of matches.
I want ... | This is probably not possible with `sed`, but the following GNU `awk` program would work:
```
awk -v frst=2 -v lst=5 '{for (i=1; i<=(lst-frst+1);i++) $0=gensub(/a/,"w",frst)}1'
```
* This will pass the first and last occurences to replace as variables `frst` and `lst` to `awk`.
* It will then use `gensub()` to repla... |
738,508 | <p>If I run this <code>dd</code> command to blank the first bytes of a MBR, will it have an effect on the current partition table of this disk (or just on grub)? Will the partitions still be recognized?</p>
<pre><code>dd if=/dev/zero of=/dev/sda bs=440 count=1
</code></pre>
<p>(440 is the result of an advice, and seems... | [
{
"answer_id": 738552,
"author": "AdminBee",
"author_id": 377345,
"author_profile": "https://unix.stackexchange.com/users/377345",
"pm_score": 2,
"selected": false,
"text": "<p>This is probably not possible with <code>sed</code>, but the following GNU <code>awk</code> program would work:... | 2023/03/03 | [
"https://unix.stackexchange.com/questions/738508",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/202234/"
] | If I run this `dd` command to blank the first bytes of a MBR, will it have an effect on the current partition table of this disk (or just on grub)? Will the partitions still be recognized?
```
dd if=/dev/zero of=/dev/sda bs=440 count=1
```
(440 is the result of an advice, and seems better than 446, see links below)
... | This is probably not possible with `sed`, but the following GNU `awk` program would work:
```
awk -v frst=2 -v lst=5 '{for (i=1; i<=(lst-frst+1);i++) $0=gensub(/a/,"w",frst)}1'
```
* This will pass the first and last occurences to replace as variables `frst` and `lst` to `awk`.
* It will then use `gensub()` to repla... |
738,530 | <p>I need to generate a list of all files and directories with their permission and owner e.g.</p>
<pre><code>-rw-rw-r-- black www-data foo/
-rw-r--r-- black www-data foo/foo.txt
-rw-rw-r-- black www-data bar/
-rwxrwxr-x black www-data bar/foo.sh
</code></pre>
<p>I need this list to compare ... | [
{
"answer_id": 738531,
"author": "Tux Over9000",
"author_id": 563779,
"author_profile": "https://unix.stackexchange.com/users/563779",
"pm_score": 0,
"selected": false,
"text": "<p>I think you need to redirect the results to a log file. Try using this:</p>\n<pre><code>ls -la /route/of/di... | 2023/03/03 | [
"https://unix.stackexchange.com/questions/738530",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/124191/"
] | I need to generate a list of all files and directories with their permission and owner e.g.
```
-rw-rw-r-- black www-data foo/
-rw-r--r-- black www-data foo/foo.txt
-rw-rw-r-- black www-data bar/
-rwxrwxr-x black www-data bar/foo.sh
```
I need this list to compare it with another instance... | If you have GNU `find`, you can use its `printf` action:
```
find . -printf "%M %u %g %p\n"
```
This will list all files in the current directory and any subdirectories, with their type and permissions in `ls` style, owner and group, and full name starting from the current directory.
If you want consistent spacing,... |
738,548 | <p>I'm trying to enable 802.11r on my OpenWRT APs. How can I confirm in Linux that the specific AP (by ESSID) has 802.11r enabled?</p>
| [
{
"answer_id": 738555,
"author": "Nicolas Formichella",
"author_id": 407300,
"author_profile": "https://unix.stackexchange.com/users/407300",
"pm_score": 1,
"selected": false,
"text": "<p>From that <a href=\"https://www.reddit.com/r/openwrt/comments/515oea/finally_got_80211r_roaming_work... | 2023/03/03 | [
"https://unix.stackexchange.com/questions/738548",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/3285/"
] | I'm trying to enable 802.11r on my OpenWRT APs. How can I confirm in Linux that the specific AP (by ESSID) has 802.11r enabled? | From that [Reddit Post](https://www.reddit.com/r/openwrt/comments/515oea/finally_got_80211r_roaming_working/)
>
> Howto check if my Device is capable?
> ====================================
>
>
>
On Linux, issue:
```bash
sudo wpa_cli scan
```
then a few seconds later
```bash
sudo wpa_cli scan_results
```
If... |
738,551 | <p>My data looks like:</p>
<pre><code>A 4 G 1 G 1
C 4 C 2 C 2
T 6 T 5 T 5
A 6 T 2 T 2
C 6 T 2 T 2
T 6 G 2 G 2
</code></pre>
<p>I am trying the command:</p>
<pre><code>awk -F " " '$1==$3 {$7=$6; print $0;}
$1==$5 {$7=$4; print $0;}
($1 != $3 && $1 != $5) {$7=$2; print $0}' test.... | [
{
"answer_id": 738553,
"author": "ilkkachu",
"author_id": 170373,
"author_profile": "https://unix.stackexchange.com/users/170373",
"pm_score": 0,
"selected": false,
"text": "<blockquote>\n<pre><code>awk -F " " '$1==$3 {$7=$6; print $0;}\n $1==$5 {$7=$4; print $0;}\n ... | 2023/03/03 | [
"https://unix.stackexchange.com/questions/738551",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/563991/"
] | My data looks like:
```
A 4 G 1 G 1
C 4 C 2 C 2
T 6 T 5 T 5
A 6 T 2 T 2
C 6 T 2 T 2
T 6 G 2 G 2
```
I am trying the command:
```
awk -F " " '$1==$3 {$7=$6; print $0;}
$1==$5 {$7=$4; print $0;}
($1 != $3 && $1 != $5) {$7=$2; print $0}' test.txt
```
While the data has only 5 lines the output... | You didn't describe exactly how you want this to behave - so I'm applying some guesswork here.
Look at the duplicate lines, e.g.
```
C 4 C 2 C 2
```
$1 is the same as $3 so the first block fires.
$1 is the same as $5 so the second block fires.
If you only want one line of output per line of input, then only output... |
738,573 | <p>This is my CSV File:</p>
<pre><code>Number;Reference;EANNumber;Manufacturer;Price_B2B;Price_B2B_Dis;Price_B2B_DisPer;Price_B2B_DisAmount;Price_B2C_exVAT;Price_B2C_inVAT
2330113;BP3141;1,31304E+11;APC;13;13;0;0;0;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1402141;A51U;8,84333E+11;HP;2;2;0;0;0;0;;;;;;;;;;;;;;;;;;;;;;;... | [
{
"answer_id": 738553,
"author": "ilkkachu",
"author_id": 170373,
"author_profile": "https://unix.stackexchange.com/users/170373",
"pm_score": 0,
"selected": false,
"text": "<blockquote>\n<pre><code>awk -F " " '$1==$3 {$7=$6; print $0;}\n $1==$5 {$7=$4; print $0;}\n ... | 2023/03/03 | [
"https://unix.stackexchange.com/questions/738573",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/564010/"
] | This is my CSV File:
```
Number;Reference;EANNumber;Manufacturer;Price_B2B;Price_B2B_Dis;Price_B2B_DisPer;Price_B2B_DisAmount;Price_B2C_exVAT;Price_B2C_inVAT
2330113;BP3141;1,31304E+11;APC;13;13;0;0;0;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1402141;A51U;8,84333E+11;HP;2;2;0;0;0;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | You didn't describe exactly how you want this to behave - so I'm applying some guesswork here.
Look at the duplicate lines, e.g.
```
C 4 C 2 C 2
```
$1 is the same as $3 so the first block fires.
$1 is the same as $5 so the second block fires.
If you only want one line of output per line of input, then only output... |
738,588 | <p>I have a text file containing two columns separated by a space:</p>
<pre class="lang-bash prettyprint-override"><code>Foo Param1
Foo Param2
Foo Param3
Foo Param4
Foo Param5
Bar Stuff1
Bar Stuff2
Bar Param3
Bar Stuff4
etc
</code></pre>
<p>The first column is a group name, the second a unique attribute within that gro... | [
{
"answer_id": 738601,
"author": "White Owl",
"author_id": 420446,
"author_profile": "https://unix.stackexchange.com/users/420446",
"pm_score": 2,
"selected": false,
"text": "<p>Do not do it. It is a very bad design pattern. If your source data file would have a new pair of "group-v... | 2023/03/03 | [
"https://unix.stackexchange.com/questions/738588",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/154644/"
] | I have a text file containing two columns separated by a space:
```bash
Foo Param1
Foo Param2
Foo Param3
Foo Param4
Foo Param5
Bar Stuff1
Bar Stuff2
Bar Param3
Bar Stuff4
etc
```
The first column is a group name, the second a unique attribute within that group (it may be that an attribute name occurs in two differen... | Do not do it. It is a very bad design pattern. If your source data file would have a new pair of "group-value" or lose it - are you going to rebuild a table for this group? How many groups do you have? Are you sure it is a small constant? How are you suppose to parametrize table names?
Just create a table which follow... |
738,603 | <p>I am using a prebuilt qcow2 windows 11 image which and when change from <code>bus="sata" and address type="drive"</code> to <code>bus="virtio" and address type="pci"</code> my KVM guest windows 11 does not boot .virtio drivers are already installed in the guest. I am using... | [
{
"answer_id": 738601,
"author": "White Owl",
"author_id": 420446,
"author_profile": "https://unix.stackexchange.com/users/420446",
"pm_score": 2,
"selected": false,
"text": "<p>Do not do it. It is a very bad design pattern. If your source data file would have a new pair of "group-v... | 2023/03/04 | [
"https://unix.stackexchange.com/questions/738603",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/8032/"
] | I am using a prebuilt qcow2 windows 11 image which and when change from `bus="sata" and address type="drive"` to `bus="virtio" and address type="pci"` my KVM guest windows 11 does not boot .virtio drivers are already installed in the guest. I am using RHEL 9 as guest.
I have already a backup of the qcow2 image and i h... | Do not do it. It is a very bad design pattern. If your source data file would have a new pair of "group-value" or lose it - are you going to rebuild a table for this group? How many groups do you have? Are you sure it is a small constant? How are you suppose to parametrize table names?
Just create a table which follow... |
738,628 | <p>I have a folder with scans of a book numbered <code>001.jpg</code> through <code>092.jpg</code></p>
<p>The scans have two pages of the book scanned together. What I want is split these by two from the middle vertically and regenerate filenames starting from <code>001.jpg</code> to <code>184.jpg</code>. So <code>001.... | [
{
"answer_id": 738633,
"author": "Marcus Müller",
"author_id": 106650,
"author_profile": "https://unix.stackexchange.com/users/106650",
"pm_score": 3,
"selected": true,
"text": "<p>I don't know imagemagick's command line necessary to split things, but that's also not really a problem her... | 2023/03/04 | [
"https://unix.stackexchange.com/questions/738628",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/30417/"
] | I have a folder with scans of a book numbered `001.jpg` through `092.jpg`
The scans have two pages of the book scanned together. What I want is split these by two from the middle vertically and regenerate filenames starting from `001.jpg` to `184.jpg`. So `001.jpg` originally will be split as `001.jpg` and `002.jpg`. ... | I don't know imagemagick's command line necessary to split things, but that's also not really a problem here, as you already found a way to do that; I'll use `GraphicsMagick` instead here; the same idea applies, just that I find ImageMagick's command line to be very confusing.
So, what I'd do is the following:
```bas... |
738,647 | <p>I would like from this table</p>
<pre><code>"ResNR";"ResNAME";"CustomerNAME";"CustomerID";"Date";"";"";"";"";"";"";"";"";"";"";"";"";"";&... | [
{
"answer_id": 738649,
"author": "Ljm Dullaart",
"author_id": 237080,
"author_profile": "https://unix.stackexchange.com/users/237080",
"pm_score": 1,
"selected": false,
"text": "<p>I don't know where your <code>Sold</code> column comes from, but most of the stuff is pretty basic.</p>\n<p... | 2023/03/04 | [
"https://unix.stackexchange.com/questions/738647",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/564010/"
] | I would like from this table
```
"ResNR";"ResNAME";"CustomerNAME";"CustomerID";"Date";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"
"12431";"TEST";"Kunde 1";"10272";"20.06.2017 10:35";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"
"12431";"TEST";... | After removing the unmatched trailing half-field `;"`, then with
```
mlr --icsv --ocsvlite --fs ';' sort -f CustomerNAME then put '
begin{@s = {}}; @s = mapsum({$CustomerNAME: fmtnum(length(@s)+1,"s%02d")},@s); $Sold = @s[$CustomerNAME]
' then reorder -f Sold then cut -x -f ResNR,ResNAME then rename "",Column_1 in... |
738,686 | <p>Occasionally I want to check what exact model of hardware component I am using. I don't really care about extreme detail things like what brand of capacitor they used on the Motherboard in position xyz. I just want to know what is the exact model of my motherboard, ram, video card and so on, usually because I'm tryi... | [
{
"answer_id": 738649,
"author": "Ljm Dullaart",
"author_id": 237080,
"author_profile": "https://unix.stackexchange.com/users/237080",
"pm_score": 1,
"selected": false,
"text": "<p>I don't know where your <code>Sold</code> column comes from, but most of the stuff is pretty basic.</p>\n<p... | 2023/03/05 | [
"https://unix.stackexchange.com/questions/738686",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/520009/"
] | Occasionally I want to check what exact model of hardware component I am using. I don't really care about extreme detail things like what brand of capacitor they used on the Motherboard in position xyz. I just want to know what is the exact model of my motherboard, ram, video card and so on, usually because I'm trying ... | After removing the unmatched trailing half-field `;"`, then with
```
mlr --icsv --ocsvlite --fs ';' sort -f CustomerNAME then put '
begin{@s = {}}; @s = mapsum({$CustomerNAME: fmtnum(length(@s)+1,"s%02d")},@s); $Sold = @s[$CustomerNAME]
' then reorder -f Sold then cut -x -f ResNR,ResNAME then rename "",Column_1 in... |
1 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://ux.meta.stackexchange.com/questions/157/write-an-elevator-pitch-tagline">Write an Elevator Pitch / Tagline</a> </p>
</blockquote>
<h2>Note:</h2>
<p>We are closing this domain naming thread. It is asking the <em>entirely</em> wrong questi... | [
{
"answer_id": 3,
"author": "megubyte",
"author_id": 66,
"author_profile": "https://ux.meta.stackexchange.com/users/66",
"pm_score": -1,
"selected": false,
"text": "<p>userinterface.org ? (so obvious)</p>\n\n<p>Taken.</p>\n"
},
{
"answer_id": 4,
"author": "Ignacio",
"auth... | 2010/08/09 | [
"https://ux.meta.stackexchange.com/questions/1",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/57/"
] | >
> **Possible Duplicate:**
>
> [Write an Elevator Pitch / Tagline](https://ux.meta.stackexchange.com/questions/157/write-an-elevator-pitch-tagline)
>
>
>
Note:
-----
We are closing this domain naming thread. It is asking the *entirely* wrong question. See this blog post for details: [Domain Names: Wrong Ques... | Tough question. From the few urls I've tried expertui.com is the only one available. So..
**ExpertUI.com**
Available |
300 | <p>Maybe this is by design, but </p>
<ul>
<li>I don't think </li>
<li>there needs to be</li>
<li>so much space</li>
<li>between list items.</li>
</ul>
<p>Jin, would you consider removing the margin-bottom?</p>
<pre><code>.post-text ul li, .post-text ol li { margin-bottom: 1em }
</code></pre>
| [
{
"answer_id": 302,
"author": "Jin",
"author_id": 4,
"author_profile": "https://ux.meta.stackexchange.com/users/4",
"pm_score": 3,
"selected": true,
"text": "<p>The fix will be in the next deployment.</p>\n"
},
{
"answer_id": 313,
"author": "Matt Rockwell",
"author_id": 4... | 2011/04/25 | [
"https://ux.meta.stackexchange.com/questions/300",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/61/"
] | Maybe this is by design, but
* I don't think
* there needs to be
* so much space
* between list items.
Jin, would you consider removing the margin-bottom?
```
.post-text ul li, .post-text ol li { margin-bottom: 1em }
``` | The fix will be in the next deployment. |
377 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://ux.meta.stackexchange.com/questions/626/community-promotion-ads-1h-2012">Community Promotion Ads - 1H 2012</a> </p>
</blockquote>
<h3>What in the Wide, Wide World of Sports is Going On Here?</h3>
<p>TL;DR -- put images and links in the a... | [
{
"answer_id": 380,
"author": "James Crook",
"author_id": 2463,
"author_profile": "https://ux.meta.stackexchange.com/users/2463",
"pm_score": 2,
"selected": false,
"text": "<p><a href=\"https://ux.stackexchange.com/tags/overflow/info\"><img src=\"https://i.stack.imgur.com/60U4g.png\" alt... | 2011/06/06 | [
"https://ux.meta.stackexchange.com/questions/377",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/3108/"
] | >
> **Possible Duplicate:**
>
> [Community Promotion Ads - 1H 2012](https://ux.meta.stackexchange.com/questions/626/community-promotion-ads-1h-2012)
>
>
>
### What in the Wide, Wide World of Sports is Going On Here?
TL;DR -- put images and links in the answers. If they get voted up enough, they will appear on... | [](http://twitter.com/stackux) |
581 | <p>Following up from <a href="https://ux.meta.stackexchange.com/questions/444/has-the-change-to-the-non-beta-theme-improved-traffic-to-the-site">my previous question</a> on this subject, I was wondering what our status was.</p>
<p>We've had the public theme for a few months now, so have the site's stats improved enoug... | [
{
"answer_id": 582,
"author": "Rahul",
"author_id": 249,
"author_profile": "https://ux.meta.stackexchange.com/users/249",
"pm_score": 2,
"selected": false,
"text": "<p>Jin mentioned in chat two weeks ago that yes, we'll be graduated from beta soon. I'm curious what \"soon\" means, but I'... | 2011/10/13 | [
"https://ux.meta.stackexchange.com/questions/581",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/60/"
] | Following up from [my previous question](https://ux.meta.stackexchange.com/questions/444/has-the-change-to-the-non-beta-theme-improved-traffic-to-the-site) on this subject, I was wondering what our status was.
We've had the public theme for a few months now, so have the site's stats improved enough for a full launch a... | The official response from Rebecca Chernoff is **they're waiting for participation to reach a tipping point**. So be thinking about how we can promote the site and how the UX of the [Area 51 page](http://area51.stackexchange.com/proposals/5728/user-experience) can be improved to communicate what really matters.
**Upda... |
626 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://ux.meta.stackexchange.com/questions/1194/community-promotion-ads-2013">Community Promotion Ads - 2013</a> </p>
</blockquote>
<p>So begins our newest iteration of the Community Promotion Ads! We're doing these on a yearly rotation now.</p>... | [
{
"answer_id": 627,
"author": "Patrick McElhaney",
"author_id": 61,
"author_profile": "https://ux.meta.stackexchange.com/users/61",
"pm_score": 3,
"selected": false,
"text": "<p><a href=\"http://twitter.com/stackux\" rel=\"nofollow noreferrer\"><img src=\"https://i.stack.imgur.com/oy66o.... | 2011/12/01 | [
"https://ux.meta.stackexchange.com/questions/626",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/7091/"
] | >
> **Possible Duplicate:**
>
> [Community Promotion Ads - 2013](https://ux.meta.stackexchange.com/questions/1194/community-promotion-ads-2013)
>
>
>
So begins our newest iteration of the Community Promotion Ads! We're doing these on a yearly rotation now.
### What are Community Promotion Ads?
Community Prom... | [](http://twitter.com/stackux) |
647 | <p>Who thinks it's a good idea for StackExchange to integrate with Balsamiq for UX.StackExchange? I do, and I'd be really happy if we had the ability to make mockups on UX for UX.</p>
<p>This is something for SE to spend unicorn dollars on. Fogbugz has Balsamiq, UX should get it too!</p>
| [
{
"answer_id": 651,
"author": "Vitaly Mijiritsky",
"author_id": 3643,
"author_profile": "https://ux.meta.stackexchange.com/users/3643",
"pm_score": 1,
"selected": false,
"text": "<p>That's a great idea IMHO. Except for the dollars part. Balsamiq, or any wireframing tools manufacturer, fo... | 2011/12/29 | [
"https://ux.meta.stackexchange.com/questions/647",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/2568/"
] | Who thinks it's a good idea for StackExchange to integrate with Balsamiq for UX.StackExchange? I do, and I'd be really happy if we had the ability to make mockups on UX for UX.
This is something for SE to spend unicorn dollars on. Fogbugz has Balsamiq, UX should get it too! | This is a great idea, and we've been working with the nice people at Balsamiq to make it happen. It's now enabled.
The editor has a new button:

Clicking it will launch the Balsamiq editor. This requires Flash to be available in your browser. Leaving the moc... |
654 | <p>I am curious to know if <strong>anyone has been or knows about the <a href="http://www.nngroup.com/events/" rel="nofollow">Usability Week</a> conferences that Nielsen Norman Group has organized for 2012 and what is their impression. Is it quality training or can achieve the same by reading some books? Is it overpric... | [
{
"answer_id": 655,
"author": "Mervin",
"author_id": 5113,
"author_profile": "https://ux.meta.stackexchange.com/users/5113",
"pm_score": 0,
"selected": false,
"text": "<p>Though I am pretty sure there will be some value add, I am not sure how much information I'll be able to absorb, with... | 2011/12/17 | [
"https://ux.meta.stackexchange.com/questions/654",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/5058/"
] | I am curious to know if **anyone has been or knows about the [Usability Week](http://www.nngroup.com/events/) conferences that Nielsen Norman Group has organized for 2012 and what is their impression. Is it quality training or can achieve the same by reading some books? Is it overpriced or good value for money? Which a... | Shouldn't this be in the meta section...? Well anyway, I attended the **NNG Conference 2011 in San Francisco** and these are the sessions I took:
**Interaction Design 1 and 2 with Bruce “Tog” Tognazzini**: Very interesting speaker, would love to hear more from him. But unfortunately the workshop seemed to be aimed at ... |
936 | <p>Sometimes I feel the need for embedding video content in questions or answers. But it is not allowed, I have to link to the video instead of embedding it. If I try embedding video - nothing will be displayed, as this code snipped below (made visible as code):</p>
<pre><code> <iframe
width="420"
... | [
{
"answer_id": 937,
"author": "JonW",
"author_id": 3865,
"author_profile": "https://ux.meta.stackexchange.com/users/3865",
"pm_score": 2,
"selected": false,
"text": "<p><a href=\"https://meta.stackexchange.com/questions/66397/provide-a-way-to-embed-videos-in-answers\">YouTube video embed... | 2012/05/15 | [
"https://ux.meta.stackexchange.com/questions/936",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/4679/"
] | Sometimes I feel the need for embedding video content in questions or answers. But it is not allowed, I have to link to the video instead of embedding it. If I try embedding video - nothing will be displayed, as this code snipped below (made visible as code):
```
<iframe
width="420"
height="315" ... | [YouTube video embedding is available in Music and Gaming](https://meta.stackexchange.com/questions/66397/provide-a-way-to-embed-videos-in-answers) StackExchange sites, so the option *could* be extended to ux.se. However I would imagine that a valid *and common* use-case would need to be made to allow this to be consid... |
1,093 | <p>Welcome to UX.StackExchange! You may have found your way to this question from a comment on the <a href="https://ux.stackexchange.com/">main site</a> -- maybe a question you asked was recently put [On Hold], or maybe we're just having trouble figuring out what you're asking and how to help you.</p>
<p>If you've come... | [
{
"answer_id": 1094,
"author": "JonW",
"author_id": 3865,
"author_profile": "https://ux.meta.stackexchange.com/users/3865",
"pm_score": 3,
"selected": false,
"text": "<h1>Introduction</h1>\n\n<p>There are a few key things to remember when asking question on User Experience StackExchange:... | 2012/09/13 | [
"https://ux.meta.stackexchange.com/questions/1093",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/3865/"
] | Welcome to UX.StackExchange! You may have found your way to this question from a comment on the [main site](https://ux.stackexchange.com/) -- maybe a question you asked was recently put [On Hold], or maybe we're just having trouble figuring out what you're asking and how to help you.
If you've come to this question yo... | Introduction
============
There are a few key things to remember when asking question on User Experience StackExchange:
1. First and foremost is that we really DO want to help you solve your problem.
2. Second is that nobody on this site knows your environment as well as you do.
3. Lastly there is a Stack Exchange a... |
1,194 | <p>As it is December 2012, we are now going to again reset our Community Promotion Ads for the new year.</p>
<h3>What are Community Promotion Ads?</h3>
<p>Community Promotion Ads are community-vetted advertisements that will show up on the main site, in the right sidebar. The purpose of this question is the vetting p... | [
{
"answer_id": 1195,
"author": "Grace Note",
"author_id": 7091,
"author_profile": "https://ux.meta.stackexchange.com/users/7091",
"pm_score": 3,
"selected": false,
"text": "<p><a href=\"http://twitter.com/stackux\" rel=\"nofollow noreferrer\"><img src=\"https://i.stack.imgur.com/oy66o.pn... | 2012/12/10 | [
"https://ux.meta.stackexchange.com/questions/1194",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/7091/"
] | As it is December 2012, we are now going to again reset our Community Promotion Ads for the new year.
### What are Community Promotion Ads?
Community Promotion Ads are community-vetted advertisements that will show up on the main site, in the right sidebar. The purpose of this question is the vetting process. Images ... | [](http://twitter.com/stackux) |
1,688 | <p>After listening to the stack exchange podcast 59, it was insinuated that Joel Spolsky does not like the ux stack exchange logo. When I had a look at it, I realised that there are some problems with the arrangement of parts making up the logo.</p>
<p>Would the UX Stack Exchange logo look better something like this..... | [
{
"answer_id": 1689,
"author": "Robert Cartaino",
"author_id": 150,
"author_profile": "https://ux.meta.stackexchange.com/users/150",
"pm_score": 2,
"selected": false,
"text": "<p>I was trying to figure out why you wanted to change the bottom two (monochrome) logos to say \"UK\". That was... | 2014/07/22 | [
"https://ux.meta.stackexchange.com/questions/1688",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/51958/"
] | After listening to the stack exchange podcast 59, it was insinuated that Joel Spolsky does not like the ux stack exchange logo. When I had a look at it, I realised that there are some problems with the arrangement of parts making up the logo.
Would the UX Stack Exchange logo look better something like this...
![impro... | I'm not sure I like the star inside the UX logo, because although it's evocative of the "favorites" icon on StackExchange, I don't think it's particularly emblematic of the site.
I also don't like the awkward use of negative space for the star, because it feels more gimmicky than communicative and it soaks up a lot of... |
1,764 | <p>The dawn of a new year, 2015, now approaches, or has already approached, either way it means that it is now time to reset our Community Promotion Ads!</p>
<h3>What are Community Promotion Ads?</h3>
<p>Community Promotion Ads are community-vetted advertisements that will show up on the main site, in the right sideb... | [
{
"answer_id": 1765,
"author": "Grace Note",
"author_id": 7091,
"author_profile": "https://ux.meta.stackexchange.com/users/7091",
"pm_score": 2,
"selected": false,
"text": "<p><a href=\"http://twitter.com/stackux\" rel=\"nofollow noreferrer\"><img src=\"https://i.stack.imgur.com/BkjDC.pn... | 2015/01/01 | [
"https://ux.meta.stackexchange.com/questions/1764",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/7091/"
] | The dawn of a new year, 2015, now approaches, or has already approached, either way it means that it is now time to reset our Community Promotion Ads!
### What are Community Promotion Ads?
Community Promotion Ads are community-vetted advertisements that will show up on the main site, in the right sidebar. The purpose... | [](https://communitybuilding.stackexchange.com/q/883) |
2,043 | <p>It's 2016 now, and we've <a href="https://meta.stackexchange.com/questions/272563/were-standardizing-the-sidebar-width-at-300px-on-all-sites">made some changes to the sidebar size</a>. As such, we can now restart the Community Promotion Ads for 2016!</p>
<p>Keep in mind, we have updated some of the guidelines compa... | [
{
"answer_id": 2044,
"author": "Grace Note",
"author_id": 7091,
"author_profile": "https://ux.meta.stackexchange.com/users/7091",
"pm_score": 1,
"selected": false,
"text": "<p><a href=\"http://twitter.com/stackux\" rel=\"nofollow noreferrer\"><img src=\"https://i.stack.imgur.com/mXgBA.pn... | 2016/01/15 | [
"https://ux.meta.stackexchange.com/questions/2043",
"https://ux.meta.stackexchange.com",
"https://ux.meta.stackexchange.com/users/7091/"
] | It's 2016 now, and we've [made some changes to the sidebar size](https://meta.stackexchange.com/questions/272563/were-standardizing-the-sidebar-width-at-300px-on-all-sites). As such, we can now restart the Community Promotion Ads for 2016!
Keep in mind, we have updated some of the guidelines compared to previously - t... | [](http://twitter.com/stackux) |
38 | <p>Every time I work on a new project I do not have any problems to center the text using "text-align: center" to center the text, but I have never seen a similar code to center images so I always have hack the code by either centering the images in the HTML (not the cleanest option) or by giving the image a variable w... | [
{
"answer_id": 49,
"author": "Sruly",
"author_id": 35,
"author_profile": "https://ux.stackexchange.com/users/35",
"pm_score": 4,
"selected": true,
"text": "<p>Set the containing elements style to</p>\n\n<pre><code>text-align:center;\n</code></pre>\n\n<p>set your image style to </p>\n\n<... | 2010/08/09 | [
"https://ux.stackexchange.com/questions/38",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/53/"
] | Every time I work on a new project I do not have any problems to center the text using "text-align: center" to center the text, but I have never seen a similar code to center images so I always have hack the code by either centering the images in the HTML (not the cleanest option) or by giving the image a variable widt... | Set the containing elements style to
```
text-align:center;
```
set your image style to
```
display:inline-block;
margin:auto;
``` |
39 | <p>I've got a small desktop application that scans music folders and randomly chooses an album to play. The first version is WinForms and has "previous" and "next" buttons either side of the album art that are activated when there are more albums by the same artist.</p>
<p><img src="https://i.stack.imgur.com/KeFE4.png... | [
{
"answer_id": 60,
"author": "Scott Newson",
"author_id": 71,
"author_profile": "https://ux.stackexchange.com/users/71",
"pm_score": 2,
"selected": false,
"text": "<p>Just because a UI element isn't immediately obvious, it doesn't mean that it's a bad choice. I'd definitely go with somet... | 2010/08/09 | [
"https://ux.stackexchange.com/questions/39",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/60/"
] | I've got a small desktop application that scans music folders and randomly chooses an album to play. The first version is WinForms and has "previous" and "next" buttons either side of the album art that are activated when there are more albums by the same artist.
.
Since you're concerned about using too much space, I suggest putting a link at the top with ... |
372 | <p>How should required field validation be handled visually?</p>
<p><strong>Note</strong>: assume asterisk is red</p>
<pre><code>*Name:[_______________]
</code></pre>
<p>or</p>
<pre><code>Name:*[_______________]
</code></pre>
<p>or</p>
<pre><code>Name: [_______________]*
</code></pre>
<p>or</p>
<pre><code>Name:... | [
{
"answer_id": 385,
"author": "Sruly",
"author_id": 35,
"author_profile": "https://ux.stackexchange.com/users/35",
"pm_score": -1,
"selected": false,
"text": "<p>until recently this was the default and it is still very common and since everyone know what it is and what it means I like it... | 2010/08/16 | [
"https://ux.stackexchange.com/questions/372",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/238/"
] | How should required field validation be handled visually?
**Note**: assume asterisk is red
```
*Name:[_______________]
```
or
```
Name:*[_______________]
```
or
```
Name: [_______________]*
```
or
```
Name: [*\_\_\_\_red bg\_\_\_\_* ]
```
or
```
Name*(<- font color red)*: [_______________]
```
or
You te... | There's never a right or wrong answer with these type of questions and a lot of it depends on your users personas (engineers vs. power users vs. aunt alice who never used a computer) and context.
A general rule is to use
```
label [input ] [validation ]
```
Using the validation area for either a red aster... |
789 | <p>I am not sure on the best way to handle some pagination I need to perform on a table that could potentially get very big (5,000 rows plus).</p>
<p>My first question is should the amount of rows shown per page be dictated only by the layout, or should the amount of pages also come into consideration. For example sho... | [
{
"answer_id": 791,
"author": "Dan Barak",
"author_id": 130,
"author_profile": "https://ux.stackexchange.com/users/130",
"pm_score": 2,
"selected": false,
"text": "<p>Pagination patterns: </p>\n\n<ul>\n<li><a href=\"http://developer.yahoo.com/ypatterns/navigation/pagination/search.html\"... | 2010/08/24 | [
"https://ux.stackexchange.com/questions/789",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/679/"
] | I am not sure on the best way to handle some pagination I need to perform on a table that could potentially get very big (5,000 rows plus).
My first question is should the amount of rows shown per page be dictated only by the layout, or should the amount of pages also come into consideration. For example should I say ... | This may or may not be pagination done right, but here is how I do pagination in my web app:
```
|< First, << Previous, Page [5] of 12, Next >>, Last >|
```
The outer four options are links, while the `Page [5] of 12` is a form, with the [5] as an input field. For users with JavaScript enabled, I hide the submit but... |
1,004 | <p>I cannot delete the question but I have moved it to SO:<br/>
<a href="https://stackoverflow.com/questions/3600204/mixing-percent-and-fixed-css">https://stackoverflow.com/questions/3600204/mixing-percent-and-fixed-css</a></p>
<p>Should you ever apply percentage and fixed CSS together? Will it cause problems, and if... | [
{
"answer_id": 1012,
"author": "neoneye",
"author_id": 382,
"author_profile": "https://ux.stackexchange.com/users/382",
"pm_score": 1,
"selected": false,
"text": "<p>If you had two different cell classes where one used percent and the other pixels then you would be in trouble. However yo... | 2010/08/28 | [
"https://ux.stackexchange.com/questions/1004",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/238/"
] | I cannot delete the question but I have moved it to SO:
<https://stackoverflow.com/questions/3600204/mixing-percent-and-fixed-css>
Should you ever apply percentage and fixed CSS together? Will it cause problems, and if so what kinds?
* I have heard that mixing can degrade render performance?
* I have hard mixing c... | If you had two different cell classes where one used percent and the other pixels then you would be in trouble. However you are only using percent inside the table and it adds up to 100%, **so there should be no problems**.
Though there could be a problem if the cells overflows, but I'm no expert in table/overflow be... |
1,150 | <p>This is such a common issue and I'm running into it in many projects.</p>
<p>Let's suppose you have a system that tracks conferences:</p>
<pre><code> Conferences
Venues -> Buildings -> Rooms
Presentations
Speakers
</code></pre>
<p>This is a hierarchy: Conferences aggregate Venues, Presentati... | [
{
"answer_id": 1151,
"author": "Dan",
"author_id": 1130,
"author_profile": "https://ux.stackexchange.com/users/1130",
"pm_score": 2,
"selected": false,
"text": "<p>I think it really depends on what you want your system to do. Tree views are definitely a tried and tested way to quickly vi... | 2010/08/31 | [
"https://ux.stackexchange.com/questions/1150",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/309/"
] | This is such a common issue and I'm running into it in many projects.
Let's suppose you have a system that tracks conferences:
```
Conferences
Venues -> Buildings -> Rooms
Presentations
Speakers
```
This is a hierarchy: Conferences aggregate Venues, Presentations, and Speakers. The problem I keep r... | I think it really depends on what you want your system to do. Tree views are definitely a tried and tested way to quickly view hierarchical data and wizards are a great solution when you want to walk the user through a multi-step process of some sort.
So then the question becomes, what user tasks are you trying facili... |
1,459 | <p>We're building a web-based platform where the main dashboard shows a table of data for users to view and analyze. As we're growing this tool, we seem to be adding more and more columns and are running out of horizontal space on smaller screen resolutions (we're seeing some data wrap). It is important to the user to ... | [
{
"answer_id": 1460,
"author": "Bojan Gavrovski",
"author_id": 1100,
"author_profile": "https://ux.stackexchange.com/users/1100",
"pm_score": 1,
"selected": false,
"text": "<p>The first thing that comes in mind is resizable columns. Since you say that all the columns should be visible, a... | 2010/09/13 | [
"https://ux.stackexchange.com/questions/1459",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1534/"
] | We're building a web-based platform where the main dashboard shows a table of data for users to view and analyze. As we're growing this tool, we seem to be adding more and more columns and are running out of horizontal space on smaller screen resolutions (we're seeing some data wrap). It is important to the user to vie... | *The OP was adamant that every bit of data needs to be visible at all times and my answer respects that constraint. For a more general solution to displaying a large table, especially on a small screen, I highly recommend this [four minute video from NN/g](https://www.nngroup.com/videos/big-tables-small-screens/)*.
Si... |
1,656 | <p>Is there any standards out there when it comes to a mailing address form?
I need to collect the following fields:</p>
<ul>
<li>address line 1</li>
<li>address line 2</li>
<li>city</li>
<li>postal code (or zip)</li>
<li>province(or state)</li>
<li>country</li>
</ul>
<p>The country and province will be drop downs. (... | [
{
"answer_id": 1658,
"author": "Julian H",
"author_id": 1742,
"author_profile": "https://ux.stackexchange.com/users/1742",
"pm_score": 2,
"selected": false,
"text": "<p>These forms annoy me. Most of the time they ask for way more information than is needed. I don't know about the UK, but... | 2010/09/24 | [
"https://ux.stackexchange.com/questions/1656",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1813/"
] | Is there any standards out there when it comes to a mailing address form?
I need to collect the following fields:
* address line 1
* address line 2
* city
* postal code (or zip)
* province(or state)
* country
The country and province will be drop downs. (the province one being dependant on the country)
so my questio... | Luke Wroblewski wrote an [article at UX Matters about international address forms](http://www.uxmatters.com/mt/archives/2008/06/international-address-fields-in-web-forms.php). I'd recommend consulting that article as it lists some best practices, patterns and conventions distilled from user research. Luke also wrote a ... |
1,773 | <p>So I'm reading some blogs and I get to the bottom of the page when I see a graphic similar to this:</p>
<pre><code><< Newer Posts Older Posts >>
</code></pre>
<p>This makes sense to me. But then, quite often, I'll see it reversed!</p>
<pre><code><< Older Posts Newer Posts>&g... | [
{
"answer_id": 1775,
"author": "Hisham",
"author_id": 388,
"author_profile": "https://ux.stackexchange.com/users/388",
"pm_score": 1,
"selected": false,
"text": "<p>(My bad: I completely missed that it's a blog. See comments)</p>\n\n<p>To me, the first one makes the most sense because it... | 2010/10/01 | [
"https://ux.stackexchange.com/questions/1773",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1901/"
] | So I'm reading some blogs and I get to the bottom of the page when I see a graphic similar to this:
```
<< Newer Posts Older Posts >>
```
This makes sense to me. But then, quite often, I'll see it reversed!
```
<< Older Posts Newer Posts>>
```
This issue is compounded even further when the l... | The text should largely depend on the actual content itself. Is it time sensitive, like news, or is it content that will be relevant no matter when it is viewed? If it's time sensitive, it makes sense to use older/newer. If it's not time sensitive, previous/next seems like a better fit.
However, I would argue that add... |
2,081 | <p>I'm trying to design a portion of a web interface that allows users to tag items and view all items with a tag or set of tags on them - think gmail, if gmail allowed you to easily select multiple tags to view all messages with all of those tags. What's the best way to show the user which set of tags they're currentl... | [
{
"answer_id": 2082,
"author": "Babak Naffas",
"author_id": 2016,
"author_profile": "https://ux.stackexchange.com/users/2016",
"pm_score": 0,
"selected": false,
"text": "<p>Just off the top of my head...</p>\n\n<p>Option 1: Modify the 'title' attribute to show the selected items on hover... | 2010/10/20 | [
"https://ux.stackexchange.com/questions/2081",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/2169/"
] | I'm trying to design a portion of a web interface that allows users to tag items and view all items with a tag or set of tags on them - think gmail, if gmail allowed you to easily select multiple tags to view all messages with all of those tags. What's the best way to show the user which set of tags they're currently v... | I'd say that it makes perfect sense to create this 'secondary list' of selected tags at the top of the list, like so: (great idea, btw)
```
Selected tag 1 (X)
Selected tag 2 (X)
Selected tag 3 (X)
-------------------
Tag 4
Tag 5
Tag 6
```
Give the selected tags a different background colour, add an "(X)" butto... |
2,237 | <p>I've noticed that many sites and user interfaces tend to capitalize certain words or sentences like so:</p>
<pre><code>Choose File
Select a File to Upload
Account Settings
How to Format
</code></pre>
<p>but in some other cases, they don't:</p>
<pre><code>Please select a file to upload to our system
Browse the... | [
{
"answer_id": 2240,
"author": "Hisham",
"author_id": 388,
"author_profile": "https://ux.stackexchange.com/users/388",
"pm_score": 2,
"selected": false,
"text": "<p>I'm not sure that using title case (capitalizing the first letter in each word) can be described as correct or incorrect. ... | 2010/10/28 | [
"https://ux.stackexchange.com/questions/2237",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/340/"
] | I've noticed that many sites and user interfaces tend to capitalize certain words or sentences like so:
```
Choose File
Select a File to Upload
Account Settings
How to Format
```
but in some other cases, they don't:
```
Please select a file to upload to our system
Browse the complete list of questions, or popul... | In English, both in computers and under the blue ceiling, title-style capitalization (capitalizing first letters of nearly all words) is for titles, and sentence-style capitalization (capitalize only the first letter for the first word) is for sentences. Titles generally include headers for your documents, pages, and s... |
2,371 | <p>I've got a simple web page from which my users can install software. It's a 2-step process so they must click on two different links (No, I cannot make it a 1-step process).</p>
<hr>
<p>Example:</p>
<p>Short paragraph goes here telling the user what to do and what the first link does.<P>
<strong>Link</strong></p... | [
{
"answer_id": 2373,
"author": "Tucker",
"author_id": 2106,
"author_profile": "https://ux.stackexchange.com/users/2106",
"pm_score": 3,
"selected": false,
"text": "<p>There are a lot of things you could try, here's a simple one:</p>\n\n<p>Only provide the first step on the page, when it'... | 2010/11/05 | [
"https://ux.stackexchange.com/questions/2371",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1588/"
] | I've got a simple web page from which my users can install software. It's a 2-step process so they must click on two different links (No, I cannot make it a 1-step process).
---
Example:
Short paragraph goes here telling the user what to do and what the first link does.
**Link**
Short paragraph goes here telling ab... | Nothing. People don't read directions. ;o)
I'd suggest making the 2 step process a major visual. something like this:
```
Your intro paragraph here
---------------------------------
| |
| this is a two step process! |
| |
| 1) [button] |... |
2,654 | <p>In header menus on websites, is it best practice to capitalize header items?</p>
<pre><code>Home | Members | About Us | Contact Us
</code></pre>
<p>To Captitalize the first letter</p>
<pre><code>Home | Members | About us | Contact us
</code></pre>
<p>Or to use lower case</p>
<pre><code>home | members | about us... | [
{
"answer_id": 2655,
"author": "Bobby Jack",
"author_id": 2637,
"author_profile": "https://ux.stackexchange.com/users/2637",
"pm_score": 3,
"selected": false,
"text": "<p>Although not a formal study, there are some <a href=\"http://www.websitecriteria.com/Website_writing_guide_web_writin... | 2010/11/24 | [
"https://ux.stackexchange.com/questions/2654",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/2640/"
] | In header menus on websites, is it best practice to capitalize header items?
```
Home | Members | About Us | Contact Us
```
To Captitalize the first letter
```
Home | Members | About us | Contact us
```
Or to use lower case
```
home | members | about us | contact us
```
Or to use CAPITALS
```
HOME | MEMBERS |... | I could go on at length about this but here is not the proper forum (former life = education consultant in the area of language acquisition (LA), and LA delays).
So, in short: As function of the text is critical to what you are doing, your best bet is to provide some sort of emphasis to the text without interfering wi... |
2,713 | <p>Should a long breadcrumb menu ever spill into a second line? If so, what are some good examples of this done right so that it looks decent? If not, what are other solutions that can solve the length problem?</p>
<p>The only things that I can think of are to shrink the text or remove some of the options, but I'm not... | [
{
"answer_id": 2714,
"author": "Bobby Jack",
"author_id": 2637,
"author_profile": "https://ux.stackexchange.com/users/2637",
"pm_score": 4,
"selected": true,
"text": "<p>I don't see a huge problem with this, although the danger is that the second line is misinterpreted - e.g. as a 'subli... | 2010/11/29 | [
"https://ux.stackexchange.com/questions/2713",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/84/"
] | Should a long breadcrumb menu ever spill into a second line? If so, what are some good examples of this done right so that it looks decent? If not, what are other solutions that can solve the length problem?
The only things that I can think of are to shrink the text or remove some of the options, but I'm not a big fan... | I don't see a huge problem with this, although the danger is that the second line is misinterpreted - e.g. as a 'sublisting' as opposed to a continuation of the breadcrumbs. You might want to emphasise the continuation with a leading separator, and a negative text-indent might also help (so the second line is then inde... |
2,730 | <p>Should the text color change when hovering over a hyperlink? I usually change my hyperlinks to a lighter shade of blue upon hover.</p>
<pre><code>a:link {
color: #0088cc;
}
a:hover {
color: #0099dd;
}
</code></pre>
<p>I believe this would make it easier to target and click a hyperlink because there's extra visu... | [
{
"answer_id": 2732,
"author": "Bobby Jack",
"author_id": 2637,
"author_profile": "https://ux.stackexchange.com/users/2637",
"pm_score": 3,
"selected": false,
"text": "<p>I think, as you've pointed out, it can aid usability in terms of 'spatial discovery' - i.e. making it slightly more o... | 2010/11/30 | [
"https://ux.stackexchange.com/questions/2730",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1975/"
] | Should the text color change when hovering over a hyperlink? I usually change my hyperlinks to a lighter shade of blue upon hover.
```
a:link {
color: #0088cc;
}
a:hover {
color: #0099dd;
}
```
I believe this would make it easier to target and click a hyperlink because there's extra visual feedback. I have hover ... | A few of my colleagues and I had just conducted a set of usability tests of a web application. Although we didn't specifically study whether or not to add other visual clues (apart from the hand cursor) on a link upon hover, we found that click-able elements (links, buttons) with more visual feedback have higher chance... |
2,819 | <p>Consider the following list of prices:</p>
<pre><code> Plan A Plan B Plan C
------ ------ ------
$50/mo $40/mo $30/mo
</code></pre>
<p>Is it more effective to list the prices low-to-high or high-to-low (when reading left to right)? (Assume also... | [
{
"answer_id": 2821,
"author": "Tucker",
"author_id": 2106,
"author_profile": "https://ux.stackexchange.com/users/2106",
"pm_score": 2,
"selected": false,
"text": "<p>You want to present the most expensive items first. </p>\n\n<p>A few reasons:</p>\n\n<ol>\n<li>People may value the prod... | 2010/12/07 | [
"https://ux.stackexchange.com/questions/2819",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1496/"
] | Consider the following list of prices:
```
Plan A Plan B Plan C
------ ------ ------
$50/mo $40/mo $30/mo
```
Is it more effective to list the prices low-to-high or high-to-low (when reading left to right)? (Assume also, that the higher cost pla... | Following shows screen-shots of different sales price comparison plans..
<http://www.webdesigndev.com/inspiration/25-clear-and-beautiful-comparison-tables>
Key thing is to distinguish the plan that you want user to select by putting a lable "Best" and/or "Recommended" on top of the column header and providing list of... |
2,917 | <p>On our website, we need users to have an availability calendar to set the availability of items they have for rent. We of course want to keep the use of the calendar as simple as possible.</p>
<p>What is a good design for such calendars ? Using things such as Google calendar seems overly complicated in terms of use... | [
{
"answer_id": 2919,
"author": "Hisham",
"author_id": 388,
"author_profile": "https://ux.stackexchange.com/users/388",
"pm_score": 0,
"selected": false,
"text": "<p>Dan is correct, your question is very general. But my first intuition after reading your question is that, for something l... | 2010/12/18 | [
"https://ux.stackexchange.com/questions/2917",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/2896/"
] | On our website, we need users to have an availability calendar to set the availability of items they have for rent. We of course want to keep the use of the calendar as simple as possible.
What is a good design for such calendars ? Using things such as Google calendar seems overly complicated in terms of use. | I haven't designed or used such a system but here are some thoughts.
A lot depends on the usage patterns of your users, what is the main timescale that they work in, i.e. do people announce their availability mainly in months, weeks or days, are they marking availability or unavailability, are they marking a lot of co... |
2,941 | <p>I'm trying to find an alternative way of displaying 50 unordered list items in 2 or 3 column layout. I feel the pattern I've using looks quite "blah." </p>
<p>Sample layout:</p>
<p>Browse by Featured Topics<br>
[Image, heading 1] [Image, heading 2] [Image, heading 3] [Image, heading 4]</p>
<p>Browse All Topics ... | [
{
"answer_id": 2932,
"author": "Bobby Jack",
"author_id": 2637,
"author_profile": "https://ux.stackexchange.com/users/2637",
"pm_score": 0,
"selected": false,
"text": "<p>What's wrong with your first icon? It looks almost perfect, to me. Of course, it would be better to see it in the con... | 2010/12/21 | [
"https://ux.stackexchange.com/questions/2941",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/2976/"
] | I'm trying to find an alternative way of displaying 50 unordered list items in 2 or 3 column layout. I feel the pattern I've using looks quite "blah."
Sample layout:
Browse by Featured Topics
[Image, heading 1] [Image, heading 2] [Image, heading 3] [Image, heading 4]
Browse All Topics (listed in alpha order)
``... | Maybe you could try a dingbat font with actual keyboard keys? Something like this:
 |
2,997 | <p>I have a long list of items sorted by date that is pageable. When a user adds an item it is shown and highlighted in the list. The problem I have is that the date entered affects where it ends up in the list. Most of the time it gets added to the top in plain view but it could end up on a different page than the use... | [
{
"answer_id": 2998,
"author": "wildpeaks",
"author_id": 2891,
"author_profile": "https://ux.stackexchange.com/users/2891",
"pm_score": 2,
"selected": false,
"text": "<p>My preference would be to scroll the list (or <strong>change the page, then scroll the list</strong>) to the location ... | 2010/12/29 | [
"https://ux.stackexchange.com/questions/2997",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3051/"
] | I have a long list of items sorted by date that is pageable. When a user adds an item it is shown and highlighted in the list. The problem I have is that the date entered affects where it ends up in the list. Most of the time it gets added to the top in plain view but it could end up on a different page than the user i... | You could display the new item below/above the currently displayed list, but separated so it's clear the item doesn't belong on this page.
```
1. Make a to-do list Today
2. New year's resolution Jan 1
3. Join the gym Jan 2
4. Answer a UI.SE question Jan 2
^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
17. St... |
3,165 | <p>I'm hoping the folks here can help me with some ideas for UI that allows a user to select which fields should be displayed in a "data view". The twist here is that the data view is a mix between a straight-forward column oriented list view and a form details view.</p>
<p>A short example the output could be:</p>
<p... | [
{
"answer_id": 3166,
"author": "ammoQ",
"author_id": 3028,
"author_profile": "https://ux.stackexchange.com/users/3028",
"pm_score": 1,
"selected": false,
"text": "<p>Check the first example of the <a href=\"http://dev.sencha.com/deploy/dev/examples/grid/grid-plugins.html\" rel=\"nofollow... | 2011/01/18 | [
"https://ux.stackexchange.com/questions/3165",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3299/"
] | I'm hoping the folks here can help me with some ideas for UI that allows a user to select which fields should be displayed in a "data view". The twist here is that the data view is a mix between a straight-forward column oriented list view and a form details view.
A short example the output could be:
```
SomeField A... | Check the first example of the [ExtJS grid plugin demo page](http://dev.sencha.com/deploy/dev/examples/grid/grid-plugins.html), maybe it's what you need! |
3,222 | <p>As part of a faceted search system I'm putting together, I have a series of checkboxes for different neighbourhoods in a city, like so:</p>
<pre><code>[ ] Neighbourhood 1 (50)
[x] Neighbourhood 2 (40)
[ ] Neighbourhood 3 (30)
[ ] Neighbourhood 4 (20)
[ ] Neighbourhood 5 (10)
</code></pre>
<p>Now, there can be over... | [
{
"answer_id": 3247,
"author": "Sean Lynch",
"author_id": 3067,
"author_profile": "https://ux.stackexchange.com/users/3067",
"pm_score": 4,
"selected": true,
"text": "<p>I would include the top 6, plus any checked items. After all if they checked them they are probably more interested in... | 2011/01/25 | [
"https://ux.stackexchange.com/questions/3222",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3379/"
] | As part of a faceted search system I'm putting together, I have a series of checkboxes for different neighbourhoods in a city, like so:
```
[ ] Neighbourhood 1 (50)
[x] Neighbourhood 2 (40)
[ ] Neighbourhood 3 (30)
[ ] Neighbourhood 4 (20)
[ ] Neighbourhood 5 (10)
```
Now, there can be over 100 in any given city, so... | I would include the top 6, plus any checked items. After all if they checked them they are probably more interested in those neighborhoods than they are in the popular ones. |
3,287 | <p>What is the expected action when a breadcrumb is clicked?</p>
<p>I have a hierarchy of data that includes meta descriptors such as:</p>
<pre><code>PersonName / Assets / House
</code></pre>
<p>I have a page for a list of Assets, a home detail, and a person detail page.</p>
<ol>
<li><p>Should clicking on "House" a... | [
{
"answer_id": 3288,
"author": "Hisham",
"author_id": 388,
"author_profile": "https://ux.stackexchange.com/users/388",
"pm_score": 0,
"selected": false,
"text": "<p>If clicking on \"House\" and clicking on \"Assets\" happen to point to the same page, then I think the breadcrumb should be... | 2011/02/01 | [
"https://ux.stackexchange.com/questions/3287",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/2139/"
] | What is the expected action when a breadcrumb is clicked?
I have a hierarchy of data that includes meta descriptors such as:
```
PersonName / Assets / House
```
I have a page for a list of Assets, a home detail, and a person detail page.
1. Should clicking on "House" and clicking on "Assets" have the same action? ... | Take the normal URL,
`https://ux.stackexchange.com/questions/3287/how-should-a-breadcrumb-behave`
As you can tell it's very cryptic:
* What's the domain? Is it <http://stackexchange.com> or <https://ux.stackexchange.com/> or maybe <https://ux.stackexchange.com/questions/> Truthfully it could be any of those. Writin... |
3,549 | <p>I'm making an android app that queries an http endpoint and displays the results with a list. Currently the results appear 10 at a time which the user navigates with next/prev. buttons. The other day I accidentally changed some code and the unintended consequence was that the next button instead of refreshing the li... | [
{
"answer_id": 3558,
"author": "Henrik Ekblom",
"author_id": 3463,
"author_profile": "https://ux.stackexchange.com/users/3463",
"pm_score": 1,
"selected": true,
"text": "<p>maybe like this</p>\n\n<p><em>first view:</em></p>\n\n<hr>\n\n<pre><code>Item 1\nItem 2\nItem 3\nItem 4\nItem 5\n\n... | 2011/02/16 | [
"https://ux.stackexchange.com/questions/3549",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/-1/"
] | I'm making an android app that queries an http endpoint and displays the results with a list. Currently the results appear 10 at a time which the user navigates with next/prev. buttons. The other day I accidentally changed some code and the unintended consequence was that the next button instead of refreshing the list ... | maybe like this
*first view:*
---
```
Item 1
Item 2
Item 3
Item 4
Item 5
[more items] <- a button
```
---
*after button click:*
---
```
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
Item 10
[more items] <- a button
```
---
The scroll position is maintained, and the new results expand downw... |
3,596 | <p>This is a very thin (and probably trivial) usability issue but I'd like your input.
The user of a webapp is editing his/her profile settings. For each setting there is a label, the actual input/checkbox and a small piece of help text giving more insight on the setting itself. </p>
<pre><code>Notifications: ... | [
{
"answer_id": 3597,
"author": "Gabriel Solomon",
"author_id": 470,
"author_profile": "https://ux.stackexchange.com/users/470",
"pm_score": 4,
"selected": true,
"text": "<p>Why don't you put both options on the same row:</p>\n\n<pre><code>[X] Notify me with [ 5 ] days ahead\n</code></pre... | 2011/02/17 | [
"https://ux.stackexchange.com/questions/3596",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3179/"
] | This is a very thin (and probably trivial) usability issue but I'd like your input.
The user of a webapp is editing his/her profile settings. For each setting there is a label, the actual input/checkbox and a small piece of help text giving more insight on the setting itself.
```
Notifications: [X]
... | Why don't you put both options on the same row:
```
[X] Notify me with [ 5 ] days ahead
``` |
3,611 | <p>When you have a form with fields and captions for these fields, should you do it like that:</p>
<pre><code>Field1: [ ]
Field2: [ ]
</code></pre>
<p>or like that:</p>
<pre><code>Field1 [ ]
Field2 [ ]
</code></pre>
<p>I saw b... | [
{
"answer_id": 3613,
"author": "Henrik Ekblom",
"author_id": 3463,
"author_profile": "https://ux.stackexchange.com/users/3463",
"pm_score": 6,
"selected": true,
"text": "<p>If your field and captions have different visual styles then the colon won't be necessary. The colon is used in tex... | 2011/02/17 | [
"https://ux.stackexchange.com/questions/3611",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3793/"
] | When you have a form with fields and captions for these fields, should you do it like that:
```
Field1: [ ]
Field2: [ ]
```
or like that:
```
Field1 [ ]
Field2 [ ]
```
I saw both used in popular application. Microsoft genera... | If your field and captions have different visual styles then the colon won't be necessary. The colon is used in text to separate parts of text since pure (non-formatted) text visually can't be separated.
---
### Colon required:
Field1: This is caption 1
Field2: This is another caption
---
### Colon not required... |
3,628 | <p>I'm building a system that requires file-uploading, and I'm wondering how I can indicate that the browser windows supports drag and drop. Since the feature is new to modern browsers, there's no user expectation of the ability.</p>
<p>I thought about this:</p>
<pre><code>[UPLOAD BUTTON]
|--------------------------... | [
{
"answer_id": 3629,
"author": "Geert",
"author_id": 2361,
"author_profile": "https://ux.stackexchange.com/users/2361",
"pm_score": 4,
"selected": true,
"text": "<p>A box with a dotted line could be a nice indication that files can be dragged to upload. The \"drag files here\" as you me... | 2011/02/18 | [
"https://ux.stackexchange.com/questions/3628",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1539/"
] | I'm building a system that requires file-uploading, and I'm wondering how I can indicate that the browser windows supports drag and drop. Since the feature is new to modern browsers, there's no user expectation of the ability.
I thought about this:
```
[UPLOAD BUTTON]
|---------------------------|
|--Drag files here... | A box with a dotted line could be a nice indication that files can be dragged to upload. The "drag files here" as you mentioned is probably very useful as well. Box.net does something like that for bulk upload and you may want to have a look at the jquery plugin pluload: <http://www.plupload.com/example_queuewidget.php... |
3,736 | <p>I'm trying to build a visual web interface where users can distribute a budget over some (varying) number of items. For example, if the budget is 100 points, I might allocate: </p>
<pre><code>50 points to 'Apples'
50 points to 'Oranges'
</code></pre>
<p>or: </p>
<pre><code>75 points to 'Apples'
25 points to 'Or... | [
{
"answer_id": 3738,
"author": "JonW",
"author_id": 3865,
"author_profile": "https://ux.stackexchange.com/users/3865",
"pm_score": 1,
"selected": false,
"text": "<p>John,</p>\n\n<p>I don't think that adding in a new category and having some of the points automatically added to it and sub... | 2011/02/24 | [
"https://ux.stackexchange.com/questions/3736",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3905/"
] | I'm trying to build a visual web interface where users can distribute a budget over some (varying) number of items. For example, if the budget is 100 points, I might allocate:
```
50 points to 'Apples'
50 points to 'Oranges'
```
or:
```
75 points to 'Apples'
25 points to 'Oranges'
```
If the user wants to add... | One problem I think you should avoid is auto-adjusting the other variables to maintain the 100% total. It can become extremely annoying to have to deal with that whenever there are more than 2 variables at play. And if you relax your restrictions a bit I think you can create a more user-friendly interface out of it.
I... |
3,788 | <p>Why is the default cursor an arrow when you hover over an HTML <code><button></code>? I always thought that arrows let you select stuff, but hands let you execute an action. Since buttons execute actions, shouldn't I override the default style to be a hand pointer?</p>
<p><img src="https://i.stack.imgur.com/l... | [
{
"answer_id": 3789,
"author": "franz976",
"author_id": 3585,
"author_profile": "https://ux.stackexchange.com/users/3585",
"pm_score": 6,
"selected": true,
"text": "<p>Buttons are a traditional desktop software UI control - a context where the hand pointer has never been used before the ... | 2011/02/25 | [
"https://ux.stackexchange.com/questions/3788",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1975/"
] | Why is the default cursor an arrow when you hover over an HTML `<button>`? I always thought that arrows let you select stuff, but hands let you execute an action. Since buttons execute actions, shouldn't I override the default style to be a hand pointer?

```
... | Buttons are a traditional desktop software UI control - a context where the hand pointer has never been used before the advent of internet.
When web pages started to use the same control, they just kept the button as it was in a desktop environment. |
3,800 | <p>I have an application implemented with Java Swing. The main view of the applications is divided in a left side and a right side. The top of the right side contains a SearchField, and a list of search results is shown below the field. The user search for items using the SearchField then the user <strong>selects</stro... | [
{
"answer_id": 3803,
"author": "Jeremy",
"author_id": 3938,
"author_profile": "https://ux.stackexchange.com/users/3938",
"pm_score": 1,
"selected": false,
"text": "<p>I have built several of these types of interfaces. I suggest as you mentioned having an add button on each item and a rem... | 2011/02/26 | [
"https://ux.stackexchange.com/questions/3800",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1014/"
] | I have an application implemented with Java Swing. The main view of the applications is divided in a left side and a right side. The top of the right side contains a SearchField, and a list of search results is shown below the field. The user search for items using the SearchField then the user **selects** one of the i... | I have built several of these types of interfaces. I suggest as you mentioned having an add button on each item and a remove button from the added items list.
Another option that I have had success with is having buttons between the two boxes with arrows showing the direction of movement.
From right to left <- is Ad... |
3,855 | <p>I've witnessed a lot of old people double clicking on hyperlinks and buttons when a single click would suffice. This odd behavior would be troublesome for buttons that toggle a state. Take for example the following video playback button, which toggles between play and stop.</p>
<pre><code>______ ______
| |... | [
{
"answer_id": 3857,
"author": "Hisham",
"author_id": 388,
"author_profile": "https://ux.stackexchange.com/users/388",
"pm_score": 2,
"selected": true,
"text": "<p>I would suggest that you remove the Javascript double-click prevention feature and instead, display a message above the icon... | 2011/03/02 | [
"https://ux.stackexchange.com/questions/3855",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/1975/"
] | I've witnessed a lot of old people double clicking on hyperlinks and buttons when a single click would suffice. This odd behavior would be troublesome for buttons that toggle a state. Take for example the following video playback button, which toggles between play and stop.
```
______ ______
| | | |
|... | I would suggest that you remove the Javascript double-click prevention feature and instead, display a message above the icon that says "Movie stopped." The message can fade away after a few seconds by itself, or immediately if they click on play again. This way, your power users aren't frustrated whereas your double-cl... |
3,875 | <p>I'm trying to find a sexy/elegant way of displaying a user's full name and the company they represent.</p>
<p>Currently, I'm doing <em>Full Name@Company Name</em>, for example <em>Bob Smith@Microsoft</em> or <em>Sally Smith@Adobe Inc</em></p>
<p>This is confusing our users into thinking these are EMAIL addresses. ... | [
{
"answer_id": 3878,
"author": "Niki Tonsky",
"author_id": 3740,
"author_profile": "https://ux.stackexchange.com/users/3740",
"pm_score": 5,
"selected": true,
"text": "<p>You can try this:</p>\n\n<pre><code>Bill Gates, Microsoft\n</code></pre>\n\n<p>— very light, but you cannot enumerate... | 2011/03/03 | [
"https://ux.stackexchange.com/questions/3875",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/2051/"
] | I'm trying to find a sexy/elegant way of displaying a user's full name and the company they represent.
Currently, I'm doing *Full Name@Company Name*, for example *Bob Smith@Microsoft* or *Sally Smith@Adobe Inc*
This is confusing our users into thinking these are EMAIL addresses. Also of importance is the Full Name an... | You can try this:
```
Bill Gates, Microsoft
```
— very light, but you cannot enumerate several names in a single line. Or
```
Bill Gates (Microsoft), Steve Jobs (Apple)
```
— heavier a little, but there’s an obvious distinction between a name and a company.
Neither of these variants use any kind of special sym... |
3,918 | <p>From usability point of view:<br>
In most of website we can see a link which do an action such as "Delete" link which deletes a record for example, "Add Comment", "Vote Up", ....</p>
<p>Is it better to put the javascript action in the href attribute of the anchor html tag: </p>
<pre><code><a href="javascript:R... | [
{
"answer_id": 3919,
"author": "srcspider",
"author_id": 3782,
"author_profile": "https://ux.stackexchange.com/users/3782",
"pm_score": 2,
"selected": false,
"text": "<p>It's better to add it dynamically. So if the user has javascript disabled he doesn't get useless buttons/links.</p>\n\... | 2011/03/05 | [
"https://ux.stackexchange.com/questions/3918",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3846/"
] | From usability point of view:
In most of website we can see a link which do an action such as "Delete" link which deletes a record for example, "Add Comment", "Vote Up", ....
Is it better to put the javascript action in the href attribute of the anchor html tag:
```
<a href="javascript:RemoveMe(132);"> Remove</a>... | It’s better to put remove link to the `href` and javascript handler in the `onclick`.
```
<a href="/123/remove/" onclick="RemoveMe(132); return false">Remove</a>
```
This way users without javascript will still be able to use your app (but with a redirect to another page), and those who have javascript enabled will ... |
3,961 | <p>When searching with ajax based suggesting field, how many letters should be typed before it starts to suggest results?
1,2,3..</p>
| [
{
"answer_id": 3964,
"author": "peterchen",
"author_id": 1386,
"author_profile": "https://ux.stackexchange.com/users/1386",
"pm_score": 4,
"selected": true,
"text": "<p><strong>Secondary rank</strong> </p>\n\n<p>If you have another factor that can rank the results (e.g. \"popularity\", \... | 2011/03/08 | [
"https://ux.stackexchange.com/questions/3961",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/3972/"
] | When searching with ajax based suggesting field, how many letters should be typed before it starts to suggest results?
1,2,3.. | **Secondary rank**
If you have another factor that can rank the results (e.g. "popularity", "kuakeli rank"):
* start with the first letter
* limit results by second rank, by picking the TOP N
(roughly: `SELECT TOP 10 FROM Stuff WHERE Name LIKE "x*" ORDER BY Rank`)
If you don't have that rank, you could still start... |
4,078 | <p>Given that there is no logically default <em>animal</em> from the list of animals below, what should be the "Default Value" below, according to best practice?</p>
<pre><code><label for="animal">Animal (required):</label>
<select name="animal">
<option value="">Default Value</option>
... | [
{
"answer_id": 4079,
"author": "jpsstavares",
"author_id": 4129,
"author_profile": "https://ux.stackexchange.com/users/4129",
"pm_score": 0,
"selected": false,
"text": "<p>I use a visual hint that the field requires input. Something like a red border with a red exclamation mark with a to... | 2011/03/15 | [
"https://ux.stackexchange.com/questions/4078",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/4152/"
] | Given that there is no logically default *animal* from the list of animals below, what should be the "Default Value" below, according to best practice?
```
<label for="animal">Animal (required):</label>
<select name="animal">
<option value="">Default Value</option>
<option value="0">Cat</option>
<option value="1... | I respectfully disagree with Michael's answer. I can't speak to desktop GUIs, but in web forms you want to avoid having a default unless you believe a large portion of your user's (maybe 90%+) will select that value. Particularly if it's a required field.
Why? Because you're likely to introduce errors because people b... |
4,109 | <p>I have a lot of time-series data. I would like to visualize this data, so that I could spot patterns like the following:</p>
<p>"About five days after event X, event Y is very likely to happen"</p>
<p>or</p>
<p>"A short burst in the frequency of event Z, makes it likely that also event Y will happen with an extra... | [
{
"answer_id": 4110,
"author": "Vitaly Mijiritsky",
"author_id": 3643,
"author_profile": "https://ux.stackexchange.com/users/3643",
"pm_score": 2,
"selected": false,
"text": "<p>I like the <a href=\"http://www.google.com//finance?chdnp=1&chdd=1&chds=1&chdv=1&chvs=maximize... | 2011/03/16 | [
"https://ux.stackexchange.com/questions/4109",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/2077/"
] | I have a lot of time-series data. I would like to visualize this data, so that I could spot patterns like the following:
"About five days after event X, event Y is very likely to happen"
or
"A short burst in the frequency of event Z, makes it likely that also event Y will happen with an extra high magnitude"
I spec... | Try using a spiral heat map to visualise your data - these are excellent at helping you to spot temporal patterns. Your time dimension becomes a spiral, one rotation per year or month, and your other variables shown as a heat map.

TDWI has [an inter... |