gcc/sort
by Patrick Dupre
Hello,
In this example, if I put a 0, the sorting is wrong which must be standard c
> After sorting the list is:
> 0 -5.5e-06 3 25 56 88 100
> -5.5e-06 2 3 25 56 88 100
#include <stdio.h>
#include <stdlib.h>
double values[] = { 88, 56, 100, 0.0, 25, 3, -0.55e-5 };
double values2 [] = { 88, 56, 100, 2, 25, 3, -0.55e-5 };
int dcmpfunc (const void * a, const void * b) {
return ( *(double*)a - *(double*)b );
}
int main () {
int n;
double *val2 = (double*) malloc (7 * sizeof(double)) ;
double *val = (double*) malloc (7 * sizeof(double)) ;
for (n = 0 ; n < 7 ; n++) val [n] = values [n] ;
for (n = 0 ; n < 7 ; n++) val2 [n] = values2 [n] ;
qsort (val, 7, sizeof (double), dcmpfunc);
qsort (val2, 7, sizeof (double), dcmpfunc);
printf ("\nAfter sorting the list is: \n") ;
for (n = 0 ; n < 7; n++ ) printf("%g ", val [n]); printf ("\n") ;
for (n = 0 ; n < 7; n++ ) printf("%g ", val2 [n]); printf ("\n") ;
return(0);
}
===========================================================================
Patrick DUPRÉ | | email: pdupre(a)gmx.com
Laboratoire interdisciplinaire Carnot de Bourgogne
9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
Tel: +33 (0)380395988
===========================================================================
4 years, 1 month
I just want to say hi :)
by Łukasz Piekarski
Hello,
My name is Łukasz, but to make things easier, I often write Lukas. I live in Poland with my son and my fiancee. I'm working in e-commerce but my passions are computers, software, programming, Linux systems and management. I'm using Fedora 31 as my daily driver. I also have computers with CentOS, elementary OS and Windows on board. I think the Linux community is amazing. Especially Fedora Community:). That's why I'm contributing to Fedora by being active on the forum, testing updates on bodhi, by reporting bugs and participating on Test Days. I love to read (and comment) articles on Fedora Magazine and Enable Sysadmin (comment section, please). Sometimes I help developers fix bugs reported on Github (recently Planner Flatpak ver) or GitLab. I helped to translate into Polish Ubuntu Budgie and some applications for AppCenter elementaryOS. You can also find me on Twitter (@roypen_). I try to share my time between my family (which is most important to me) and my hobby. In my free time, I also learn Python, Linux management and building Flatpaks. I try to plan and arrange everything so that I have time for all my activities. Unfortunately, it doesn't always work out. Especially when you also want to train running or watch a new episode of Picard series. However, I would like to contribute more to Fedora and focus on one or two areas. I have a FAS account (which I'm actively using) and I saw that there are a lot of groups to join. At this stage, I think I could help with testing and maybe the translations. I'm curious, where do you recommend to start? Where is the help most needed?
Cheers,
Lukas Piekarski
4 years, 1 month
open double quote on top of next character
by home user
(background/environment)
f30; Gnome
The problem is seen in the Gnome terminal editor, but not in gvim,
Firefox, or Thunderbird.
The terminal's font is set to the system font (vs. custom font).
The system font is set to "AR PL UKai CN Book 16". This is set via the
"Tweaks" tool. I really do need to use the UKai font.
(what I do)
When I view a Chinese music video in youtube, I also make notes about it
in a text file. I use vi(m) to edit that file.
1. In Firefox, I load a youtube video whose title and/or description
(poster's comments) contains Chinese text. This text is found below the
video itself, and above the section for comments by viewers.
2. Using the trackball (cursor), I select the text containing Chinese
characters.
3. I paste the selected text into the left part of google translate.
- Below the Chinese text that I pasted in, google translate displays
"pinyin" (the "romanization" of the Chinese text). This is useful for
pronunciation.
- In the right part of google translate, google translate shows its
English translate guess.
4. Using the trackball (cursor), I select the pinyin, and paste it into
my text file of notes about the video.
5. Using the trackball (cursor), I select the English translation guess,
and paste it into my text file of notes about the video.
(what I see)
When the Chinese text contains the Chinese equivalent of the open double
quote (it looks like a double version of the less-than character '<'),
then in my notes file, in the pinyin and English, it shows as an open
double quote with the next English character in the same position (that
is, on top of each other). There is no problem with close double
quotes. I have not seen this problem with any other character. I've
attached an example text file, and a screen capture of that text file in
vi(m). Notice in the screen capture:
- in the second non-blank line, after "13", an open double quote and the
letter 'Y' appear to be in the same position.
- in the third non-blank line, after "13 ", an open double quote and the
letter 'I' appear to be in the same position.
This problem occurs a lot, and it does make editing difficult.
(the question)
My sense is that this is not something that I can fix on my
workstation. So I should submit a bug. Where should I submit the bug,
and against what (the font or the terminal or something else (what?))?
4 years, 1 month
sqlite3: error while loading shared libraries: /lib64/libc++.so: file
too short
by Philip Rhoades
People,
I got this error after installing F31 and trying to use sqlite3. I had
to:
# mv /usr/lib64/libc++.so /usr/lib64/libc++.so.too_short
# ln -s /usr/lib64/libc++.so.1.0 /usr/lib64/libc++.so
to get sqlite3 to work . .
P.
--
Philip Rhoades
PO Box 896
Cowra NSW 2794
Australia
E-mail: phil(a)pricom.com.au
4 years, 1 month
F30: dnf, yum, mock
by John Pilkington
Fedora 30 had several dnf-related updates today. Since then, mock fails
with KeyError: 'yum.conf'
In the mockbuild directory, /var/lib/mock/Fedora.../root/etc/yum.conf is
a link to yum/yum.conf, which is a 0 byte file.
In the corresponding file for epel-7 builds, last used before the
updates, yum/yum.conf is 3.2 kB
In the F30 host /etc/yum.conf is now 816 bytes
Perhaps I should try to revert.
John P
4 years, 1 month
/tmp full and konsole not releasing the space
by Walter Cazzola
Dear all,
I've a quite "noisy" problem on my freshly installed Fedora 31 laptop. My 5Gb
/tmp partition get full in around 10 hours of up time.
No way to free it apart reboot.
At the time of writing I've the /tmp partition full but I've already run a rm
-fr /tmp/* from root.
These are some diagnostic data I can find:
>du -h /tmp
4.0K /tmp/.font-unix
4.0K /tmp/.Test-unix
4.0K /tmp/.esd-526
4.0K /tmp/.org.chromium.Chromium.KNSxtF
4.0K /tmp/.com.google.Chrome.U2x6fK
4.0K /tmp/.X11-unix
4.0K /tmp/.XIM-unix
12K /tmp/.org.chromium.Chromium.uKH2RD/icons/hicolor/22x22/apps
16K /tmp/.org.chromium.Chromium.uKH2RD/icons/hicolor/22x22
20K /tmp/.org.chromium.Chromium.uKH2RD/icons/hicolor
24K /tmp/.org.chromium.Chromium.uKH2RD/icons
28K /tmp/.org.chromium.Chromium.uKH2RD
4.0K /tmp/.ICE-unix
96K /tmp
>df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 8128348 0 8128348 0% /dev
tmpfs 8147108 296136 7850972 4% /dev/shm
tmpfs 8147108 1860 8145248 1% /run
/dev/sda7 51343840 26608456 22097560 55% /
/dev/sda12 1569780 414968 1154812 27% /mnt/win_d
/dev/sda9 7159288 1203200 5572704 18% /var
/dev/sda6 705248 215828 438104 34% /boot
/dev/sda13 765974760 681522348 45520036 94% /home
/dev/sda11 5029504 2479500 2271476 53% /usr/local/exts
/dev/sda10 5095040 4816516 0 100% /tmp
tmpfs 1629420 64 1629356 1% /run/user/526
> lsof /tmp
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
clementin 1481 cazzola 9uW REG 8,10 0 25 /tmp/qtsingleapp-clemen-d211-20e-lockfile (deleted)
dropbox 1568 cazzola 3u REG 8,10 499 37 /tmp/dropbox-antifreeze-WZmtGN (deleted)
dropbox 1568 cazzola 6u REG 8,10 0 63 /tmp/#63 (deleted)
konsole 1615 cazzola 14u REG 8,10 0 40 /tmp/#40 (deleted)
konsole 1615 cazzola 15u REG 8,10 0 42 /tmp/#42 (deleted)
konsole 1615 cazzola 16u REG 8,10 0 44 /tmp/#44 (deleted)
konsole 1615 cazzola 19u REG 8,10 41222144 46 /tmp/#46 (deleted)
konsole 1615 cazzola 20u REG 8,10 4861394944 48 /tmp/#48 (deleted)
konsole 1615 cazzola 21u REG 8,10 5181440 50 /tmp/#50 (deleted)
skypeforl 2628 cazzola 39u REG 8,10 16 110 /tmp/skype-2628/skypert_sessionkeyjlJNdT (deleted)
konsole 3464 cazzola DEL REG 8,10 162 /tmp/#162
konsole 3464 cazzola DEL REG 8,10 163 /tmp/#163
konsole 3464 cazzola DEL REG 8,10 161 /tmp/#161
konsole 3464 cazzola 17u REG 8,10 6896 113 /tmp/#113 (deleted)
konsole 3464 cazzola 18u REG 8,10 700416 114 /tmp/#114 (deleted)
konsole 3464 cazzola 19u REG 8,10 862 115 /tmp/#115 (deleted)
konsole 3464 cazzola 24u REG 8,10 6664 56 /tmp/#56 (deleted)
konsole 3464 cazzola 25u REG 8,10 0 116 /tmp/#116 (deleted)
konsole 3464 cazzola 26u REG 8,10 0 117 /tmp/#117 (deleted)
konsole 3464 cazzola 27u REG 8,10 0 118 /tmp/#118 (deleted)
konsole 3464 cazzola 32u REG 8,10 598016 57 /tmp/#57 (deleted)
konsole 3464 cazzola 34u REG 8,10 833 58 /tmp/#58 (deleted)
konsole 3464 cazzola 35u REG 8,10 0 119 /tmp/#119 (deleted)
konsole 3464 cazzola 36u REG 8,10 0 120 /tmp/#120 (deleted)
konsole 3464 cazzola 37u REG 8,10 0 121 /tmp/#121 (deleted)
konsole 3464 cazzola 45u REG 8,10 0 122 /tmp/#122 (deleted)
konsole 3464 cazzola 46u REG 8,10 0 123 /tmp/#123 (deleted)
konsole 3464 cazzola 47u REG 8,10 0 124 /tmp/#124 (deleted)
konsole 3464 cazzola 55u REG 8,10 0 125 /tmp/#125 (deleted)
konsole 3464 cazzola 56u REG 8,10 0 126 /tmp/#126 (deleted)
konsole 3464 cazzola 57u REG 8,10 0 127 /tmp/#127 (deleted)
konsole 3464 cazzola 65u REG 8,10 0 128 /tmp/#128 (deleted)
konsole 3464 cazzola 66u REG 8,10 0 129 /tmp/#129 (deleted)
konsole 3464 cazzola 67u REG 8,10 0 130 /tmp/#130 (deleted)
konsole 3464 cazzola 75u REG 8,10 0 131 /tmp/#131 (deleted)
konsole 3464 cazzola 76u REG 8,10 0 132 /tmp/#132 (deleted)
konsole 3464 cazzola 77u REG 8,10 0 133 /tmp/#133 (deleted)
konsole 3464 cazzola 85u REG 8,10 0 134 /tmp/#134 (deleted)
konsole 3464 cazzola 86u REG 8,10 0 135 /tmp/#135 (deleted)
konsole 3464 cazzola 87u REG 8,10 0 136 /tmp/#136 (deleted)
konsole 3464 cazzola 95u REG 8,10 0 137 /tmp/#137 (deleted)
konsole 3464 cazzola 96u REG 8,10 0 138 /tmp/#138 (deleted)
konsole 3464 cazzola 97u REG 8,10 0 139 /tmp/#139 (deleted)
konsole 3464 cazzola 105u REG 8,10 7824 140 /tmp/#140 (deleted)
konsole 3464 cazzola 106u REG 8,10 675840 141 /tmp/#141 (deleted)
konsole 3464 cazzola 107u REG 8,10 978 142 /tmp/#142 (deleted)
konsole 3464 cazzola 115u REG 8,10 0 143 /tmp/#143 (deleted)
konsole 3464 cazzola 116u REG 8,10 0 144 /tmp/#144 (deleted)
konsole 3464 cazzola 117u REG 8,10 0 145 /tmp/#145 (deleted)
konsole 3464 cazzola 125u REG 8,10 0 146 /tmp/#146 (deleted)
konsole 3464 cazzola 126u REG 8,10 0 147 /tmp/#147 (deleted)
konsole 3464 cazzola 127u REG 8,10 0 148 /tmp/#148 (deleted)
konsole 3464 cazzola 135u REG 8,10 0 149 /tmp/#149 (deleted)
konsole 3464 cazzola 136u REG 8,10 0 150 /tmp/#150 (deleted)
konsole 3464 cazzola 137u REG 8,10 0 151 /tmp/#151 (deleted)
konsole 3464 cazzola 145u REG 8,10 0 152 /tmp/#152 (deleted)
konsole 3464 cazzola 146u REG 8,10 0 153 /tmp/#153 (deleted)
konsole 3464 cazzola 147u REG 8,10 0 154 /tmp/#154 (deleted)
konsole 3464 cazzola 155u REG 8,10 0 155 /tmp/#155 (deleted)
konsole 3464 cazzola 156u REG 8,10 0 156 /tmp/#156 (deleted)
konsole 3464 cazzola 157u REG 8,10 0 157 /tmp/#157 (deleted)
konsole 3464 cazzola 165u REG 8,10 0 158 /tmp/#158 (deleted)
konsole 3464 cazzola 166u REG 8,10 0 159 /tmp/#159 (deleted)
konsole 3464 cazzola 167u REG 8,10 0 160 /tmp/#160 (deleted)
konsole 3464 cazzola 175u REG 8,10 6064 161 /tmp/#161 (deleted)
konsole 3464 cazzola 176u REG 8,10 1206656 162 /tmp/#162 (deleted)
konsole 3464 cazzola 177u REG 8,10 758 163 /tmp/#163 (deleted)
konsole 3464 cazzola 185u REG 8,10 0 111 /tmp/#111 (deleted)
konsole 3464 cazzola 186u REG 8,10 0 112 /tmp/#112 (deleted)
konsole 3464 cazzola 187u REG 8,10 0 164 /tmp/#164 (deleted)
konsole 3464 cazzola 195u REG 8,10 0 165 /tmp/#165 (deleted)
konsole 3464 cazzola 196u REG 8,10 0 166 /tmp/#166 (deleted)
konsole 3464 cazzola 197u REG 8,10 0 167 /tmp/#167 (deleted)
alpine 4074 cazzola 5uW REG 8,10 4 39 /tmp/.80d.12001ef
bash 14643 cazzola cwd DIR 8,10 12288 2 /tmp
vim 25380 cazzola 5u REG 8,10 4 39 /tmp/.80d.12001ef
python3 25395 cazzola 5u REG 8,10 4 39 /tmp/.80d.12001ef
lsof 26901 cazzola cwd DIR 8,10 12288 2 /tmp
lsof 26902 cazzola cwd DIR 8,10 12288 2 /tmp
It seems that konsole keeps blocked around 5Gb of space in a deleted file.
How can I force konsole to realease it?
As far as I remember, konsole was creating a huge cache file in Fedora 23 too
but that wasn't a problem because the cache at that time was stored in
.local/cache where I have plenty of space but now it is in /tmp. Alternatevely
how can I force konsole to low the amount of cache it stores?
Thank you
Walter
--
4 years, 1 month
Last kernel update 5.5.5
by jarmo
HP 15-DW021NO laptop
Fedora 31
Updated kernel to 5.5.5. After update and reboot
Network controller: Intel Corporation Dual Band
Wireless-AC 3168NGW [Stone Peak] (rev 10) stopped
working.
Lspci shows, that card found...
With kernel 5.4.20-200.f31.x86_64 wireless is
working ok.
Anyone else noticed same.
Jarmo
4 years, 1 month
Re: Last kernel update 5.5.5
by Alessio
On Feb 25, 2020 11:48 AM, jarmo <oh1mrr(a)nic.fi> wrote:
>
> Tue, 25 Feb 2020 00:23:47 -0800
> Samuel Sieb <samuel(a)sieb.net> kirjoitti:
>
> > https://bugzilla.kernel.org/show_bug.cgi?id=206329
>
> Thanks, waiting for offial update
Same problem here on a similar laptop model with Intel Wireless-AC 3168NGW
Updated today to 5.5.6-201 (from stable updates repository) and the problem has gone away.
Ciao,
A.
4 years, 1 month