Suspends only every second time when lid closed

Hello everybody, my problem is as the  subject: to suspend I have to close usually the laptop lid twice.
I'm using kde, but I have also used years ago fluxbox, tweaking scripts and using laptop-mode (which is not running now). Thanks in advance for every idea where to look.
/etc/acpi$ cat handler.sh
#!/bin/sh
# Default acpi script that takes an entry for all actions
minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
set $*
case "$1" in
button/power)
case "$2" in
PBTN|PWRF)
logger "PowerButton pressed: $2"
poweroff
logger "ACPI action undefined: $2"
esac
button/sleep)
case "$2" in
SLPB|SBTN)
echo -n mem >/sys/power/state
logger "ACPI action undefined: $2"
esac
ac_adapter)
case "$2" in
AC|ACAD|ADP0)
case "$4" in
00000000)
echo -n $minspeed >$setspeed
#/etc/laptop-mode/laptop-mode start
00000001)
echo -n $maxspeed >$setspeed
#/etc/laptop-mode/laptop-mode stop
esac
logger "ACPI action undefined: $2"
esac
battery)
case "$2" in
BAT0)
case "$4" in
00000000)
logger 'Battery online'
00000001)
logger 'Battery offline'
esac
CPU0)
*) logger "ACPI action undefined: $2" ;;
esac
button/lid)
case "$3" in
close)
logger 'LID closed'
open)
logger 'LID opened'
logger "ACPI action undefined: $3"
esac
logger "ACPI group/action undefined: $1 / $2"
esac
# vim:set ts=4 sw=4 ft=sh et:

I actually do not understand who comands at the end - this handler.sh or the settings in Kde-powermanaging, I guess it's the second, I did remove the actions for suspend on lid close time ago. I made a test now, when I change handler.sh and check "do nothing when lid close" in kde powersettings happens exact the same: performs suspend every second time only.
button/lid)
case "$3" in
close)
logger 'LID closed'
/usr/sbin/pm-suspend
open)
logger 'LID opened'
logger "ACPI action undefined: $3"
esac
Last edited by steff (2012-07-21 17:08:46)

Similar Messages

  • ToolBoxTools.addEventListener only works every second time

    Hi!
    Our layouts pretty often click on the "page tool" by mistake and it happened a few times, that they changes the size of the page without even noticing. Because there is no way to remove the tool from the toolbar (I guess?), I wanted to write a script, that at least shows a message, that the page tool ("Seitenwerkzeug" in german) was selected. Unfortunately the event listener only works every second time:
    1. indesign starts > selection tool is active
    2. click on page tool > message appears > page tool is active
    3. click on "another tool1" > "another tool1" is active
    4. click on "another tool2" > "another tool1" is active
    5. click on page tool > nothing happens, the icon of the page tool is active, but the icon of the "another tool2" is still active, too, and "another tool2" is still activated
    6. click on "another tool3" > "another tool3" is active
    7. click on page tool > message appears > page tool is active
    8. ......
    Any idea why that is?
    My script:
    #targetengine myToolListener
    app.toolBoxTools.addEventListener ("afterAttributeChanged", changeToolAlert);
    function changeToolAlert() {
        if(app.toolBoxTools.currentToolName == "Seitenwerkzeug") {
            alert ("Message", "Title");
        exit(); //i tried with and without this!
    At the beginning I tried to use an confirm message instead of an alert, which had the same problem and I thought it might be because the changing doesn't work... but it seems I can't even work with the information without something "crashing" in the background?
    My previous confirm Function:
    function changeToolConfirm() {
        if(app.toolBoxTools.currentToolName == "Seitenwerkzeug") {
            var confirmDialog = confirm("Do you really want to activate the page tool?", true);
            if(!confirmDialog) {
                app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;
    I really hope someone has an idea
    Best,
    Anke

    Hi Anke,
    The problem, I think, comes from the fact that the Page Tool selection event (which you listen to via afterAttributeChanged) needs some time to complete. Since the alert() or confirm() instruction gives the focus to a new modal window before the event life-cycle is finished, the GUI becomes instable, the PageTool icon state is not properly restored, and your event management goes wrong.
    A way to solve this might be to queue a temporary IdleEvent listener once the Page Tool selection event is caught. That is, we do not initiate any modal dialog as long as the GUI is refreshing.
    Something like this:
    //====================================================
    // PageToolDisclaimer.jsx
    //====================================================
    // Should be useable as a startup script, no #targetengine required
    // NB - MutationEvent is known to create a global 'evt' variable
    // so we don't seem to need a persistent session engine here :-)
    // That's why the active script File is used as the event handler
    (function(/*File*/EVENT_HANDLER, /*str*/TASK_NAME, /*uint*/TASK_TIME, /*str*/PAGE_TOOL_NAME)
        var t;
        // Installer
        if( !(t=app.toolBoxTools.eventListeners).length )
            t.add(MutationEvent.AFTER_ATTRIBUTE_CHANGED, EVENT_HANDLER);
            return;
        // IdleEvent handler (--> confirm)
        if( (t=app.idleTasks.itemByName(TASK_NAME)).isValid )
            t.eventListeners.everyItem().remove();
            t.remove();
            if( !confirm("***WARNING***\rDo you really want to activate the page tool?", true) )
                app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;
            return;
        // PageTool event handler
        if( ('evt' in $.global) && 'currentToolName'==evt.attributeName && PAGE_TOOL_NAME==evt.attributeValue )
            evt.stopPropagation();
            app.idleTasks.add({name:TASK_NAME, sleep:TASK_TIME})
                  .addEventListener(IdleEvent.ON_IDLE, EVENT_HANDLER);
    })(app.activeScript, 'WaitPageTool', 400, app.translateKeyString('$ID/Page Tool'));
    Hope that helps.
    @+
    Marc

  • Hi everybody, I am in Turkey on a long assignment, I need help solving a big problem on my macbook pro os 10.9.3. The other week my wife visited some website and now we have a redirect virus of some sort, and every other time when we click

    Hi everybody, I am in Turkey on a long assignment, I need help solving a big problem on my macbook pro os 10.9.3. The other week my wife visited some website and now we have a redirect virus of some sort, and every other time when we click on a link or anywhere on the page we are redirected to this casino web site, https://casino.7bets10.com/tr/?from=hy9yKXD43jSC-8Oxbw4femNd7ZgqdRLk-dHJpeG9uaXR l. Its the same whether on Chrome or Safari. Does anyone have a solution, thank you!

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.
    Don't be put off merely by the seeming complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. All it does is to collect information about the state of the computer. That information goes nowhere unless you choose to share it. However, you should be cautious about running any kind of program (not just a shell script) at the behest of a stranger. If you have doubts, search this site for other discussions in which this procedure has been followed without any report of ill effects. If you can't satisfy yourself that the instructions are safe, don't follow them. Ask for other options.
    Here's a summary of what you need to do, if you choose to proceed:
    Copy a line of text in this window to the Clipboard.
    Paste into the window of another application.
    Wait for the test to run. It usually takes a few minutes.
    Paste the results, which will have been copied automatically, back into a reply on this page.
    The sequence is: copy, paste, wait, paste again. You don't need to copy a second time. Details follow.
    4. You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode, under the conditions in which the problem is reproduced. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    5. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.
    6. The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, though you may not see all of it in the browser window, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.
    Triple-click anywhere in the line of text below on this page to select it:
    PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/libexec;clear;cd;p=(Software Hardware Memory Diagnostics Power FireWire Thunderbolt USB Fonts 51 4 1000 25 5120 KiB/s 1024 85 \\b%% 20480 1 MB/s 25000 ports ' \*AutoCad \*dropbox \*GoogleDr\* vidinst\* ' DYLD_INSERT_LIBRARIES\ DYLD_LIBRARY_PATH -86 ` route -n get default|awk '/e:/{print $2}' ` 25 N\\/A down up 102400 25600 recvfrom sendto CFBundleIdentifier 25 25 25 1000 MB com.apple.AirPortBaseStationAgent 464843899 );N5=${#p[@]};p[N5]=` networksetup -listnetworkserviceorder|awk ' NR>1 { sub(/^\([0-9]+\) /,"");n=$0;getline;} $NF=="'${p[26]}')" { sub(/.$/,"",$NF);print n;exit;} ' `;f=('\n%s: %s\n' '\n%s\n\n%s\n' '\nRAM details\n%s\n' %s\ %s '%s\n-\t%s\n' );S0() { echo ' { q=$NF+0;$NF="";u=$(NF-1);$(NF-1)="";gsub(/^ +| +$/,"");if(q>='${p[$1]}') printf("%s (UID %s) is using %s '${p[$2]}'",$0,u,q);} ';};s=(' /^ *$|CSConfigDot/d;s/^ */  /;s/[-0-9A-Fa-f]{22,}/UUID/g;s/(ochat)\.[^.]+(\..+)/\1\2/;/Shared/!s/\/Users\/[^/]+/~/g ' ' s/^ +//;5p;6p;8p;12p;' ' {sub(/^ +/,"")};NR==6;NR==13&&$2<'${p[10]} ' 1s/://;3,6d;/[my].+:/d;s/^ {4}//;H;${ g;s/\n$//;/s: [^EO]|x([^08]|02[^F]|8[^0])/p;} ' ' 5h;6{ H;g;/P/!p;} ' ' ($1~/^Cy/&&$3>'${p[11]}')||($1~/^Cond/&&$2!~/^N/) ' ' /:$/{ N;/:.+:/d;s/ *://;b0'$'\n'' };/^ *(V.+ [0N]|Man).+ /{ s/ 0x.... //;s/[()]//g;s/(.+: )(.+)/ (\2)/;H;};$b0'$'\n'' d;:0'$'\n'' x;s/\n\n//;/Apple[ ,]|Intel|SMSC/d;s/\n.*//;/\)$/p;' ' s/^.*C/C/;H;${ g;/No th|pms/!p;} ' '/= [^GO]/p' '{$1=""};1' ' /Of/!{ s/^.+is |\.//g;p;} ' ' $0&&!/ / { n++;print;} END { if(n<200) print "com.apple.";} ' ' $3~/[0-9]:[0-9]{2}$/ { gsub(/:[0-9:a-f]{14}/,"");} { print|"tail -n'${p[12]}'";} ' ' NR==2&&$4<='${p[13]}' { print $4;} ' ' END { $2/=256;if($2>='${p[15]}') print int($2) } ' ' NR!=13{next};{sub(/[+-]$/,"",$NF)};'"`S0 21 22`" 'NR!=2{next}'"`S0 37 17`" ' NR!=5||$8!~/[RW]/{next};{ $(NF-1)=$1;$NF=int($NF/10000000);for(i=1;i<=3;i++){$i="";$(NF-1-i)="";};};'"`S0 19 20`" 's:^:/:p' '/\.kext\/(Contents\/)?Info\.plist$/p' 's/^.{52}(.+) <.+/\1/p' ' /Launch[AD].+\.plist$/ { n++;print;} END { print "'${p[41]}'";if(n<200) print "/System/";} ' '/\.xpc\/(Contents\/)?Info\.plist$/p' ' NR>1&&!/0x|\.[0-9]+$|com\.apple\.launchctl\.(Aqua|Background|System)$|'${p[41]}'/ { print $3;} ' ' /\.(framew|lproj)|\):/d;/plist:|:.+(Mach|scrip)/s/:[^:]+//p ' '/root/p' ' !/\/Contents\/.+\/Contents|Applic|Autom|Frameworks/&&/Lib.+\/Info.plist$/ { n++;print;} END { if(n<1000) print "/System/";} ' '/^\/usr\/lib\/.+dylib$/p' ' /Temp|emac/ { next;} /(etc|Preferences|Launch[AD].+)\// { sub(".(/private)?","");n++;print;} END { print "'${p[41]}'.plist\t'${p[42]}'";if(n<500) print "Launch";} ' ' /\/(Contents\/.+\/Contents|Frameworks)\/|\.wdgt\/.+\.([bw]|plu)/d;p;' 's/\/(Contents\/)?Info.plist$//;p' ' { gsub("^| |\n","\\|\\|kMDItem'${p[35]}'=");sub("^...."," ") };1 ' p '{print $3"\t"$1}' 's/\'$'\t''.+//p' 's/1/On/p' '/Prox.+: [^0]/p' '$2>'${p[9]}'{$2=$2-1;print}' ' BEGIN { i="'${p[26]}'";M1='${p[16]}';M2='${p[18]}';M3='${p[31]}';M4='${p[32]}';} !/^A/ { next;} /%/ { getline;if($5<M1) a="user "$2"%, system "$4"%";} /disk0/&&$4>M2 { b=$3" ops/s, "$4" blocks/s";} $2==i { if(c) { d=$3+$4+$5+$6;next;};if($4>M3||$6>M4) c=int($4/1024)" in, "int($6/1024)" out";} END { if(a) print "CPU: "a;if(b) print "I/O: "b;if(c) print "Net: "c" (KiB/s)";if(d) print "Net errors: "d" packets/s";} ' ' /r\[0\] /&&$NF!~/^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./ { print $NF;exit;} ' ' !/^T/ { printf "(static)";exit;} ' '/apsd|OpenD/!s/:.+//p' ' (/k:/&&$3!~/(255\.){3}0/ )||(/v6:/&&$2!~/A/ ) ' ' $1~"lR"&&$2<='${p[25]}';$1~"li"&&$3!~"wpa2";' ' BEGIN { FS=":";} { n=split($3,a,".");sub(/_2[01].+/,"",$3);print $2" "$3" "a[n]" "$1;b=b$1;} END { if(b) print("\n\t* Code injection");} ' ' NR!=4{next} {$NF/=10240} '"`S0 27 14`" ' END { if($3~/[0-9]/)print$3;} ' ' BEGIN { L='${p[36]}';} !/^[[:space:]]*(#.*)?$/ { l++;if(l<=L) f=f"\n  "$0;} END { F=FILENAME;if(!F) exit;if(!f) f="\n  [N/A]";"file -b "F|getline T;if(T!~/^(AS.+ (En.+ )?text$|POSIX sh.+ text ex)/) F=F" ("T")";printf("\nContents of %s\n%s\n",F,f);if(l>L) printf("\n  ...and %s more line(s)\n",l-L);} ' ' /^ +[NP].+ =/h;/^( +D.+[{]|[}])/{ g;s/.+= //p;};' ' /^ +B/{ s/.+= |(-[0-9]+)?\.s.+//g;p;} ' ' END{print NR} ' ' /id: N|te: Y/{i++} END{print i} ' ' / / { print "'"${p[28]}"'";exit;};1;' '/ en/!s/\.//p' ' NR!=13{next};{sub(/[+-M]$/,"",$NF)};'"`S0 39 40`" ' $10~/\(L/&&$9!~"localhost" { sub(/.+:/,"",$9);print $1": "$9;} ' '/^ +r/s/.+"(.+)".+/\1/p' 's/(.+\.wdgt)\/(Contents\/)?Info\.plist$/\1/p' 's/^.+\/(.+)\.wdgt$/\1/p' 's/0/Off/p' );c1=(system_profiler pmset\ -g nvram fdesetup find syslog df vm_stat sar ps sudo\ crontab sudo\ iotop top pkgutil PlistBuddy whoami cksum kextstat launchctl sudo\ launchctl crontab 'sudo defaults read' stat lsbom mdfind ' for i in ${p[24]};do ${c1[18]} ${c2[27]} $i;done;' defaults\ read scutil sudo\ dtrace sudo\ profiles sed\ -En awk /S*/*/P*/*/*/C*/*/airport networksetup mdutil sudo\ lsof test );c2=(com.apple.loginwindow\ LoginHook '-c Print /L*/P*/loginw*' '-c Print L*/P*/*loginit*' '-c Print L*/Saf*/*/E*.plist' '~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \)' '.??* -path .Trash -prune -o -type d -name *.app -print -prune' '-c Print\ :'${p[35]}' 2>&1' '-c Print\ :Label 2>&1' '{/,}L*/{Con,Pref}* -type f ! -size 0 -name *.plist -exec plutil -s {} \;' "-f'%N: %l' Desktop L*/Keyc*" therm sysload boot-args status " -F '\$Time \$Message' -k Sender kernel -k Message Req 'bad |Beac|caug|dead[^bl]|FAIL|fail|GPU |hfs: Ru|inval|jnl:|last value [1-9]|n Cause: -|NVDA\(|pagin|proc: t|Roamed|rror|ssert|Thrott|tim(ed? ?|ing )o|WARN' -k Message Rne 'Goog|ksadm|SMC:' -o -k Sender fseventsd -k Message Req 'SL' " '-du -n DEV -n EDEV 1 10' 'acrx -o comm,ruid,%cpu' '-t1 10 1' '-f -pfc /var/db/r*/com.apple.*.{BS,Bas,Es,J,OSXU,Rem,up}*.bom' '{/,}L*/Lo*/Diag* -type f -regex .\*[cgh] ! -name *ag \( -exec grep -lq "^Thread c" {} \; -exec printf \* \; -o -true \) -execdir stat -f:%Sc:%N -t%F {} \;|sort -t: -k2 |tail -n'${p[38]} '-L {/{S*/,},}L*/Lau* -type f' '-L /{S*/,}L*/StartupItems -type f -exec file {} +' '-L /S*/L*/{C*/Sec*A,E}* {/,}L*/{A*d,Ca*/*/Ex,Compon,Ex,In,iTu,Keyb,Mail/B,P*P,Qu*T,Scripti,Sec,Servi,Spo,Widg}* -type f -name Info.plist' '/usr/lib -type f -name *.dylib' `awk "${s[31]}"<<<${p[23]}` "/e*/{auto,{cron,fs}tab,hosts,{[lp],sy}*.conf,pam.d/*,ssh{,d}_config,*.local} {,/usr/local}/etc/periodic/*/* /L*/P*{,/*}/com.a*.{Bo,sec*.ap}*t /S*/L*/Lau*/*t .launchd.conf" list getenv /Library/Preferences/com.apple.alf\ globalstate --proxy '-n get default' -I --dns -getdnsservers\ "${p[N5]}" -getinfo\ "${p[N5]}" -P -m\ / '' -n1 '-R -l1 -n1 -o prt -stats command,uid,prt' '--regexp --only-files --files com.apple.pkg.*|sort|uniq' -kl -l -s\ / '-R -l1 -n1 -o mem -stats command,uid,mem' -i4TCP:0-1023 com.apple.dashboard\ layer-gadgets '-d /L*/Mana*/$USER&&echo On' '-app Safari WebKitDNSPrefetchingEnabled' );N1=${#c2[@]};for j in {0..8};do c2[N1+j]=SP${p[j]}DataType;done;N2=${#c2[@]};for j in 0 1;do c2[N2+j]="-n ' syscall::'${p[33+j]}':return { @out[execname,uid]=sum(arg0) } tick-10sec { trunc(@out,1);exit(0);} '";done;l=(Restricted\ files Hidden\ apps 'Elapsed time (s)' POST Battery Safari\ extensions Bad\ plists 'High file counts' User Heat System\ load boot\ args FileVault Diagnostic\ reports Log 'Free space (MiB)' 'Swap (MiB)' Activity 'CPU per process' Login\ hook 'I/O per process' Mach\ ports kexts Daemons Agents launchd Startup\ items Admin\ access Root\ access Bundles dylibs Apps Font\ issues Inserted\ dylibs Firewall Proxies DNS TCP/IP Wi-Fi Profiles Root\ crontab User\ crontab 'Global login items' 'User login items' Spotlight Memory Listeners Widgets Parental\ Controls Prefetching );N3=${#l[@]};for i in 0 1 2;do l[N3+i]=${p[5+i]};done;N4=${#l[@]};for j in 0 1;do l[N4+j]="Current ${p[29+j]}stream data";done;A0() { id -G|grep -qw 80;v[1]=$?;((v[1]==0))&&sudo true;v[2]=$?;v[3]=`date +%s`;clear >&-;date '+Start time: %T %D%n';};for i in 0 1;do eval ' A'$((1+i))'() { v=` eval "${c1[$1]} ${c2[$2]}"|'${c1[30+i]}' "${s[$3]}" `;[[ "$v" ]];};A'$((3+i))'() { v=` while read i;do [[ "$i" ]]&&eval "${c1[$1]} ${c2[$2]}" \"$i\"|'${c1[30+i]}' "${s[$3]}";done<<<"${v[$4]}" `;[[ "$v" ]];};A'$((5+i))'() { v=` while read i;do '${c1[30+i]}' "${s[$1]}" "$i";done<<<"${v[$2]}" `;[[ "$v" ]];};';done;A7(){ v=$((`date +%s`-v[3]));};B2(){ v[$1]="$v";};for i in 0 1;do eval ' B'$i'() { v=;((v['$((i+1))']==0))||{ v=No;false;};};B'$((3+i))'() { v[$2]=`'${c1[30+i]}' "${s[$3]}"<<<"${v[$1]}"`;} ';done;B5(){ v[$1]="${v[$1]}"$'\n'"${v[$2]}";};B6() { v=` paste -d: <(printf "${v[$1]}") <(printf "${v[$2]}")|awk -F: ' {printf("'"${f[$3]}"'",$1,$2)} ' `;};B7(){ v=`grep -Fv "${v[$1]}"<<<"$v"`;};C0(){ [[ "$v" ]]&&echo "$v";};C1() { [[ "$v" ]]&&printf "${f[$1]}" "${l[$2]}" "$v";};C2() { v=`echo $v`;[[ "$v" != 0 ]]&&C1 0 $1;};C3() { v=`sed -E "$s"<<<"$v"`&&C1 1 $1;};for i in 1 2;do for j in 2 3;do eval D$i$j'(){ A'$i' $1 $2 $3; C'$j' $4;};';done;done;{ A0;A2 0 $((N1+1)) 2;C0;A1 0 $N1 1;C0;B0;C2 27;B0&&! B1&&C2 28;D12 15 37 25 8;A1 0 $((N1+2)) 3;C0;D13 0 $((N1+3)) 4 3;D23 0 $((N1+4)) 5 4;for i in 0 1 2;do D13 0 $((N1+5+i)) 6 $((N3+i));done;D13 1 10 7 9;D13 1 11 8 10;D22 2 12 9 11;D12 3 13 10 12;D23 4 19 44 13;D23 5 14 12 14;D22 6 36 13 15;D22 7 37 14 16;D23 8 15 38 17;D22 9 16 16 18;B1&&{ D22 11 17 17 20;for i in 0 1;do D22 28 $((N2+i)) 45 $((N4+i));done;};D22 12 44 54 45;D22 12 39 15 21;A1 13 40 18;B2 4;B3 4 0 19;A3 14 6 32 0;B4 0 5 11;A1 17 41 20;B7 5;C3 22;B4 4 6 21;A3 14 7 32 6;B4 0 7 11;B3 4 0 22;A3 14 6 32 0;B4 0 8 11;B5 7 8;B1&&{ A2 19 26 23;B7 7;C3 23;};A2 18 26 23;B7 7;C3 24;A2 4 20 21;B7 6;B2 9;A4 14 7 52 9;B2 10;B6 9 10 4;C3 25;D13 4 21 24 26;B4 4 12 26;B3 4 13 27;A1 4 22 29;B7 12;B2 14;A4 14 6 52 14;B2 15;B6 14 15 4;B3 0 0 30;C3 29;A1 4 23 27;B7 13;C3 30;D13 24 24 32 31;D13 25 37 32 33;A2 23 18 28;B2 16;A2 16 25 33;B7 16;B3 0 0 34;B2 21;A6 47 21&&C0;B1&&{ D13 21 0 32 19;D13 10 42 32 40;D22 29 35 46 39;};D13 14 1 48 42;D12 34 43 53 44;D22 0 $((N1+8)) 51 32;D13 4 8 41 6;D12 26 28 35 34;D13 27 29 36 35;A2 27 32 39&&{ B2 19;A2 33 33 40;B2 20;B6 19 20 3;};C2 36;D23 33 34 42 37;B1&&D23 35 45 55 46;D23 32 31 43 38;D12 36 47 32 48;D13 20 42 32 41;D13 14 2 48 43;D13 4 5 32 1;D22 4 4 50 0;D13 14 3 49 5;D12 26 48 59 49;B3 4 22 57;A1 26 46 56;B7 22;B3 0 0 58;C3 47;D23 22 9 37 7;A7;C2 2;} 2>/dev/null|pbcopy;exit 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    7. Launch the built-in Terminal application in any of the following ways:
    Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Click anywhere in the Terminal window and paste by pressing command-V. The text you pasted should vanish immediately. If it doesn't, press the return key.
    8. If you see an error message in the Terminal window such as "syntax error," enter
    exec bash
    and press return. Then paste the script again.
    9. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important. If you don't know the password, or if you prefer not to enter it, press the key combination control-C or just press return three times at the password prompt. Again, the script will still run.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.
    10. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, there will be nothing in the Terminal window and no indication of progress. Wait for the line
    [Process completed]
    to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report the results. No harm will be done.
    11. When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    At the top of the results, there will be a line that begins with the words "Start Time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    12. When you post the results, you might see the message, "You have included content in your post that is not permitted." It means that the forum software has misidentified something in the post as a violation of the rules. If that happens, please post the test results on Pastebin, then post a link here to the page you created.
    Note: This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.
    Copyright © 2014 by Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • REGEXP_REPLACE issue/bug - replaces only every second occurence

    Hi All
    I am using
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    I need a regular expression to rename a variable in a mathematical formula, when testing my code I discovered that if the variable was repeated right after itself only one occurence was replaced. I need to only replace whole words as some variables can be a subset of a longer variable name, and variable names can have underscores in them.
    Below is an example of what happens.
    Can someone please tell me why this happens? Example code is:
    SELECT REGEXP_REPLACE('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab', '(\W|^)ab(\W|$)' , '\1xy\2',1,0,'i') from DUAL;
    The regular expression matches all 'ab' with a non alpha character or beginning line before and a non alpha or end of line at the end.
    I then replace the 'ab' with 'xy' and keep the original non alpha on either side. What happens is that only every second occurence is replaced.
    If I place a space after every '+' then it replaces all occurences. (Obviously this is a user field in a table of mathematical formulas so I cannot expect the user to worry about this problem.)
    I believe it may be due to the fact the pointer in finding all occurence is moved incorrectly and it does not find the match immediately after.
    Can someone please explain this? Or am I missing something in my example.
    Thanks
    Dudley

    Is this what you require? I changed your query a bit.
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(\W|^)ab(\W|$)',
      3                         '\1xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+ab+xy+ab+xy+ab+xy+abc+abc+xy
    1 row selected.
    SQL>
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+xy+xy+xy+xy+xy+xy+abc+abc+xy
    1 row selected.
    SQL> -- checking data with white spaces
    SQL> SELECT REGEXP_REPLACE ('ab + ab + ab + ab + ab + ab + ab + abc + abc + ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+AB+AB+ABC+ABC+AB',
    xy + xy + xy + xy + xy + xy + xy + abc + abc + xy
    1 row selected.
    SQL> Regards,
    Jo

  • Anyone having Bluetooth syncing issues w VW Tiquan11... and iPhone4? Essentially the pairing craps out every other time when you connect to the cars bluetooth. Requires rebooting iPhone, power off/on and then connects..

    Anyone having Bluetooth syncing issues w VW Tiquan11... and iPhone4? Essentially the pairing craps out every other time when you connect to the cars bluetooth. Requires rebooting iPhone, power off/on and then connects..

    Many people are finding their Iphone 4S drops connection with their VW (Passat etc) integrated bluetooth hands free system after working fine for 5, 10, 20 minutes. The only way to reconnect is to switch the car off or turn the Iphone bluetooth off & back on.
    This is a dangerous fault and it appears that both Apple & VW have no solution (or are ignoring as they have already sold you a phone & a car).
    iPhone 4S, iOS 5.1.1, VW bluetooth

  • My 3 year-old macbook pro is very slow. I have run disk utility and virus scan with no improvement. The "beach ball" will spin for minutes at a time when opening, closing or changing windows. Apple Store looked at it a few months ago with no help.

    my 3 year-old macbook pro is very slow. I have run disk utility and virus scan with no improvement. The "beach ball" will spin for minutes at a time when opening, closing or changing windows. Apple Store looked at it a few months ago with no help. What can I do?

    Under CPU: 3.5% user; 5% system; 91% idle; 441 threads; 90 processes.
    Under System: out of 2GB - 54.7MB free; 530MB wired; 603MB active; 862MB inactive; 1.95GB used.
    Is too much of the system memory tied up? If so, what can I do to free some up?

  • Fan still going when lid closed.

    I bought the MacBook Pro about 3 years ago. Never had problems with the fan until now.
    Normally, I never do anything major on the MacBook, just browsing and editing photos. So the fan hardly gets used during me using it. But the weirdest thing happened lately when the fan start going when the lid is closed in sleep mode, and it really heats up hot at the bottom. This is with just Photoshop open and Internet. Nothing else running, plus the lid is closed. How is that possible? It don't even do that when I am using the MacBook, so how can it be when I am not.
    I also hear notification sounds when lid closed, which means it is not fully in sleep. I have rest PRM but still no good. Any ideas please? thanks guys!

    thanks, but it stopped for about a week, and it's doing it again. Today I left it for about an hour lid closed, came back to it, it was burning hot, couldn't even put my hands on the bottom why is it doing this?

  • I'm using tweetdeck to open links but after i update to 14.0.1 version, the window open or pop out every single time when I open the links, how can i do?

    I'm using tweetdeck to open links , I can click on tons of link I want to open without the firefox window pop up but after i update to 14.0.1 version, the window open or pop out every single time when I open the link, how can I just open the link but not the window?

    yesssssss , EXACTLY !!!! before the update ,whenever I open an external link, Tweetdeck used to stay in front, and now Firefox moves in front of Tweetdeck<<<< EXACTLY !!!

  • Photobooth crashes every single time when using Motu Hybrid MK3 audio interface?

    Photobooth crashes every single time when using Motu Hybrid MK3 audio interface.
    It is happening on my late 2013 IMAC, and also on my old 2011 Macbook pro.

    Same thing here with Mavericks and M-Audio Fast Track Ultra.  Very easy to reproduce, Apple. Set your audio interface for the external device, try to record Photo Booth video. It will crash. Every. Single. Time. Always.

  • Code only working second time round

    Hi all,
    got a weird one here and hoping someone can help me.
    Scenario is this...got some dynamically created textareas on
    the screen and details of each are stored in a datagrid. The user
    can select one from the datagrid (dg_elements) and then change
    certain params for it, namely xy coords, height, width, alpha
    background colour, border colour and border style. Each param is
    taken from various components on the stage, textinput,
    colorpickers, comboboxes etc
    I've a button called but_apply which has this listener...
    but_apply_lnr=new Object()
    but_apply_lnr.click=function()
    // the instance name of the textarea is stored in
    dg_elements.selectedItem.element_name
    inst = eval(dg_elements.selectedItem.element_name)
    inst._x = Number(elex.text)+40
    inst._y = Number(eley.text)+90
    inst.setSize(Number(elew.text),Number(eleh.text))
    inst.depthChild0._alpha=alpharange.value
    inst.backgroundColor=backcol.selectedItem
    inst.borderColor=bordercol.selectedItem
    inst.borderStyle=borderstyle.selectedItem.label
    but_apply.addEventListener("click",but_apply_lnr)
    So, if I amend the x,y, height width or alpha and click
    but_apply then the textarea updates accordingly...however, if I
    change the borderstyle, bordercolour or background colour then
    these don't change...UNTIL I click it a second time when everything
    works!?
    So for example I could change the alpha and the width and the
    backgroundcolor and first time round the alpha and width will
    change, then second time around the bgcolour will update ?!
    Why!???? I thought an updateAfterEvent() may help, but it
    made no difference.
    Can anyone help please!
    Thanks
    Phil

    The UIObject Class is the base class for all V2 Components.
    It adds functionality but also hides the MovieClip Class by
    defining an API that is not tied to the timeline. As a result there
    are often two properties or methods - one from the MovieClip class
    and one from the UIObject Class that can be used.
    With the second click there apparantly is a reference to the
    normal text field (Text Area Component is a wrapper for the normal
    text field).

  • Why does it say my password is incorrect when prompted to enter it a second time when setting up a hotmail account??

    Why does it say my password is incorrect when prompted to enter it a second time when setting up a hotmail account??

    Make sure you enter your Apple Store account with the correct CaSe on both username and password on the AppleTV.     Make sure your AppleTV is in fact connected to the internet.

  • X120e does not sleep when lid closed

    I found another similar post, however it was resolved by the individual reinstalling the operating system.
    My issue is more complicated. I have made sure everything is up to date, all the settings that tell the system to sleep when the lid is closed are turned on. I have even turned those settings off off, just so I could turn them back on to make sure there wasn't something quirky about it.
    I have tried restoring the system to factory settings using the recovery partition, as well as discs burned from the program that came with the computer. I have tried clean install from Windows 7, 8, and 8.1 discs.
    The unit still does not sleep. I don't ever remembering it being able to. I once closed the display thinking it would sleep (power was plugged in). Woke up the next day, went to work for 8 hours, came back and felt that the system was really hot. Opened the lid and the screen was exactly as I had left it the day before.
    When I first got the system in 2012, the screen did not work, so I actually had to send it to Atlanta, GA for repairs. It came back quickly, and it still did not work, so I actually sent it back to Atlanta, GA's repair center a second time in the same week. It came back working and I left it alone. I never tested the sleep/wake because I always just turned the system off when I was done with it, but now I am back in school and this little computer comes in handy, but I don't want to turn off the system manually going from class to class when I need to pack it away in my bag.
    Could there be a hardware issue? Something inside not connected? This laptop works perfectly EXCEPT for the fact that it will not sleep when the lid is closed. It is out of warranty but had I known this was an issue while it was still under warranty, I would have inquired. This unit is in pretty fantastic shape, looks brand new too. No damage, never been dropped, and only ever handled by me (never loaned out).
    How can I fix this?

    Thanks for the reply, gat0gelat0.
    Yes, those settings were the first things I checked. I also tried changing it to "Do nothing", then changing back to the sleeping option. It still does nothing when I close the lid.
    I would like the functionality of it going to sleep when I close the lid for the convenience, like when class ends, I have to rush to my next class, I just want to close the lid, put it in my bag and run to the next class. Keyboard shortcuts like Fn-F4 work, but this laptop should have the functionality I am describing, and I want to figure out why it isn't working and how to fix it.
    I suspect there is an issue with whatever is used hardware wise to sleep the machine. Either it's not being triggered, or it's not there, or it's broken. I've tried running a magnet around the bezel of the LCD screen as well as around the palm rest bezel and there is no activity as I've read that many laptops trigger sleep by interaction by a magnet. Still nothing.

  • MB pro not sleeping when lid closed

    Hi, I came to work today, opened my backpack and found my laptop extremely hot in its sleeve. It appears it had not gone to sleep when I closed the lid. It then failed to run properly for about 20 minutes until it cooled down. Now it is ok, except that it will not run in lid-closed mode. I plug in my external display, put it to sleep, and wake it back up with the lid closed in order to use the external display. The display fires up for a few seconds and then turns off again. I've tried this over and over again, the computer simply won't stay on for more than a few seconds. However, when the lid is opened, it will run the external display in mirrored mode just fine. I think something is toast. Coincidentally, I had just downloaded the keyboard update 1.0 a day earlier... Anybody know why my computer is not sleeping when I close the lid and why it won't work in closed-lid mode anymore?

    I've had a similar problem since I first got this a year ago. Sometimes when I shut the lid, the display does not go to sleep, and sometimes it restarts automatically when I shut the lid! I've also found it very hot at times when it should have been sleeping. So far, it's only been a minor annoyance.

  • Adobe Reader 11.0.10 crashes on OSX 10.9.5.  Crashes about once every three times when opening a file, searching an open file... started 11 months ago, reinstalling doesn't fix problem.

    For about 11 months Adobe Reader performance has gotten worse and worse.  It crashes about every third time I try to open a file, and frequently when I search for text strings using the find function.  I have re-installed the program, I have the latest installation according to Adobe.

    I've saved two files on my desktop:
    f1040.pdf - downloaded from www.irs.gov - 187 KB
    afmod07.2.1g.pdf - downloaded from my intranet - 1,04MB
    I've powered off my PC and restarted for each file. I've opened files with double-click on them. I've encountered the same problem, when double-clicked on files in task manager two Acrord32.exe appeared, the PC was doing anything for about 10 second, after that I've encountered no activity in task manager (numbers not vary) for other 10 seconds (like freeze) and after that other about 10 seconds of loading. So after about 30 seconds the file opens with stand-alone Acrobat Reader (11.0.10).
    If I retry now (after the first slow startup "of the day") the file opens in 2-3 seconds.
    So:
    - first open of the day or rebooting PC: 30-45 seconds
    - second open of the file: 2-3 seconds
    This is happening only with PDFs with forms.
    Yuri

  • Computer not going to sleep when lid closed

    My wife's new MacBook Air has a couple of problems we can't figure out.  First sometimes the computer is not going to sleep when lid is closed and when we lift the lid everything is frozen.
    Second, the user Library folder is not seeable in her user account.  I know it's there because on the side bar there's a short cut to Preferences folder which we can open.
    Strange behavior.
    Thanks,
    Ron

    Ron,
    The user library folder (~/Library/) is hidden by default in Lion. I assume Apple doesn't want people mucking around with the sensitive files in there. So this is normal behavior.
    As for the freezing issue, I would suggest you reset your power management and perform a safe boot to clear out caches. You should also see if the issue persists after disconnecting USB perhipherals.
    Here's how:
    Power Management:
    Shut down the computer.
    Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
    On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
    Release all the keys and the power button at the same time.
    Press the power button to turn on the computer. 
    Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
    Safe Boot:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).

Maybe you are looking for