Jsp and sql - very slow performance

Hello,
I am new to java and working on my site.
I encountered very low performance when I have implemented this function.
This functions counts responses for each ad.
Could you share know-how about better implementation?
in index.jsp I have this call:
out.println("<td align=\"center\">" + getRecords.countOffers(A.getIdads()) + "</td>");
this is getRecords.countOffers:
public static int countOffers(int ID) {
int offersqty = 0;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con = (Connection) DriverManager.getConnection(DBurl, user, password);
Statement stmnt = (Statement) con.createStatement();
String readTopic = "SELECT idoffers FROM `wishloft`.`offers` where idads='" + ID + "';";
ResultSet displayTopic = stmnt.executeQuery(readTopic);
while (displayTopic.next()) {
offersqty++;
displayTopic.close();
con.close();
} catch (Exception e) {
return offersqty;
}

Well, for starters, when posting additional code, please use tags.
As for "looking" correct, I would offer these suggestions:
- Use a PreparedStatement instead of just a String to build your query (as I suggested earlier)
- Since you are expecting only 1 record from your query, why use a while() loop?  If someone else has to come in and look at your code, it could lead to confusion.  Just get the first record and process it without any loops.
Also, only you can tell us if it performs correctly, because you should know what the results are since it's your data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • InDesign CC 2014 very slow performance when dragging images and changing text

    InDesign CC 2014 very slow performance when dragging images and changing text.
    Running on 2010 Macpro 2.4GHz. 8GB RAM. Any solutions? I've read through many forums on this and tried several fixes.

    Have exact same issue on  my Windows 7 machine. Resetting preferences is a workaround.
    So I start InDesign whilst holding down these keys.
    Ctrl + Alt + Shift (Windows) or Cmd + Ctrl + Opt + Shift (Mac)
    Whilst inDesign is usable again with this fix- I have to do it every time so it trashes all my preferences so NOT GOOD long term fix. Otherwise InDesign freezes and can only be stopped by forcing a quit.
    I have manually deleted the preference files and I have created a brand new admin account - but still no luck - will be onto support tomorrow

  • Acrobat very Slow performance (50% CPU usage)

    My acrobat 9 PRO (9.3.2) has suddently started to use 50% of my CPU usage everytime a *.pdf document is opened.
    It is the task Acrobat.exe which is the problem. This results in VERY slow performance and I cannot use the review function without adobe is crashing!
    This has not always been a problem!
    Does anyone know why this is happening?
    I have tried to uninstall and reinstall acrobat, without any luck!
    Thanks
    Peder

    You probably have the same problem as I do. I use version 9.3.3 on a fairly powerful machine with Windows vista. In my case, the problem is related to the weblink.api (http://forums.adobe.com/thread/675941?tstart=0). I also uninstalled, reinstalled, repaired - nothing helps.

  • Lion: very slow performance of my macbook pro

    very slow performance.
    went to terminal, did the top command, and got following results (mind you, ONLY have Safari and of course Terminal open):
    Processes: 96 total, 4 running, 9 stuck, 83 sleeping, 419 threads      19:07:17
    Load Avg: 1.99, 1.81, 1.59  CPU usage: 2.36% user, 5.21% sys, 92.41% idle
    SharedLibs: 1660K resident, 0B data, 0B linkedit.
    MemRegions: 15947 total, 2662M resident, 47M private, 209M shared.
    PhysMem: 695M wired, 2175M active, 1083M inactive, 3953M used, 13M free.
    VM: 250G vsize, 1093M framework vsize, 699065(68) pageins, 1724738(881) pageouts
    Networks: packets: 70104/55M in, 66648/10M out.
    Disks: 966630/9347M read, 327765/18G written.
    PID   COMMAND      %CPU  TIME     #TH  #WQ  #POR #MREG RPRVT  RSHRD  RSIZE
    4058  top          5.2   00:03.32 1/1  0    28   29    912K   216K   1620K
    4055  bash         0.0   00:00.02 1    0    20   23    356K   216K   1112K
    4052  CVMCompiler  0.0   00:00.30 1    0    30   69    7780K  220K   16M
    4051  login        0.0   00:00.08 2    1    33   63    928K   216K   2184K
    4049  Terminal     0.3   00:01.34 7    3    128+ 164+  7580K+ 13M    15M+
    4042  ocspd        0.0   00:00.02 1    0    26   33    420K+  276K   1376K+
    4041  WebProcess   0.0   00:04.35 7    3    119  201   16M-   10M    26M-
    4039  Safari       1.1   00:09.44 12   3    193  413   47M-   20M    81M-
    3958  spindump_age 0.0   00:00.02 2    2    38   55    356K   220K   1100K
    3956  spindump     1.3   00:42.93 16/1 13   228  145   46M+   15M    53M+
    3953  aosnotifyd   0.0   00:00.18 3    1    53   279   2064K  3532K  6156K
    3939  AddressBookM 6.8   06:59.11 4    1    68   4067+ 2131M- 3308K  1554M-
    3895  lsboxd       0.0   00:00.06 2    2    49   69    1156K  6820K  3292K
    3031  cookied      0.0   00:01.36 2    1    42   82    2028K  268K   3
    every minute or so the computer blocks, every 3 or 4 hours I have to restart etc.
    any suggestions?

    ok, stopped syncing in System preferences and even (horror) deleted the file which reappeared in seconds.
    now waiting to see if stopping the syncing helps - though computer is now working a bit better, the info on Activity Monitor would indicate it is not a real improvement
    473           AddressBookMobileMeSharingAgent          me          1,4          4          1.020,0 MB          Intel (64 bit)
    312           helpd          me          0,4          65          358,9 MB          Intel (64 bit)
    0           kernel_task          root          1,1          76          336,6 MB          Intel (64 bit)
    459           Mail          me          0,4          9          276,2 MB          Intel (64 bit)
    194           java          root          0,1          30          162,4 MB          Intel (64 bit)
    405           Safari          me          0,5          12          120,0 MB          Intel (64 bit)
    407           Safari Web Content          me          0,2          7          100,3 MB          Intel (64 bit)
    195           WindowServer          _windowserver          0,5          7          64,4 MB          Intel (64 bit)

  • Healing brush/Clone stamp tool and others very slow processing

    Healing brush/Clone stamp tool and others very slow processing. System resources monitor shows only 700MB (of 5GB allocated to Photoshop) RAM and 30% CPU is used to perform such tasks as healing brush. Process bar comes up and is painfully slow to complete the task. I don’t understand why does Photoshop not use all the resources available/allocated? No other programs are running at the time, I have tried all the suggestions on this forum and all over the Google. My brand new system is: Intel I7 4770K overclocked to 4.3GHz, 8GB 1600 RAM, Samsung PRO 120GB SSD system drive, 100GB scratch disk. The photos I usually work on don’t exceed 20MB in size. Any suggestion would be appreciated.  Thanks

    Thanks for the answer.
    I have not mentioned the GPU because the processes I described (as far as I know) are not supposed to be using GPU resources. So far I have not been able to afford the GPU i want which is GTX770, so I use Intel 4600 built in graphics instead. To be honest I find, that 4600 graphics is quite powerful. I am able to play Mass Effect 3 on Full spec on max res without game slowing down. And Windows 7 64bit index score is 7.8 for the 4600 graphics. Overall index score is 7.8 on my PC righ now.
    I'll try to get the Photoshop system info as soon as possible.
    Thanks again.
    Zee

  • E50 very slow performance

    my E50 is giving very slow performance anyway to tune it up ?? dosn't hangs but its slow ?? any solution ps whats the best antivirus to install in E50 ?

    I don't use your same workflow, and I assume you're shooting RAW. However,  after I have built 1:1 previews in LR (which takes a LONG time), when I click on a file to decide if it's sharp or not, it still takes 5-10 seconds for each file to load. And my computer isn't slow, and I have the same issue on my laptop, which is new and fast. I haven't seen a satisfactory answer to this problem, nor much acknowledgement from Adobe. My files are from a Nikon D7100 with 24 megapixels, so the file size is likely a factor.
    If you are shooting the type of subjects where you use 1:1 previews primarily to determine sharpness, you could consider Photo Mechanic (unfortunately it costs $150) as the first step in your workflow. It uses the embedded jpg files in the RAW file, so it loads 1:1 jpg previews almost instantly. Sports and nature photographers use this product all the time, mostly to delete losers.

  • Formatted Search with DI  leads to a very slow performance - HELP....

    Hello There
    I have defined some formatted search in OPCH - everything is working fine.
    I have added some logic to this form via the DI.(handlling 1 item press_event), and I get a very very slow performance - the ADDON-EXE jumps TO 230MEGA of memory, and entering values to each row in the tables/item in the form takes about 15 seconds.
    Any suggestions?
    RGDS
    HAGAI

    Hi Hagai,
    Normally an addon written using the DI would take up 60-80MBs.
    Are you filtering out all events except for the item press event for the form? If you are not filtering events then this can have quite a drastic affect on performance.
    What logic have you got behind the press event? If the addon exe is ballooning out to 230MB then it suggests that there is either a problem with a memory leak or that an error is occuring in the code. I would recommend putting try/catch clauses at suitable places in the code and maybe specifically setting objects to null and calling the .NET garbage collector to try and minimise the potential for memory leaks.
    Are you sure that it is the combination of the formatted search and the addon that is causing the problem, i.e. if you take away the formatted search but leave the addon do you still get poor performance or does everything speed up?
    Hope this helps,
    Owen

  • Very slow performance, need assistance

    I have a program that has very slow performance (and I mean SLOW).  I was hoping somebody could tell me how to improve the performance.  I know where it hangs up (at LOOP AT it_detail INTO wa_detail.) but I'm not sure what I need to do to make it quicker.  Any help would be appreciated.
    TABLES: vbak,
            vbpa,
            adrc.
    TYPES: BEGIN OF ty_detail,
             vbeln TYPE vbak-vbeln,
             erdat TYPE vbak-erdat,
             vdatu TYPE vbak-vdatu,
             adrnr TYPE vbpa-adrnr,
             sa_name TYPE adrc-name1,
             sa_street TYPE adrc-street,
             sa_city TYPE adrc-city1,
             sa_state TYPE adrc-region,
             sa_zip TYPE adrc-post_code1,
             sa_tel TYPE adrc-tel_number,
             kunnr TYPE vbpa-kunnr,
             ag_name TYPE kna1-name1,
             ag_street TYPE kna1-stras,
             ag_city TYPE kna1-ort01,
             ag_state TYPE kna1-regio,
             ag_zip TYPE kna1-pstlz,
             ag_tel TYPE kna1-telf1,
             vkbur TYPE knvv-vkbur,
             we_num TYPE likp-kunnr,
             we_name TYPE kna1-name1,
             we_name2 TYPE kna1-name2,
             we_street TYPE kna1-stras,
             we_city TYPE kna1-ort01,
             we_state TYPE kna1-regio,
             we_zip TYPE kna1-pstlz,
             we_tel TYPE kna1-telf1,
           END OF ty_detail.
    DATA: it_detail TYPE TABLE OF ty_detail WITH KEY vbeln adrnr kunnr we_num,
          wa_detail LIKE LINE OF it_detail.
    DATA: addressnum TYPE vbpa-adrnr,
          temp_kunnr TYPE likp-kunnr.
    * S E L E C T I O N - S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK required WITH FRAME TITLE text-002.
    SELECT-OPTIONS:  s_vdatu FOR vbak-vdatu OBLIGATORY.    "Req delivery date
    SELECTION-SCREEN END OF BLOCK required.
    SELECTION-SCREEN BEGIN OF BLOCK temp WITH FRAME TITLE text-001.
    SELECT-OPTIONS:  s_auart FOR vbak-auart OBLIGATORY.
    PARAMETER:  p_parfun TYPE vbpa-parvw DEFAULT 'Z5' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK temp.
    *INITIALIZATION.
    *  REFRESH s_auart.
    *  CLEAR s_auart.
    *  s_auart-sign = 'I'.
    *  s_auart-option = 'EQ'.
    *  s_auart-low = 'OR'.
    *  APPEND s_auart.
    *  s_auart-low = 'ZDT'.
    *  APPEND s_auart.
    * END OF SELECTION SCREEN
    * M A I N - B O D Y
    *Main select statement.
    SELECT a~vbeln a~erdat a~vdatu c~adrnr c~kunnr
        INTO CORRESPONDING FIELDS OF TABLE it_detail
        FROM vbak AS a
          INNER JOIN vbap AS b
              ON b~vbeln = a~vbeln
          INNER JOIN vbpa AS c
              ON c~vbeln = b~vbeln
    *          AND c~posnr = b~posnr
                   WHERE a~auart IN s_auart
                   AND a~vdatu IN s_vdatu
                   AND c~parvw = p_parfun.
    LOOP AT it_detail INTO wa_detail.
      SELECT SINGLE name1 street city1 region post_code1 tel_number
          FROM adrc INTO (wa_detail-sa_name, wa_detail-sa_street, wa_detail-sa_city, wa_detail-sa_state,
                            wa_detail-sa_zip, wa_detail-sa_tel)
          WHERE addrnumber = wa_detail-adrnr.
      SELECT SINGLE name1 stras ort01 regio pstlz telf1
          FROM kna1 INTO (wa_detail-ag_name, wa_detail-ag_street, wa_detail-ag_city, wa_detail-ag_state,
                            wa_detail-ag_zip, wa_detail-ag_tel)
          WHERE kunnr = wa_detail-kunnr.
      SELECT SINGLE c~kunnr INTO temp_kunnr
          FROM vbpa AS a
              INNER JOIN lips AS b
                ON b~vgbel = a~vbeln
              INNER JOIN likp AS c
                ON c~vbeln = b~vbeln
                WHERE a~vbeln = wa_detail-vbeln.
      wa_detail-we_num = temp_kunnr.
      SELECT SINGLE name1 name2 stras ort01 regio pstlz telf1
          FROM kna1 INTO (wa_detail-we_name, wa_detail-we_name2, wa_detail-we_street, wa_detail-we_city, wa_detail-we_state,
                            wa_detail-we_zip, wa_detail-we_tel)
          WHERE kunnr = wa_detail-we_num.
      SELECT SINGLE vkbur FROM knvv INTO wa_detail-vkbur
          WHERE kunnr = wa_detail-kunnr.
      MODIFY it_detail FROM wa_detail.
    ENDLOOP.
    PERFORM display.
    INCLUDE zpartner_displayf01.
    Regards,
    Davis

    Hi Davis,
      The culprit is the select inside the loop.
    YOu should use for all entries instead .
    I will show for one select, you do similar thing for others:
      SELECT addrnumber name1 street city1 region post_code1 tel_number
          FROM adrc INTO table itab_adrc
    for all entries in it_detail
          WHERE addrnumber = it_detail-adrnr.
    sort itab-adrc by addrnumber.
    LOOP AT it_detail INTO wa_detail.
    read table it_adrc with key addrnumber = wa_detail-adrnr.
    if sy-subrc = 0.
    move fiedls of it_adrc into wa_detail.
    endif.
    ENDLOOP.

  • HT204266 my facebook application downloads pictures and videos very slow.Pictures are blurred as well.what to do.

    My facebook app on Ipad downloads pictures and videos very slow. a few of the pics are also blurred.What to do?

    Hi Skye_Starkey,
    Im sorry to hear that you are having issues with your internet service. I know this can be very frustrating and I apologise for the inconvenience.
    You can check to see if there is an outage in your area by entering your postcode and suburb in our service status checker: http://servicestatus.telstra.com/servicestatus/goc.do?q=summary.html
    Please powercycle your modem and computer: Unplug from power > Leave off for 10 - 15 mins > then Plug back in and re start. This will often force a line update through to your modem advising the signal is restored.
    Please make sure you have not exceeded you monthly usage allowance and have been shaped (slowed). You can do this via My Account http://tel.st/cpyn 
    Here are some other DIY support tools you can try. 
    Is your ADSL service running as fast as it could be?
    http://crowdsupport.telstra.com.au/t5/Coverage-Network-KB/Is-your-ADSL-service-running-as-fast-as-it-could-be/ta-p/311953
    How to test your speed
    http://crowdsupport.telstra.com.au/t5/Home-Broadband-KB/Testing-your-broadband-speed/ta-p/278139
    Make sure your modem settings are correct
    http://crowdsupport.telstra.com.au/t5/Modems-Hardware-KB/BigPond-Modem-settings/ta-p/251263
    ADSL Self service tool:
    https://www.telstra.com.au/webforms/cares/
    Change your line profile:
    http://crowdsupport.telstra.com.au/t5/General-Internet-KB/Change-your-ADSL-Line-profile/ta-p/110182
    How to peform an Isolation test:
    http://crowdsupport.telstra.com.au/t5/General-Internet-KB/How-to-perform-an-Isolation-Test/ta-p/55014
    ADSL Troubleshooting tips
    https://go.telstra.com.au/helpandsupport/-/adsl-troubleshooting-tips
    If you try all the steps in these articles and have no luck with your connection, Please speak to our Technical support team. You can contact them 
    on 133933 or you can also contact them via our Live chat service here: http://tel.st/49kl
    Regards - Tom
     

  • Very slow performance in Lightroom 3??

    I just upgraded to Lightroom  3.0 and I am very suprised how slow it is!?!  I don't have a very large library and I'm on two reasonably new computers yet the difference from Lightroom 2 (snappy performance) to Lightroom 3 (VERY sluggish) is quite suprising..
    I'm using it on a XP and a Vista system with the same results...
    Is anyone else experiencing this???
    Thanks,
    Ken

    I've noticed a slow down in performance with Lightroom 3 as well. As far a looking around the forum for older threads, ...found older lightroom 1 and 2 threads.
    Your Title "Very Slow Performance in Lightroom 3??" fits what I'm looking for just perfectly.
    Jim

  • 3 year old iMac 24 running OS10.7.4.  After it has been on for a day or so, it stops going to sleep and becomes very slow.  This only happens when Safari is running. Quitting Safari solves the problem.  Has anyone else have the same problem?

    3 year old iMac 24 running OS 10.7.4.  After it has been on for a day or so, it stops going to sleep and becomes very slow.  This only happens when Safari is running. Quitting Safari solves the problem.  Has anyone else have the same problem?  Does not happen on MacBookpro only on iMac.

    Hello Albert, see how many of these you can answer...
    See if the Disk is issuing any S.M.A.R.T errors in Disk Utility...
    http://support.apple.com/kb/PH7029
    Open Activity Monitor in Applications>Utilities, select All Processes & sort on CPU%, any indications there?
    How much RAM & free space do you have also, click on the Memory & Disk Usage Tabs.
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.
    In the Memory tab, are there a lot of Pageouts?

  • Mac os x lion 10.7 on mac book pro not updating and running very slow

    i am using mac os x lion 10.7
    problem it is not updating and running very slow. How to improve?

    If you don't already have a current backup, back up all data before doing anything else. This procedure is a diagnostic  test. It changes nothing, for better or worse, and therefore will not, in itself, solve your problem. The backup is necessary on principle, not because of anything suggested in this comment. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The procedure will help to identify which such modifications you've installed, as well as some other aspects of the state of the system that may be pertinent.
    Don’t be alarmed by the seeming complexity of these instructions — they’re easy to carry out. Here's a brief summary: You copy a line of text from this web page into a window in another application. You wait about a minute. Then you paste some other text, which will have been copied automatically, back into a reply on this page. The sequence is: copy, paste, paste again. That's all there is to it. Details follow.
    You may have started the computer in "safe" mode. Preferably, these steps should be taken while booted in “normal” mode. If the system is now running in safe mode and is bootable in normal mode, reboot as usual. If it only boots in safe mode, proceed anyway.
    Below are instructions to run a UNIX shell script. It does nothing but produce human-readable output. However, you need to be cautious about running any program at the behest of a stranger on a public message board. If you question the safety of the procedure suggested here — which you should — search this site for other discussions in which it’s been followed without any report of ill effects. If you can't satisfy yourself that these instructions are safe, don't follow them.
    The script will line-wrap or scroll in your browser, but it's really 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, and you can then copy it.
    If you have more than one user, and the affected user is not an administrator, then please run the script twice: once while logged in as the affected user, and once as an administrator. The results may be different. The administrator is the user that is created automatically on a new computer when you start it for the first time. If you can't log in as an administrator, just run the script as the affected user. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    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. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign ($) or a percent sign (%). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Triple-click anywhere in the line of text below on this page to select it:
    clear; PB=/usr/libexec/PlistBuddy; PR () { [[ "$o" ]] && o=$(sed 's/^/   /' <<< "$o") && printf '\n%s:\n\n%s\n' "$1" "$o"; }; PC () { o=$(egrep -v '^[[:blank:]]*($|#)' "$2"); PR "$1"; }; PF () { o=$($PB -c Print "$2" | awk -F'= ' \/$3'/{print $2}'); PR "$1"; }; PN () { [[ $o -eq 0 ]] || printf "\n%s: %s\n" "$1" $o; }; a=$(id | grep -w '80(admin)'); [[ "$a" ]] && sudo true && r=1 || r=; { [[ "$a" ]] || echo $'No admin access\n'; [[ "$a" && ! "$r" ]] && echo $'No root access\n'; system_profiler SPSoftwareDataType | sed '8!d;s/^ *//'; o=$(system_profiler SPDiagnosticsDataType | sed '5,6!d'); fgrep -q P <<< "$o" && o=; PR "POST"; o=$(($(vm_stat | awk '/Pageo/{sub("\\.",""); print $2}')/256)); o=$((o>=1024?o:0));  PN "Pageouts (MiB)"; s=( $(sar -u 1 10 | sed '$!d') ); [[ ${s[4]} -lt 90 ]] && o=$( printf 'User %s%%\t\tSystem %s%%' ${s[1]} ${s[3]} ) || o=; PR "Total CPU usage" && o=$(ps acrx -o comm,ruid,%cpu | sed '2!d'); PR "Max %CPU by process (name, UID, %)"; o=$(kextstat -kl | grep -v com\\.apple | cut -c53- | cut -d\< -f1); PR "Loaded extrinsic kernel extensions"; o=$(launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'); PR "Loaded extrinsic user agents"; o=$(launchctl getenv DYLD_INSERT_LIBRARIES); PR "Inserted libraries"; PC "cron configuration" /e*/cron*; o=$(crontab -l | grep [^[:blank:]]); PR "User cron tasks"; PC "Global launchd configuration" /e*/lau*; PC "Per-user launchd configuration" ~/.lau*; PF "Global login items" /L*/P*/loginw* Path; PF "Per-user login items" L*/P*/*loginit* Name; PF "Safari extensions" L*/Saf*/*/E*.plist Bundle | sed 's/\..*$//;s/-[1-9]$//'; o=$(find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l); PN "Restricted user files"; cd; o=$(find -L /S*/L*/E* {/,}L*/{A*d,Compon,Ex,In,Keyb,Mail/Bu,P*P,Qu,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do ID=$($PB -c 'Print :CFBundleIdentifier' "$d/Info.plist") || ID=; ID=${ID:-No bundle ID}; egrep -qv "^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|\.hpio|JMicron|microsoft\.MDI|print|SoftRAID" <<< $ID && printf '%s\n\t(%s)\n' "${d%/Contents}" "$ID"; done); PR "Extrinsic loadable bundles"; o=$(find /u*/{,*/}lib -type f -exec sh -c 'file -b "$1" | grep -qw shared && ! codesign -v "$1"' {} {} \; -print); PR "Unsigned shared libraries"; o=$(system_profiler SPFontsDataType | egrep "Valid: N|Duplicate: Y" | wc -l); PN "Font problems"; for d in {/,}L*/{La,Priv,Sta}*; do o=$(ls -A "$d"); PR "$d"; done; [ "$r" ] && { o=$(sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|calendarse|cups|dove|isc|ntp|post[fg]|x)/{print $3}'); PR "Loaded extrinsic daemons"; o=$(sudo defaults read com.apple.loginwindow LoginHook); PR "Login hook"; o=$(sudo crontab -l | grep [^[:blank:]]); PR "Root cron tasks"; }; o=$(syslog -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|n Cause: -|NVDA\(|pagin|timed? ?o' | tail -n25 | awk '/:/{$4=""; print}'); PR "Log check"; } 2> /dev/null | pbcopy; exit
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). The text you pasted should vanish immediately. If it doesn't, press the return key.
    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 your password, the script will run anyway, but it will produce less information. In most cases, the difference is not important, so don't worry about it.
    The script may take up to a few minutes to run, depending on how many files you have and the speed of the computer. Wait for the line "[Process completed]" to appear in the Terminal window.
    You can then quit Terminal. The output of the script will have been copied to the Clipboard automatically. All you have to do is paste into a reply to this message by pressing command-V again.
    Please note:
    ☞ This procedure is all copy-and-paste — type nothing in the Terminal window except your login password if and when prompted.
    ☞ Remember to post the output. It's already in the Clipboard when you see "[Process completed]" in the Terminal window. You don't have to copy the output; just paste into your web browser.
    ☞ If any personal information, such as your name or email address, appears in the output, anonymize it before posting. Usually that won't be necessary.

  • Videos skip and are very slow when I play them in anything other than fulls

    When I try to play a video it is ok when it is in the small box in the corner but when i double click and get the video larger it skips alot and play very slow, but when I make the video full screen it play normally. How can I play the video in the mid size box in the right way.

    Crop...
    I'm having the same problem (iTunes 11.02!) .
    I think this one isn't resolved because it IS rare: I've had iTunes on about 7 different machines (Mac and PC) since it begain (2001). In fact I maintain the same library without issues for over 10 years. Anyway this is the first time it's occurred (in my case it's happened on a pretty recent Mac Laptop). But as you may have discovered, google/bing searches for similar problems yeild VERY few results.
    A guy at the Apple store was able to temporarily fix by doing some low level cache removal, that may give a glimpse to the reason, but is not a permanent fix.
    I'm going to try a few things will report back if I have any luck**.
    ***If anyone else want to give it a try: Before starting bookmark the following: http://support.apple.com/kb/HT1391 this describes the location and purpose of most of the iTunes library files. And, any apple support docs on creating a  new iTunes library... I'm unwilling to try the let iTunes "Keep iTunes Media folder organized " cause I have my own organization method.

  • My ipod 5th generation keeps on crashing and has a slow performance

    my ipod 5th generation keeps on crashing and has a slow performance, then I restarted it, it went back to normal.. was the crashing part and slowing down normal? just bought it last december 2012

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:       
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    -  Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Firefox maxing my cpu and runs VERY slow i have reset firefox and re installed it, diddnt work

    firefox maxing my cpu and runs VERY slow i have reset firefox and re installed it, diddnt work i have googles searched about it and tryed so manny things to fix it but nothing works this is my last idea posting here

    Did you do a clean reinstall and deleted the Firefox program folder?
    *(32 bit Windows) C:\Program Files\Mozilla Firefox\
    *(64 bit Windows) C:\Program Files (x86)\Mozilla Firefox\
    Try to boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    If the new profile works then you can transfer some files from an existing profile to the new profile, but be careful not to copy corrupted files.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

Maybe you are looking for