[SOLVED][g++] Strange behaviour within loops

Hello
I've recently installed Arch64 on lappy. It will be used mostly for programming, therefore that's the thing which really makes me anxious: namely, loops doesn't work as they should. They seem to be skipping one iteration. As far as I have investigated, it happens when i use scanf.
Here's the code that doesn't work for me:
#include <cstdio>
using namespace std;
int main(int argc, char ** argv)
char tmp;
int index = 0;
do
printf("%d\n", index++);
printf("Enter char: ");
scanf("%c", &tmp);
printf("ASCII: %d\n", tmp);
while(tmp != '~');
return 0;
Here's what I get in terminal:
0
Enter char: l
ASCII: 108
1
Enter char: ASCII: 10
2
Enter char:
Step with number 1 is definitely not ok.
Some useful info:
glibc 2.11-1
gcc 4.4.2-3
Linux asus 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:01:40 CET 2009 x86_64 Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz GenuineIntel GNU/Linux
Thanks in advance for telling me what I miss here.
Last edited by bfo (2009-11-28 15:03:33)

Trent wrote:
May I suggest that scanf is not what you want.  In fact, scanf is almost never what you want, as described here:
http://c-faq.com/stdio/scanfprobs.html
But your code is more C-like than C++-like (from what I understand; I know very little C++).  Surely there is a more idiomatic way to read characters from stdin in C++?  Perhaps someone can educate me.
This would work in C++ (not sure it is the easiest way though, but it's easy to read):
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
char tmp;
int index = 0;
do {
cout << index++ << endl;
cout << "Enter char: ";
cin >> tmp;
cout << "ASCII: " << static_cast<int>(tmp) << endl;
} while (tmp != '~');
return 0;
cin ignores white space too, so you don't have to worry about things like '\n'.

Similar Messages

  • Strange behaviour when looping MIDI

    Hi,
    I encounter a strange behaviour when looping MIDI:
    1) Created a new MIDI track
    2) Recorded two bars of MIDI drum track (e.g. just a bass drum with Indie Kit Live) via my EDIROL and MIDI piano.
    3) played it back: works
    4) checked the "Loop" box
    5) played it back: after the 4th repeat the drum pattern changes. either it misses two beats or does not play the bass drum but the hihat for two beats.
    I'm using Logic Pro 8.
    Can someone tell me what's going on and how this can be resolved?
    Also on some occasions I have the following behaviour:
    1) Recorded MIDI in loop mode (a few takes).
    2) Played it back: Did not produce any sound.
    3) Tried a different take from the take folder: Did not produce any sound.
    4) Tried to mute/unmute track and different take from the folder: Did not produce any sound.
    5) Tried to MIDI mute/unmute different takes from the folder: Did not produce any sound.
    6) Closed/reopened project and MIDI unmuted the take: Played fine.
    Thanks a lot for some help with those two problems.
    Alex

    Did not happen again in Logic 9 and after starting a fresh project.

  • [Solved] BTRFS strange behaviour

    Hello,
    I made some tests with btrfs by installing Arch in a VM. I made a raid 1 with 2 whole disks and created root and home subvolumes. Here it is after rebooting after the install :
    Then I made a failed disk simulation by formatting the first disk, mounting the second disk in degraded mode, adding the first disk again, deleting the missing disks and balancing the data. It worked and after rebooting here is the result :
    You can see a few differences. First, why is there a Data, System and Metadata single in the first image ? I created the raid with :
    mkfs.btrfs -f -L ARCH -m raid1 -d raid1 /dev/sda /dev/sdb
    mount /dev/sda /mnt
    cd /mnt
    btrfs subvolume create root
    btrfs subvolume create home
    Next, it shouldn't be important because I imagine that the allocation would grow automatically when the used space is near the allocation limit but why did the Metadata allocated space shrink from 1 GiB to 256MB ?
    Thanks !
    Last edited by Nolhian (2014-06-09 20:25:28)

    The tidbits of 'Single' are apparently a bug.  You can get rid of them with a balance.
    # btrfs balance start -dconvert=raid1,soft -mconvert=raid1,soft /path/to/btrfs
    The System and Metadata sections are both handled by the -m.  But sometimes the System chunk will not balance.  If this happens, you can use:
    # btrfs balance start -sconvert=raid1,soft -f /path/to/btrfs
    This will do only the System portion and will force it.  Like pacman, use the force with extreme caution.
    In the examples above, the soft simply tells it to balance only the portions that are not already in the desired profile that is specified by convert.
    I'm not sure why the Metadata shrank the way it did.  But there is no reason why you would need to have 1GiB of Metadata chunks for 45MiB of Metadata.  It is supposed to allocate chunks 256MiB at a time.  So really I just have no idea why it would have given it a full GiB to begin with there. 
    But when you added a new disk, you balanced the filesystem.  So basically it saw that there was such a tiny amount of Metadata, and acted accordingly.

  • [SOLVED] French Canadian keyboard strange behaviour

    Hello!
    I just upgraded to Gnome 2.30 in [testing] and my keyboard has a strange behaviour. With Gnome 2.28, my keyboard layout was set to Canadian French (legacy), and still is, though some of the keys do not behave the same. For instance, the accents "`", "¸" and ^ do not behave as usual, but rather give me some letter with that accent on it, rather than letting me choose the letter on which put the accent.
    Moreover, the SHIFT+3 combination gives me a # instead of a /, but not in all software. Google Chrome has the good behaviour, but gnome-terminal gives me a #.
    Do you understand any of this?
    I'll post the packages I have upgraded.
    [2010-04-05 01:09] upgraded openssl (0.9.8n-1 -> 1.0.0-2)
    [2010-04-05 01:09] upgraded python (2.6.5-2 -> 2.6.5-3)
    [2010-04-05 01:09] upgraded pygobject (2.20.0-1 -> 2.21.1-1)
    [2010-04-05 01:09] upgraded pygtk (2.16.0-2 -> 2.17.0-1)
    [2010-04-05 01:09] upgraded gnome-menus (2.28.0.1-1 -> 2.30.0-1)
    [2010-04-05 01:09] upgraded libsoup (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:09] upgraded libldap (2.4.21-1 -> 2.4.21-2)
    [2010-04-05 01:09] upgraded libidl2 (0.8.13-1 -> 0.8.14-1)
    [2010-04-05 01:09] upgraded orbit2 (2.14.17-1 -> 2.14.18-1)
    [2010-04-05 01:09] upgraded gconf (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:09] upgraded gnome-keyring (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:09] upgraded heimdal (1.3.1-3 -> 1.3.2-1)
    [2010-04-05 01:09] upgraded libsoup-gnome (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded gnome-icon-theme (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded libgweather (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded evolution-data-server (2.28.3.1-1 -> 2.30.0-2)
    [2010-04-05 01:10] upgraded gnome-desktop (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded libwnck (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded libunique (1.1.6-1 -> 1.1.6-2)
    [2010-04-05 01:10] upgraded gnome-disk-utility (2.28.1-1 -> 2.30.1-1)
    [2010-04-05 01:11] upgraded libarchive (2.8.3-1 -> 2.8.3-3)
    [2010-04-05 01:11] upgraded smbclient (3.5.1-1 -> 3.5.1-2)
    [2010-04-05 01:11] upgraded gvfs (1.4.3-1 -> 1.6.0-1)
    [2010-04-05 01:11] upgraded gnome-vfs (2.24.2-2 -> 2.24.3-2)
    [2010-04-05 01:11] upgraded libbonobo (2.24.2-1 -> 2.24.3-1)
    [2010-04-05 01:11] upgraded libgnome (2.28.0-2 -> 2.30.0-1)
    [2010-04-05 01:11] upgraded libart-lgpl (2.3.20-1 -> 2.3.21-1)
    [2010-04-05 01:11] upgraded libgnomecanvas (2.26.0-1 -> 2.30.1-1)
    [2010-04-05 01:11] upgraded libbonoboui (2.24.2-1 -> 2.24.3-1)
    [2010-04-05 01:11] upgraded librsvg (2.26.0-2 -> 2.26.2-1)
    [2010-04-05 01:11] upgraded gnome-panel (2.28.0-2 -> 2.30.0-1)
    [2010-04-05 01:11] upgraded libgnomeui (2.24.2-1 -> 2.24.3-1)
    [2010-04-05 01:11] upgraded gnome-python (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:11] upgraded alacarte (0.12.4-2 -> 0.13.1-1)
    [2010-04-05 01:11] upgraded apache (2.2.15-1 -> 2.2.15-2)
    [2010-04-05 01:11] upgraded at-spi (1.28.1-1 -> 1.30.0-1)
    [2010-04-05 01:11] upgraded totem-plparser (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded brasero (2.28.3-2 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded icu (4.2.1-1 -> 4.4-1)
    [2010-04-05 01:12] upgraded brltty (4.1-2 -> 4.1-3)
    [2010-04-05 01:12] upgraded libgtop (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:12] upgraded bug-buddy (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded cheese (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded clutter (1.0.10-1 -> 1.2.4-1)
    [2010-04-05 01:12] upgraded clutter-gtk (0.10.2-1 -> 0.10.2-2)
    [2010-04-05 01:12] upgraded libxklavier (4.0-1 -> 5.0-1)
    [2010-04-05 01:12] upgraded libgnomekbd (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded gnome-settings-daemon (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded zenity (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded metacity (2.28.1-1 -> 2.30.0-2)
    [2010-04-05 01:13] upgraded gnome-control-center (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded compiz-decorator-gtk (0.8.4-2 -> 0.8.4-3)
    [2010-04-05 01:13] upgraded libcups (1.4.2-5 -> 1.4.3-2)
    [2010-04-05 01:13] upgraded openslp (1.2.1-2 -> 1.2.1-3)
    [2010-04-05 01:13] upgraded cups (1.4.2-5 -> 1.4.3-2)
    [2010-04-05 01:13] upgraded curl (7.20.0-1 -> 7.20.0-2)
    [2010-04-05 01:13] upgraded cvs (1.11.23-4 -> 1.11.23-5)
    [2010-04-05 01:13] upgraded postgresql-libs (8.4.3-1 -> 8.4.3-2)
    [2010-04-05 01:13] upgraded cyrus-sasl-plugins (2.1.23-1 -> 2.1.23-2)
    [2010-04-05 01:13] upgraded cyrus-sasl (2.1.23-3 -> 2.1.23-4)
    [2010-04-05 01:13] upgraded dbus-python (0.83.0-2.1 -> 0.83.1-1)
    [2010-04-05 01:13] upgraded gnome-python-desktop (2.28.0-3 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded deskbar-applet (2.28.0-3 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded dnsutils (9.6.1-2 -> 9.6.1-3)
    [2010-04-05 01:14] upgraded eog (2.28.2-2 -> 2.30.0-1)
    [2010-04-05 01:14] upgraded libwebkit (1.1.15.4-3 -> 1.1.90-2)
    [2010-04-05 01:14] upgraded gobject-introspection (0.6.6-1 -> 0.6.9-1)
    [2010-04-05 01:14] upgraded epiphany (2.28.2-2 -> 2.30.0-1)
    [2010-04-05 01:14] upgraded evince (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:14] upgraded gtkhtml (3.28.3-1 -> 3.30.0-1)
    [2010-04-05 01:14] upgraded evolution-exchange (2.28.3-1 -> 2.30.0-2)
    [2010-04-05 01:14] upgraded evolution-webcal (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:14] upgraded file-roller (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gcalctool (5.28.2-1 -> 5.30.0-1)
    [2010-04-05 01:15] upgraded gconf-editor (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gnome-session (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gdm (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gtksourceview2 (2.8.2-1 -> 2.10.0-1)
    [2010-04-05 01:15] upgraded pygtksourceview2 (2.8.0-1 -> 2.10.0-1)
    [2010-04-05 01:15] upgraded gedit (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded git (1.7.0.3-1 -> 1.7.0.4-1)
    [2010-04-05 01:15] upgraded libsigc++2.0 (2.2.4.2-1 -> 2.2.5-1)
    [2010-04-05 01:15] upgraded glibmm (2.22.1-1 -> 2.24.0-1)
    [2010-04-05 01:15] upgraded gucharmap (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded gnome-applets (2.28.0-2 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded gnome-backgrounds (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded gnome-bluetooth (2.28.6-1 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded vte (0.22.5-1 -> 0.24.0-2)
    [2010-04-05 01:16] upgraded gnome-desktop-sharp (2.26.0-3 -> 2.26.0-5)
    [2010-04-05 01:16] upgraded gnome-doc-utils (0.18.1-1 -> 0.20.0-1)
    [2010-04-05 01:17] upgraded gnome-games (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-games-extra-data (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-mag (0.15.9-1 -> 0.16.1-1)
    [2010-04-05 01:17] upgraded gnome-media (2.28.5-1 -> 2.30.0-2)
    [2010-04-05 01:17] upgraded gnome-netstatus (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:17] upgraded gnome-nettool (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-power-manager (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-screensaver (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gtkmm (2.18.2-1 -> 2.20.0-1)
    [2010-04-05 01:17] upgraded gnome-system-monitor (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:18] upgraded system-tools-backends (2.8.3-1 -> 2.10.0-1)
    [2010-04-05 01:18] upgraded liboobs (2.22.2-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded nautilus (2.28.4-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gnome-system-tools (2.28.2-1 -> 2.30.0-2)
    [2010-04-05 01:18] upgraded gnome-terminal (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gtk-engines (2.18.5-1 -> 2.20.0-1)
    [2010-04-05 01:18] upgraded gnome-themes (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gnome-user-share (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gnome-utils (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded xulrunner (1.9.2.2-2 -> 1.9.2.3-1)
    [2010-04-05 01:19] upgraded yelp (2.28.1-2 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded gnome2-user-docs (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded gok (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded grep (2.6.2-1 -> 2.6.3-1)
    [2010-04-05 01:19] upgraded gstreamer0.10-bad (0.10.18-2 -> 0.10.18-3)
    [2010-04-05 01:19] upgraded neon (0.28.6-2 -> 0.28.6-4)
    [2010-04-05 01:19] upgraded gstreamer0.10-bad-plugins (0.10.18-2 -> 0.10.18-3)
    [2010-04-05 01:19] upgraded hamster-applet (2.28.2-1 -> 2.30.0.1-1)
    [2010-04-05 01:19] upgraded net-snmp (5.5-2 -> 5.5-3)
    [2010-04-05 01:19] upgraded hplip (3.9.12-5 -> 3.10.2-1)
    [2010-04-05 01:20] upgraded imap (2007e-1 -> 2007e-2)
    [2010-04-05 01:20] upgraded jre (6u18-2 -> 6u19-2)
    [2010-04-05 01:21] upgraded kdebase-workspace (4.4.2-1 -> 4.4.2-2)
    [2010-04-05 01:21] upgraded kernel26-firmware (2.6.33.1-1 -> 2.6.33.2-1)
    [2010-04-05 01:24] upgraded kernel26 (2.6.33.1-1 -> 2.6.33.2-1)
    [2010-04-05 01:24] upgraded kernel26-headers (2.6.33.1-1 -> 2.6.33.2-1)
    [2010-04-05 01:24] upgraded lib32-glib2 (2.22.5-1 -> 2.24.0-1)
    [2010-04-05 01:24] upgraded lib32-atk (1.28.0-1 -> 1.30.0-1)
    [2010-04-05 01:24] upgraded lib32-e2fsprogs (1.41.10-1 -> 1.41.11-1)
    [2010-04-05 01:24] upgraded lib32-openssl (0.9.8n-1 -> 1.0.0-2)
    [2010-04-05 01:24] upgraded lib32-heimdal (1.3.1-3 -> 1.3.2-1)
    [2010-04-05 01:24] upgraded lib32-libcups (1.4.2-5 -> 1.4.3-2)
    [2010-04-05 01:24] upgraded lib32-pango (1.26.2-1 -> 1.28.0-1)
    [2010-04-05 01:24] upgraded lib32-gtk2 (2.18.9-2 -> 2.20.0-2)
    [2010-04-05 01:24] upgraded lib32-libgl (7.7-1 -> 7.7.1-0.1)
    [2010-04-05 01:24] upgraded lib32-libxml2 (2.7.6-2 -> 2.7.7-1)
    [2010-04-05 01:24] upgraded lib32-mesa (7.7-1 -> 7.7.1-0.1)
    [2010-04-05 01:24] upgraded lib32-qt (4.6.2-2 -> 4.6.2-3)
    [2010-04-05 01:24] upgraded libepc (0.3.10-1 -> 0.3.11-1)
    [2010-04-05 01:24] upgraded libfetch (2.30-1 -> 2.30-3)
    [2010-04-05 01:24] upgraded libgail-gnome (1.20.1-1 -> 1.20.2-1)
    [2010-04-05 01:24] upgraded libgdata (0.4.0-1 -> 0.6.4-1)
    [2010-04-05 01:24] upgraded libgnomecups (0.2.3-6 -> 0.2.3-7)
    [2010-04-05 01:24] upgraded libgnomeprint (2.18.6-2 -> 2.18.7-2)
    [2010-04-05 01:24] upgraded libgnomeprintui (2.18.4-1 -> 2.18.5-1)
    [2010-04-05 01:24] upgraded librpcsecgss (0.19-2 -> 0.19-3)
    [2010-04-05 01:24] upgraded libssh (0.4.1-1 -> 0.4.1-3)
    [2010-04-05 01:25] upgraded libxml++ (2.26.0-1 -> 2.30.0-1)
    [2010-04-05 01:25] upgraded links (2.2-3 -> 2.2-4)
    [2010-04-05 01:25] upgraded lynx (2.8.7-1 -> 2.8.7-2)
    [2010-04-05 01:25] upgraded sbcl (1.0.35-1 -> 1.0.37-1)
    [2010-04-05 01:25] upgraded maxima (5.20.1-2 -> 5.20.1-3)
    [2010-04-05 01:25] upgraded mercurial (1.5-1 -> 1.5.1-1)
    [2010-04-05 01:26] upgraded miro (2.5.4-4 -> 3.0-1)
    [2010-04-05 01:26] upgraded mousetweaks (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:26] upgraded nasm (2.07-1 -> 2.08.01-1)
    [2010-04-05 01:26] upgraded nautilus-actions (1.12.2-1 -> 2.30.0-1)
    [2010-04-05 01:26] upgraded nautilus-open-terminal (0.18-1 -> 0.18-2)
    [2010-04-05 01:26] upgraded nautilus-sendto (2.28.2-1 -> 2.28.4-1)
    [2010-04-05 01:26] upgraded samba (3.5.1-1 -> 3.5.1-2)
    [2010-04-05 01:26] upgraded nautilus-share (0.7.2-4 -> 0.7.2-5)
    [2010-04-05 01:26] upgraded network-manager-applet (0.8-2 -> 0.8-3)
    [2010-04-05 01:26] upgraded nfs-utils (1.2.2-1 -> 1.2.2-2)
    [2010-04-05 01:26] upgraded nmap (5.21-1 -> 5.21-2)
    [2010-04-05 01:26] upgraded ptlib (2.6.5-1 -> 2.6.5-2)
    [2010-04-05 01:27] upgraded opal (3.6.6-1 -> 3.6.6-2)
    [2010-04-05 01:27] upgraded openntpd (3.9p1-10 -> 3.9p1-11)
    [2010-04-05 01:28] upgraded openoffice-base (3.2.0-1 -> 3.2.0-3)
    [2010-04-05 01:28] upgraded openssh (5.4p1-3 -> 5.4p1-4)
    [2010-04-05 01:28] upgraded openvpn (2.1.1-1 -> 2.1.1-2)
    [2010-04-05 01:28] upgraded orca (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:28] upgraded perl-crypt-ssleay (0.57-3 -> 0.57-4)
    [2010-04-05 01:28] upgraded perl-uri (1.52-1 -> 1.54-1)
    [2010-04-05 01:28] upgraded php (5.3.2-4 -> 5.3.2-6)
    [2010-04-05 01:28] upgraded php-apache (5.3.2-4 -> 5.3.2-6)
    [2010-04-05 01:28] upgraded pixman (0.16.6-1 -> 0.18.0-1)
    [2010-04-05 01:28] upgraded postfix (2.7.0-1 -> 2.7.0-2)
    [2010-04-05 01:28] upgraded qt (4.6.2-2 -> 4.6.2-3)
    [2010-04-05 01:28] upgraded qtscriptgenerator (0.1.0-3 -> 0.1.0-4)
    [2010-04-05 01:29] upgraded rhythmbox (0.12.7-1 -> 0.12.8-1)
    [2010-04-05 01:29] upgraded ruby (1.9.1_p378-1 -> 1.9.1_p378-2)
    [2010-04-05 01:29] upgraded seahorse (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:29] upgraded seahorse-plugins (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:29] upgraded sound-juicer (2.28.1-2 -> 2.28.2-1)
    [2010-04-05 01:29] upgraded subversion (1.6.9-2 -> 1.6.9-4)
    [2010-04-05 01:29] upgraded syslog-ng (3.0.4-3 -> 3.0.4-4)
    [2010-04-05 01:29] upgraded telepathy-glib (0.10.1-1 -> 0.10.2-1)
    [2010-04-05 01:29] upgraded tomboy (1.1.0-1 -> 1.2.0-2)
    [2010-04-05 01:29] upgraded totem (2.28.5-2 -> 2.30.0-1)
    [2010-04-05 01:29] upgraded transmission-gtk (1.92-1 -> 1.92-2)
    [2010-04-05 01:30] upgraded vala (0.7.10-1 -> 0.8.0-1)
    [2010-04-05 01:30] upgraded vinagre (2.28.1-2 -> 2.30.0-1)
    [2010-04-05 01:30] upgraded vino (2.28.1-3 -> 2.28.2-1)
    [2010-04-05 01:30] upgraded virtuoso (6.1.0-1 -> 6.1.0-2)
    [2010-04-05 01:30] upgraded wget (1.12-1 -> 1.12-2)
    [2010-04-05 01:30] upgraded wpa_supplicant (0.6.10-1 -> 0.6.10-2)
    [2010-04-05 01:30] upgraded xorg-server (1.7.6-2 -> 1.7.6-3)
    [2010-04-05 01:30] upgraded xorg-xinit (1.2.0-1 -> 1.2.1-1)
    [2010-04-05 01:30] upgraded xterm (255-1 -> 256-1)
    [2010-04-05 09:21] upgraded fofix-svn (1991-1 -> 2038-1)
    [2010-04-05 12:31] upgraded gloobus-preview-bzr (212-1 -> 214-1)
    Last edited by valandil (2010-04-06 16:52:28)

    Problem solved!
    I remembered I once configured my keyboard with HAL and /etc/hal/fdi/policy/10-keymap.fdi was set to xkb.layout=ca and xkd.variant=fr. I changed the GDM layout to Canada and removed the xkb.variant=fr from the .fdi file and everything was fixed!

  • FOR i IN (statement) LOOP - very strange behaviour

    Hello, I'm experiencing very strange behaviour in my 9i Development Environment:
    If I run this select from SQL Plus a I get six month with number of days:
    select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan from dual a connect by level <=6
    But if I try to cycle through it in PL/SQL I only get the first row.
    FOR i in (
    select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan
    from dual a
    connect by level <=6 )
    loop
    -- print something out
    end loop;
    Any ideas why does this happen this way? If I use a query that does not contain CONNECT BY it works ok.

    Hi
    Just change as given below:
    FOR i in (
    select * from (select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan
    from dual a
    connect by level <=6 ))
    loop
    -- print something out
    end loop;
    Regards
    RK

  • [solved] AMD Radeon - strange behaviour after mesa-update

    Good afternoon Ladies and Gentlemen,
    This is my first posting, I will try to give as much as detailed information refering to my problem as possible. Please be patient if I ask for solutions which for you all seem easy and logical, I am a Newbie.
    The details: I am running a HP Pavilion 17 " AMD Quadcore laptop, 8gb Ram, Arch Linux 32bit Kernel 3.17.1 XFCE desktop with an AMD Radeon graphic card for about a few weeks now. Everything went fine so far, but last Saturday I did an update via pacman-Syu, the update included a mesa package. All went smooth as ever. Then after a reboot the XFCE desktop had stripes across the laptop screen, the mouse cursor had disappeared, also letters of the icon descriptions and the menus were missing, some strange "hieroglyphics" appeared instead of them. I wasn't able to downgrade the mesa-package as I nearly wasn't able to open the terminal because of the missing mouse cursor, then I managed somehow to get into the terminal and gave in the commands but the writing was incomplete and/or did not work because of these strange and missing letters.
    No problem, I thought to myself, a fresh install will do the work, so I wipped my hard drive using Parted Magic, then I did a fresh Arch install (Netinstall), this time using LXDE instead of XFCE as my desktop environment. When I booted into the login screen first, it looked fine but after logging into the desktop all the stripes, the missing mouse cursor and the strange letters appeared again. So is there any solution to that strange behaviour ? Before the Saturday-update everything worked without any problems for weeks. BTW other OS work without these problems, I tried Macpup just for fun, no messing-up with my Radeon graphics card happened.
    Sorry for my piss poor English I am Austrian. Sorry for eventually causing any inconvenience asking this question. Regards, Fladi.
    Last edited by fladi (2014-11-04 05:01:28)

    fafik1234 wrote:
    I have the same problem, free drivers, xfce4, procesor AMD5350(Kabini), vga radeon R3 (8400)
    downgrade linux kernel to linux-3.16.4
    download: http://seblu.net/a/arm/packages/l/linux … pkg.tar.xz
    pacma -U linux-3.16.4-1-i686.pkg.tar.xz
    edit /etc/pacman.conf
    IgnorePkg   =  linux linux-headers
    screenshot
    linux 3.17 xfce http://pics.tinypic.pl/i/00592/ek3z3ip81ky2.png
    linux 3.17 compiz http://pics.tinypic.pl/i/00592/bddprwn4tey8.png
    linux 3.16 compiz http://pics.tinypic.pl/i/00592/ja5ma8c7rdgl.png
    On a laptop, free drivers, linux 3.17.1-pae, openbox, procesor core i5, vga integrated card - everything OK
    The screenshots you posted match exactly to my problem ! Are you really sure the bug is coming from Kernel 3.17 ? I had this kernel running for about a week without any problems, the problems came when updating mesa.

  • Strange behaviour from new 2012R2 in old domain

    Hi all,
    At work (education level), I'm starting to take charge of windows admin, so beiing a noob admin I'm finding strange behaviours that I hope you can help me solve them all :-)
    We've one (big) domain with about 5000 computers (workers and students all together), and around 50000 users (again, workers and students all together) setup like this:
    DC-DOMAIN-1:
    Windows Server 2008R2
    Shares NETLOGON and SYSVOL
    DC-DOMAIN-2:
    Windows Server 2003 R2 x64
    Shares CertEnroll, NETLOGON, SMSLOGON, SYSVOL
    Checking RootDSE, I see 'domainControllerFunctionaly is Windows 2003' (DC-DOMAIN-2)
    So, with this setup, I've noticed these strange behaviours, hope list isn't too big  (guess there will be more behaviours but these seemed too odd):
    1) On DC-DOMAIN-2, WinServer 2003 eventlog, inside 'Directory Service', I found this warning event ID 1083 (Source NTDS Replication):
    Active Directory could not update the following object with changes received from the domain controller at the following network address because Active Directory was busy processing information.
    Object:CN=<an user name>, CN=Users, DC=DOMAIN
    Usually followed by an information event (eventid 1955) which says:
    ctive Directory encountered a write conflict when applying replicated changes to the following object.
    Object:
    <SAME USER OBJECT THAN PREVIOUS EVENT ID>
    Time in seconds:
    0
    Event log entries preceding this entry will indicate whether or not the update was accepted.
    A write conflict can be caused by simultaneous changes to the same object or simultaneous changes to other objects that have attributes referencing this object. This commonly occurs when the object represents a large group with many members, and the functional level of the forest is set to Windows 2000. This conflict triggered additional retries of the update. If the system appears slow, it could be because replication of these changes is occurring.
    User Action
    Use smaller groups for this operation or raise the functional level to Windows Server 2003.
    And having as result that user being blocked in domain.
    2) I've added a new print server based on Windows Server 2012R2 (running inside an updated ESX 5.5 with VMXNET3 ethernet adapter as recommended by vmware), and seen in the event viewer these warnings/errors:
    At System log:
    Error Event ID 5783, Source NETLOGON:
    The session setup to the Windows NT or Windows 2000 Domain Controller \\DC-DOMAIN-2.fulldns.name for the domain DOMAIN is not responsive. The current RPC call from Netlogon on \\PRINTSERVER to \\DC-DOMAIN-2.fulldns.name has been cancelled.
    I've seen Event ID 5783 with DC-DOMAIN-1 too....
    Error Event ID 5719, Source NETLOGON:
    This computer was not able to set up a secure session with a domain controller in domain DOMAIN due to the following:
    The remote procedure call failed and did not execute.
    This may lead to authentication problems. Make sure that
    this computer is connected to the network. If the problem persists, please contact your domain administrator.
    ADDITIONAL INFO:
    If this computer is a domain controller for the specified domain, it sets up the secure session to the primary domain controller emulator in the specified domain. Otherwise, this computer sets up the secure session to any domain controller in the specified domain.
    At Microsoft-Windows-TerminalServices-RemoteConnectinoManager/Admin found also this warning:
    Warning Event ID 20499 Source TerminalServices-RemoteConnectionManager:
    Remote Desktop Services has taken too long to load the user configuration from server \\DC-DOMAIN-2.fulldns.name for user administrator
    3) If I try Group Policy Modeling on DC-DOMAIN-1 (server 2008R2), everything works fine, no matter if I try it against DC-DOMAIN-1 or DC-DOMAIN-2, but if I try this from the Server 2012R2 (the one from point 2), I get this:
    Simulation against DC-DOMAIN-2: Gets executed, but all GPO show as inaccessible, empty or disabled.
    Simulation against DC-DOMAIN-1: Sometimes it gets executed as DC-DOMAIN-2, sometimes I get an error saying query can't be executed.
    4) From server 2012R2, I usually manage printing GPO. If I click on the domain root (GPMC, forest, Domains, DOMAIN-NAME-ROOT) right pane, I get a pop up saying: 
    'A processing error ocurred collecting data using this base domain controller. Please change the base domain controller and try again'
    After closing popup, right pane says something like 'DC-DOMAIN-2.fulldns.name' is the baseline domain controller for this domain.
    No infrastructure Status information exists for this domain.
    Click the Detect Now button below to gather infrastructure status from all of the domain controllers in this domain.
    Pressing 'Detect Now' does nothing, and trying to select New Baseline DC shows again same pop up than before.
    5) Last, but not least, I've feeling that GPO takes too much to apply. I've found scenarios in which even after executing 'gpupdate /force' correctly on client computer either local or domain admin, I can't see the new changes (gpresult says it has been
    updated though). But couldn't find anything on eventlog that informs about problems with GPOs...
    For all these strange behaviours I've noticed in last month that I started checking things as sys admin, I believe domain is damaged, or something is wrong there (not just my new server 2012R2, even if it's running inside an ESX, blehh), so please, any hint
    on what to check, what to change, what to fix, would be highly appreciated.
    Thanks in advance.

    Hi Paul,
    Honestly, I'm still trying to figure out all broken things reported by tests :( Guess Jesper's suggestion about adding a new 2008 DC to get rid of 2003 and start checking again after that may be best option.
    I'll try to summarize list of things I believe are wrong:
    running
    DCDIAG /V /C /D /E /s:yourdcname > c:\dcdiag.log  for every DC, shows different errors. They show things such as:
    another domain running here (not administered by us, only relationship is that our users are shared with that domain, nothing else) appear when Printing out pDsInfo (as if they were DC of our domain too, but they do not even share RootDomain). Guess it
    may be for a bug old sys admin had when clonning from his 2008R2 template, that forgot to change SID... I already noticed 1 year ago our print server shared SID with those DC, guess there may be more servers sharing SID too :-(
    Within Starting test: Replications, I see few messages at Replication Latency Check, such as the one for CN=Schema, CN=Configuration, DC=<ourdomain>: 
    Latency information for 35 entries in the vector were ignored.
                      35 were retired Invocations.  0 were either: read-only replicas and are not verifiably latent, or dc's no longer replicating this nc.  0 had no latency information (Win2K DC)
    On Services test, I see an 
       Invalid service type: RpcSs on DC-DOMAIN-3, current value
                WIN32_OWN_PROCESS, expected value WIN32_SHARE_PROCESS
    On SystemLog, I see LOTS of warnings/errors such as:
    A warning event occurred.  EventID: 0x80000002
                Time Generated: 07/28/2014   08:21:54
                (Event String (event log = System) could not be retrieved, error
                0x503)
             An error event occurred.  EventID: 0xC0000003
                Time Generated: 07/28/2014   08:22:18
                (Event String (event log = System) could not be retrieved, error
                0x3afc)
    Missing entries on DNS (we've a static DNS)
    netdiag.exe /v > c:\netdiag.log Showed again DNS problems such as our primary DNS pointing to all DC, secondary
    DNS pointing just to DC with FSMO roles,...
    repadmin.exe /showrepl * /verbose /all /intersite > c:\repl.txt  Gave no errors, now I must check in detail
    if every replica is correct
    And finally,
    dnslint /ad /s "ip address of your dc"  gave more DNS problems:
    One or more DNS servers may not be authoritative for the domain
    One or more DNS servers did not respond to UDP queries
    One or more zone files may have expired
    SOA record data was unavailable and/or missing on one or more DNS servers
    Sumarizing, guess it will be better to fix DNS problems, promote new 2008R2 DC to get rid of 2003 one, promote domain to 2008 too, check again for messages and relationship with other domain, and then come back here for support if needed 
    EDIT: Almost forgot to talk about SYSVOL folder. As said before, there are 426 GPO folders inside Policies. Of them, 375 have an inetres.adm files in it (smallest one 1398 KB, almost all of them 2307 or 2707 kb).... 

  • LR 1.3.1 strange behaviour: L key adds keywords and removes pictures from collection

    After updating to LR 1.3.1 yesterday I found a very strange behaviour that I cannot explain: While in the Library module and looking at a picture from a collection (in loupe mode) I cycle through the different light modes using the L key. Then suddenly (after several hits of the L key) a keyword is added (not always the same keyword) and at the same time an unknown number of pictures is removed from the collection. The keyword is not added to the picture I was currently viewing, but to another one from the same collection. This has not happened before and I have no idea what is going on. I can restore the collection by relaunching an older catalog but of course this does not solve the problem. Can anybody help?
    (PC, Win XP prof SP 2, 4 Gig RAM)

    It is possible that instead of hitting the l key, or perhaps within the same sequence of hits your are in fact accidentally hitting the k key.
    K is the shortcut for "Add shortcut keyword"
    Of course you would have had to set that particular keyword at some point and it does not explain the different keywords being assigned.
    Unless the alt key was involved somehow and you were rating the images with 1-9 numbers. That would account for different keywords being assigned and would seem arbitrary.
    To check: look at one or two of the images that you may have rated using a number key and then look at the keyword set the keyword came from. Press the alt key and a number from 1-9 will appear next to the keyword. If they match then thats the answer.
    If you weren't rating the images this way then.....??
    Perhaps there is a fault with the keyboard itself rather than the program.
    David

  • Strange behaviour: two servers on the same port

    Hi!
    I hope this is the right section for this post. I need help about a strange behaviour involving a ServerSocket.
    For my thesis I need to write a program that receives data from a pre-existing DSMS client, filters them and then sends them to a pre-existing DSMS server. And here is my problem: if I try to create a ServerSocket on the same port of the DSMS server, my program throws no exception, and the servers seem running on the same port. This is a behaviour that I'd like to avoid, but I cannot understand what the problem is. Can you help me?
    The source code of the DSMS server can be found here (it's written in C++): http://infolab.stanford.edu/stream/code/stream-0.6.0.tar.gz
    The source code of my server class, instead, is this one:
    import java.io.*;
    import java.net.*;
    public class ThreadGenerator {
         private ServerSocket server;
         public void connect(String servPort, String cHost, String cPort) {
              try {
                   server = new ServerSocket(servPort);
                   System.out.println("SERVER running on port "+servPort);
              } catch (BindException e) {
                   System.out.println("Address already in use!");
              } catch (Exception e) {
                   System.err.println(e);
              try {
                   while(true){
                        Socket client = server.accept();
                        StreamThread T = new StreamThread(client, cHost, cPort);
                        T.start();
              } catch (EOFException e) {
                   System.out.println("Server closed connection!");
              } catch (Exception e) {
                   System.err.println(e);
    }I'm programming on Mac OSX Tiger, with Java 1.5.0.
    Thanks in advance for your help.

    The problem is still happening to me, I tried in this very moment. The code I'm using is the one I posted, and the second server is the one that I linked. I don't think there's anything else to add.
    If you're sure that the problem is not in my code, then it means that it is in the linked server, which partially solves the problem. But I'd like to know, if it's possibile, if there is any other way to check if the port is already in use.

  • Strange behaviour - any ideas?

    Strange behaviour began when i was unable to open a new page in photoshop.
    The next day i was unable to print from word or photoshop or emails.
    However i could print from freehand and excel!
    I used disk 1 to verify and repair disk.
    this did not solve the problem as then when i tried to open Safari the toolbar opened but no window.
    I have reinstalled the operating system making an archive but this also has not had an effect.
    Any ideas on what to do next or should I just reinstall the operating system over the old one?
    many thanks 4 any help

    Sarah, to help the knowlegable users here please advise which model G5 iMac you have & include this info in your system info preference by clicking on the "My Settings" link in the right hand column.-->
    This way, you won't have to keep repeating yourself and the knowlegable users will be able to provide you with the correct trouble shooting information/solutions if the problem is your computer.
    Also, it will be helpful if you will advise which version of Word, Photoshop you have, which email program & the type of printer you are using.
    Thank you.

  • Strange behaviour when placing text frame on top of image

    Hi,
    Win XP, FM 8.04
    I have a front cover that consists of a TIF image that bleeds off the page. On top of that image I want to put a text frame with the book title.
    The strange thing is that when I create the text frame and use the toolbar buttons to nudge it down on the page, the text (but not the frame) suddenly jumps to a totally different place way down on the page, despite only nudging it, say, 10 mm.
    Any ideas why this is happening?
    /Mats

    Hi,
    Partly solved:
    After some tests, it seems FM does not like when you try to move a text frame over a transparent area in an image. The image in question was made by importing a PDF into Photoshop, then saving as TIF. Since the PDF contained an area that was had full transparency in InDesign (i.e. "Paper"), that area was also in the TIF image.
    The strange behaviour starts exactly at the border where the transparency starts. In non-transparent areas, there is no problem.
    Seems like a bug.
    /Mats

  • Nokia C3-01 -strange behaviour/ problems with Noki...

    When I was choosing my new mobile, I had two options : Samsung Wave 533 and Nokia C3-01. After a lot of hesitance I decided to pick up Nokia, believing to its high quality despite its poor media potential. However, now I think that it was a bad idea.
          Firstly, I have never thought that Touch and Type won't have ability to adjust brightness of the screen (AWFUL IN THE NIGHT), set up more then one alarm and use many of JAVA applications. When I tried to install some applications, it said- out of memory. Out of memory?! My old SE K770i could much more! What annoys me the most is that I can't use my e-mail account via Nokia Mail. When I press the icon of it , there is an error Null pointer exception and  applications shuts. Other strange behaviour- while I was typing sms , suddenly there was hard, long vibration, screen  went white and mobile restarted. Other users of C3-01, check this: go to messages, then other messages , then direct , start typing and try to go back to menu- screen turns white, mobile restarts (I'm polish , so names may be a little bit different) . How on earth, can mobile restart so often?.
        , Secondly,the funniest one- Ovi shop. Important thing in every Nokia. Guess what- I can't use it! When I to launch the apllication and try to go to the shop, there is information that it's not avaible for my phone. I used it a week ago and worked properly.
          All in all, I hope that Nokia will share an update of software to this model. I am just so disappointed. What I am sure about that next mobile will not be from finnish enterprise.
    Solved!
    Go to Solution.

    Sorry Brother, Your Device is totally misfunctioned and FAULTY, You Need to go back to Nokia Care Centre and GET IT REPLACED.
    Your Device is faulty.
    Please Dont Blame Nokia Or the C3-01 Device Because both are QUALITY PRODUCTS.
    I have C3-01 Since 4 Months Now and I havent Had a Single Complain about my device even though I am a Rough Handler and Using the Mobile Upto its Extend.
    You Have 2 options, Try To Fix your Device at Home By :
    Soft reset your Nokia C3-01 Touch and Type you need to press *#7780# and then Dial. The security code is 12345. Once you complete this, your phone will come back to factory settings, but you will not loose personal data. Anyway it is recommended to make a backup before performing any of the mentioned procedures.
    To hard reset your Nokia C3-01 Touch and Type you just have to press *#7370# and press Dial. The phone will request the security code that is by default 12345. Please be aware that you will loose all the data in your phone, so you should backup all relevant information.
    If Problem still persist then Connect to PC Suite/Ovi Suite and Reinstall the Firmware.
    BUT U NEED YOUR DEVICE TO BE UPDATED TO ITS LATEST FIRMWARE = v06.05
    If still not fixed then, REPLACE YOUR DEVICE ASAP, because as given by Nokia, C3-01 Device Works according to its Specification as Specified.
    If I've helped in any way, a click upon the White star to the left would always be appreciated.
    If however my answer also solves your problem clicking below " ACCEPT AS SOLUTION " it will benefit other users!

  • Strange behaviour on reading procfs

    Hello,
    I have a strange behaviour reading process table from procfs. Some processes have a resident size and image size of 0 (zero). So I wrote a little test program and generated a 32bit binary. It gave me the same result. After I made a 64bit binary and this brought the expected results. Do anyone of you have an idea what i'm making wrong. Below you can find an output example and the code of the program.
    Every answer is appreciated
    erinda
    pfs.s32pid name nlwp %cpu %mem image resident
    1 init 1 0.00 0.03 2368 1184
    7 svc.startd 13 0.01 0.04 8696 1720
    649 snmpd 1 0.00 0.08 0 0
    24151 oracle 11 0.00 7.01 0 0
    pfs.s64pid name nlwp %cpu %mem image resident
    1 init 1 0.00 0.03 2368 1184
    7 svc.startd 13 0.01 0.04 8696 1720
    649 snmpd 1 0.00 0.08 9352 3440
    24151 oracle 11 0.00 7.01 330240 286664
    and here the program
    int main(int ac, char * av[])
    struct dirent * procEntry;
    char prcPath[PRARGSZ];
    psinfo_t prcInfo;
    pid_t pid;
    int rtc;
    DIR * procDir = opendir("/proc");
    if(procDir == NULL)
    printf("opendir(/proc) failed\n");
    return 1;
    printf(" pid name nlwp %%cpu %%mem image resident\n");
    printf("----------------------------------------------------------\n");
    rewinddir(procDir);
    while(procEntry = readdir(procDir))
    if(procEntry->d_name[0] == '.' || // skip "." and ".."
    procEntry->d_name[0] == '\0') // skip empty name
    continue;
    pid = atoi(procEntry->d_name);
    if(pid == 0 || pid == 2 || pid == 3)
    continue;
    size_t size = sizeof(psinfo_t);
    sprintf (prcPath, "/proc/%s/psinfo", procEntry->d_name);
    int pprocfs = open(prcPath, O_RDONLY);
    if (pprocfs < 0)
    return 2;
    else
    ssize_t bytesRead = read(pprocfs, &prcInfo, size);
    if (bytesRead != size)
    return 3;
    close (pprocfs);
    printf(" %5d %-15s %4d %5.2f %5.2f %8lu %8lu\n",
    prcInfo.pr_pid,
    prcInfo.pr_fname,
    prcInfo.pr_nlwp,
    (float)(100.0 * prcInfo.pr_pctcpu / 0x8000),
    (float)(100.0 * prcInfo.pr_pctmem / 0x8000),
    (ulong_t)prcInfo.pr_size,
    (ulong_t)prcInfo.pr_rssize);
    }

    Hello.
    If a 32 bit process reads from /proc different structures are returned as if a 64 bit process reads the same files.
    In the OpenSolaris sources this can be seen in http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/proc/prvnops.c#2600 (line 2600).
    Unfortunately a 32 bit task cannot get all information about a 64 bit task - at least not in current Solaris version. I think this is a problem to be solved by Sun...
    Martin
    If anyone from Sun involved in the development of the procfs reads this: My proposal is:
    /proc/xxx/psinfo32 and psinfo64 and a symlink psinfo. The symlink's destination depends on the reading processes data model....
    (The same should be done with all files (lwpinfo...) in /proc).
    Another idea is a special IOCTL that controls if a 32 bit task wants to access the 64 bit structures...

  • RE: Strange behaviour by OSX Mail in Yosemite

    Strange behaviour by OSX Mail in Yosemite
    I sent an email to a friend with pix and a pdf attachment from my gmail account
    I had to ffwd the same email to someone else. I press the ffwd button and type in my new friends address
    Strangely mail sends it to both of them (ie the first and the 2nd friend) despite me removing all Forward comments and email address of my first friend from the address bar and the content field
    This is new!
    Couldn't find help on this anywhere

    The SMPT server keeps changing for email accounts,
    Try Mail/Preferences/Accounts /Account Information. Select an account, then go to Outgoing Mail Server (SMTP). From the drop down menu select Edit SMPT server list. Then set up a server for each mail account so that is associated with the e-mail address. Then go to each account and set that server as the Outgoing Mail Server (SMPT). You can click Use only this server if desired.
    You can also try this.
    Do a backup.
    Quit Mail.
    Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Go to Library/Containers/com.apple.mail.  Move the folder com.apple.mail to your desktop. You must move the entire folder, not just the contents.
    Restart, re-launch Mail and test. If the problem is solved, recreate any required Mail settings and import any emails you want to save from the folder on the desktop. You can then put the folder in the Trash. If the problem remains, return the folder to where you got it replacing the one that is there. 
    Information learned from Linc Davis. Thanks to leonie for some information contained in this.

  • A strange behaviour throwing Threads via anonymous class technique

    Hi friends!
    I've noted a strange behaviour executing the next code:
    public class ResolAnonimes
         private int value;
         public ResolAnonimes(int value)
              this.value = value;
         public ResolAnonimes myMethod(int nThreads)
              final ResolAnonimes a = this;
              int nThreadsFor = nThreads - 1;
              for( int i=0; i < nThreadsFor; i++)
                   new Thread(){
                        public void run()
                                System.out.println(Thread.currentThread().getName() + " has begun processing");
                                     doSomethingWith(a);
                                System.out.println(Thread.currentThread().getName() + " has finished processing");
                   }.start();
                   this.value++;
              }//for loop
              return a;
         public static void doSomethingWith(ResolAnonimes a)
              System.out.println(a.value);
         public static void main(String Args[])
              ResolAnonimes first = new ResolAnonimes(1);
              ResolAnonimes result = first.myMethod(5);
    }When I execute it, that's the output I get:
    Thread-0 has begun processing
    2
    Thread-0 has finished processing
    Thread-0 has begun processing
    3
    Thread-0 has finished processing
    Thread-0 has begun processing
    4
    Thread-0 has finished processing
    Thread-0 has begun processing
    5
    Thread-0 has finished processingWhere's the "1" printed? It doesn't appear! It seems it has thrown only 4 threads, not 5.
    Am I doing anything wrong? Is it a bug?
    Can you help me, please?
    Thank you in advance.

    Oh I'm sorry. I was changing the code because of privacy rerasons and I finally didn't type what I want.
    Consider an array which all cells must be typed with the array lentgh. Moreover, the work is distributed by some threads.
    I'm refering to something like this:
    import java.util.Random;
    import java.util.LinkedList;
    public class MyArray
         private static int initialRow = 0;
         private static int lastRow = 0;
         private int[] vector;
         public MyArray(int size)
              vector = new int[size];
         public static boolean correctIndex(MyArray a )
              for(int i = 0; i< a.vector.length; i++)
                   if(a.vector[i] != a.vector.length)
                        return false;
              return true;
         public String toString()
              String s ="";
              for(int i=0; i < this.vector.length; i++)
                   s += this.vector[i] + " ";
              return s;
         public MyArray  operationWith(int nThreads)
              MyArray a = this;
              MyArray result = null;
              final Contenidor ctros = new Contenidor(new LinkedList());
              result = a.putTheIndexValue(nThreads, ctros);
              Thread consumerThread = new Thread( new Consumer( ctros, nThreads));
              consumerThread.start();
              try
                   consumerThread.join();
              catch(InterruptedException ie){}
              return result;
         public MyArray putTheIndexValue(int nThreads, Contenidor ctros) //Este metode encara es experimental
              final MyArray a = this;
              final MyArray result = new MyArray( a.vector.length);
              final Contenidor ctrosR = ctros;
              for(int i = 0; i < result.vector.length; i++)
                        result.vector= 0;
              int incRows = a.vector.length / nThreads - 1;
              initialRow = 0;
              lastRow= incRows;
              int nFilsFor = nThreads - 1;
              Thread[] vectorFils = new Thread[nThreads];
              for( int i=0; i < nFilsFor; i++)
                   /*vectorFils[i] = */ new Thread()
                                                 public void run()
                                                      System.out.println(Thread.currentThread().getName() + " has begun processing");
                                                      MyArray.putTheIndexValue( a, initialRow, lastRow);
                                                      System.out.println(Thread.currentThread().getName() + " has finished processing");
                                                      String s = Thread.currentThread().getName();
                                                      ctrosR.put(s);                         
                   vectorFils[i]*/.start();
                   initialRow = initialRow + 1;
                   lastRow = initialRow + incRows;
              new Thread()
                   public void run()
                        System.out.println(Thread.currentThread().getName() + " has begun processing");
                        MyArray.putTheIndexValue( a, initialRow, a.vector.length - 1);
                        System.out.println(Thread.currentThread().getName() + " has finished processing");
                        String s = Thread.currentThread().getName();
                        ctrosR.put(s);                         
                   vectorFils[i]*/.start();
              return result;
         public static void putTheIndexValue( MyArray a, int initialRow, int lastRow)
              for(int i = initialRow; i <= lastRow; i++)
                   a.vector[i] = a.vector.length;
    public class Interface
         public static void main(String Args[])
              int nThreads = 2;
              int arraySize = 5;
              MyArray ma = new MyArray(arraySize);
              MyArray result = ma.operationWith(nThreads);
              if(MyArray.correctIndex(result))
                   System.out.println("The operation has been done correctly");
              else
                   System.out.println("THE OPERATION HAS NOT BEEN CORRECTLY!");
              System.out.println(ma.toString());
    public class Consumer implements Runnable
         private Contenidor ctros;
         private int nFils;
         public Consumer(Contenidor ctros, int nFils)
              this.ctros = ctros;
              this.nFils = nFils;
         public void run()
              System.out.println(Thread.currentThread().getName() + "is waiting the total process to be finished");
              for(int i = 0; i< nFils; i++)
                      System.out.println( Thread.currentThread() + " is waiting a thread to give me its chunk");
                      String s = ctros.get();
                      System.out.println( Thread.currentThread() + ":  " + s + " has already given me its chunk");
                 System.out.println(Thread.currentThread().getName() + "says all threads have finished");
    import java.util.Queue;
    import java.util.LinkedList;
    public class Contenidor
        private int nDadesNoves;
        private Queue contenidor;
        public Contenidor(Queue contenidor)
            this.contenidor = contenidor;
            this.nDadesNoves = 0;
        public synchronized String get()
            while(nDadesNoves < 1)
                try
                    wait();
                catch(InterruptedException ie){}
            nDadesNoves--;
            notifyAll();
            return (String)contenidor.poll();
        public synchronized void put(String s)
            contenidor.offer(s);
            nDadesNoves++;
            notifyAll();
    }The output I get sometimes is:
    THE OPERATION HAS NOT BEEN CORRECTLY!
    5 5 5 5 5And I get also sometimes that:
    THE OPERATION HAS NOT BEEN CORRECTLY!
    0 5 5 5 5That's what I wanted to refer last post. I think I'm doing a correct synchronization. Am I wrong?
    I don't understand that behaviour.
    Anyone can help me, please?
    Thank you in advance.

Maybe you are looking for

  • How to create multiple output files using TrAX?

    I am new in this field. I'm trying to create multiple xml output files using TrAX. I have to parse a xml source file and output it to multiple xml files. My problem is that it only creates one output file and puts all the parsed data there. When i us

  • Need help in user exits

    Hi,   I am working on purchase req. enhancement,i developed a subscreen at item level with 9 fields. the screen is coming properly.when i enter data, i have to store this data in eban table. for this i append a str with those fields.How can i update

  • How do I get my Adobe Digital book read out loud.

    I am disabled and need to use text to speech. I purchased an ebook which is an Adobe Digital Edition. I have really enjoyed using Adobe Reader with the Read Out Loud feature and was shocked when I discovered I could not use this feature on the Digita

  • Exception in thread "main" java.lang.noclassdeffounderror: client

    Hey, I just download a game and it's java based but when I try to run it run it just opens a cmd and tells me this: exception in thread "main" java.lang.noclassdeffounderror: client Caused by: java.lang.noclassdeffounderror: client ... And some other

  • Load Balance method for proxy - ISA or BlueCoat

    Hi, I would like to know that which load balance method such as src-ip, cookie or etc is most suitable for load balancing proxy servers such as ISA or Bluecoat. The Proxy will listen to many services - http, https, ftp, and etc. Thanks for the help.