Lonely defender of scriptlets in a cruel world

I'm trying to find more people who are not so reactionary in their view of scriptlets. It seems to be the overwhelming view that all scriplets should be disallowed in jsp pages, even looping tags, or conditional html presentation. I agree with model 2 architecture. I don't think there should be database calls in a jsp page. But what's wrong with one or two lines here and there? Or a for loop for god's sake?
I know a big argument is so that HTML developers don't get confused, but can't they be instructed not to touch anything between the scriptlet tags? Anyway, when was the last time any of you were on a project that had such a clear distinction of duties. Any project I've been on had java programmers doing the html as well. Someone please tell me I'm not a blithering moron. Or maybe I am.

You don't sound like a moron, at least based on this post!
I have been on projects where the JSP developers were not Java literate and so scriptlets were not used. However, I agree with you that this is not automatically always the right approach. What's important is to consider the pros and cons and make an informed decision.
For an enterprise app, the designer would normally look for complete separation of the layers for view, model, controller, persistence etc.
However, in a small shop where Java programmers create the JSPs and always will, there may not be any benefit in creating extra work just to fit in with the "no scriptlet" dogma. The same thing applies to placing database code in a JSP. You normally wouldn't do this, but for a "quick and dirty" app, you might, as long as you understood and accepted the consequences. If these features are completely evil, then the JSP spec should disallow scriptlets and Sun's custom tag library should not include tags for SQL database access.
There's always a trade-off between speed of initial development and long-term scalability and flexibility. The trick is to make the right choice for each project and not accept conventional wisdom without due thought.

Similar Messages

  • Internal Frames problem

    Hi,
    I am writing a piece of code where I want to able to choose from a menu a screen that displays multiple graphs (using Internal frames.) I am using cardlayout to bring up the various options I choose from the menu. I have simplified my program as much as possible but I still seem to be getting the same error
    Exception in thread "main" java.lang.IllegalArgumentException: adding a window to a container .......
    I know I shouldn't be adding a window to a container but I can't see how I can change my code so it has the functionality I desire.
    Here is the code I am using
    import java.awt.*;
    import javax.swing.*;
    public class Test extends JFrame
         public Test()
             JPanel card1 = new JPanel();
             card1.add(new InternalFrameDemo());
              getContentPane().add(card1);
        public static void main(String[] args)
              Test frame = new Test();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.setSize(200, 200);
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class InternalFrameDemo extends JFrame
        JDesktopPane desktop;
        static final int xOffset = 30, yOffset = 30;
        private JLabel graph1;
        private String Graph1;
        public InternalFrameDemo() {
            super("InternalFrameDemo");
            //Make the big window be indented 50 pixels from each edge
            //of the screen.
            int inset = 50;
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            setBounds(inset, inset,
                      screenSize.width  - inset*2,
                      screenSize.height - inset*2);
            //Set up the GUI.
            desktop = new JDesktopPane(); //a specialized layered pane
            createFrame(); //create first "window"
            setContentPane(desktop);
            //Make dragging a little faster but perhaps uglier.
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        //Create a new internal frame.
        protected void createFrame() {
            MyInternalFrame frame = new MyInternalFrame();
            frame.setVisible(true);
            desktop.add(frame);
            try {
                frame.setSelected(true);
            } catch (java.beans.PropertyVetoException e) {}
        //Quit the application.
        protected void quit() {
            System.exit(0);
       public void MyInternalFrame() {
         System.out.println("graph1");
         graph1 = new JLabel("", 
                       new ImageIcon("../images/Graph1.jpg"),
                       JLabel.CENTER);
         getContentPane().add(graph1);
         //...Then set the window size or call pack...
         setSize(500,550);
    }If anyone could point me in the right direction it would be great. Thanks in advance!

    But I actually do not understand what that card layout thing is all about. If you want to hide/show internal frames you can simply use setVisible() and setSelected() like examplified below (I did put all code in the same file for my convenince). I have put a text in the label so that you can see that it is replaced. Using aJLabel to show an image is however a little bit weird.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    class MyInternalFrame extends JInternalFrame
      private JLabel graph1;
      public MyInternalFrame(String text)
        graph1 = new JLabel(text, 
                            new ImageIcon("../images/Graph1.jpg"),
                            JLabel.CENTER);
        getContentPane().add(graph1);
        setSize(500,550);
    public class InternalFrameDemo extends JFrame
      private JDesktopPane desktop;
      private final MyInternalFrame[] frames;
      public InternalFrameDemo()
        super("InternalFrameDemo");
        frames = new MyInternalFrame[3];
        //Make the big window be indented 50 pixels from each edge of the screen.
        int inset = 50;
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds(inset, inset,
                  screenSize.width  - inset*2,
                  screenSize.height - inset*2);
        //Set up the GUI.
        desktop = new JDesktopPane(); //a specialized layered pane
        setContentPane(desktop);
        frames[0] = createFrame("Hello world!");
        frames[1] = createFrame("Hello again, world!");
        frames[2] = createFrame("Goodbye cruel world!");
        desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        setSize(500, 500);
        Thread animThread = new Thread()
            public void run()
              for (int i = 0; i < frames.length; ++i)
                final int frameId = i;
                SwingUtilities.invokeLater(new Runnable()
                    public void run()
                      // Hide frame that is showing.
                      if (frameId != 0)
                        frames[frameId - 1].setVisible(false);
                      System.out.println("Replacing image: " + frameId);
                      frames[frameId].setVisible(true);
                      try
                        frames[frameId].setSelected(true);
                      catch (java.beans.PropertyVetoException exc)
                        exc.printStackTrace();
                try
                  Thread.sleep(3000);
                catch (InterruptedException exc)
                  exc.printStackTrace();
        animThread.start();
      //Create a new internal frame.
      protected MyInternalFrame createFrame(String text)
        MyInternalFrame frame = new MyInternalFrame(text);
        desktop.add(frame);
        return frame;
      public static void main(String[] args)
        JFrame frame = new InternalFrameDemo();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }Using lazy initialization where you postpone the creation of an internal frame until it is actually shown would be an improvement.
    The setVisible/Selected() call can of course be triggered by something else in your application.
    Note that changes of swing components shall be made in the EDT.

  • Firefox crashed down many times (6-7) and doesn't open anymore giving me a warning sound each time i try to open it any suggestions?

    I'm using firefox (now 27b2) having many tabs opened and i got used to the fact that many times crashes down ... each time i restore the session and it starts again ... but yesterday it "died" on me. Each time i'm trying to run it i get a warning sound and firefox refuses to open. As far as i remember i didn't install any soft lately ... but right before it's death, my pc was getting frozen and need it reboot ... that happened 3-4 times and then firefox "left" this cruel world. I run S&D, Malware bytes, Avast IS ... found nothing. Tried to open it in safe mode unsuccesfuly getting the same warning sound. I decided to uninstall it (Revo uninstaller) and used Ccleaner to wipe the leftovers then i tried to reinstall it but when running setup i get a message says "File corrupt" and everything ends here. I tried firefox 26 stab and it worked like a charm but the question remains the same why the beta version refuses to run and/or to be reinstalled ... If there is someone out there (I'm sure there are many...) with any suggestions or advices i would be very grateful ...Thank you all...

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thank you.
    <!-- VERY important to include-->
    <b>WARNING:</b> Do not run Firefox's uninstaller or use a third party remover as part of this process, because that could permanently delete your Firefox data, including but not limited to, extensions, cache, cookies, bookmarks, personal settings and saved passwords. <u>These cannot be recovered unless they have been backed up to an external device!</u>

  • How can I stop a task sequence if a custom HTA preflight check fails?

    In our currently deployment method, we launch an HTA program before initiating the OSD process. This is only when run from the RAP menu, not via PXE.  When a user initiates OSD through that menu, they get a message prompting them to close Outlook, and
    a countdown of 5 mins, then OSD starts.  They also have the ability to click on an 'OK' button to proceed on their own.
    I've created a new script which checks WMI if Outlook and/or OCS are open, and if the machine is running on battery, spit out a "Failed" response and stop the HTA.  I've also added a "recheck" button to re-do the check, and an 'OK
    button if people jsut want to continue.  
    I'm curious if there is a way to prevent the task sequence from continuing if any of those conditions arent met.  Currently it just pops up and says "Failed, Cannot conitue", but if they close the window, the task sequence thinks the program
    has run, and the OSD migration starts.  I'd like to be able and get the script to cancel the OSD process if a check fails.
    Has anyone had success with this, using WINXP? I'd use the MS pre-flight check but it's only for WIN7.

    Interesting. Thanks for the response.  Is there anybody out there that can assist with VBS part of the solution?
    Here's the code I'm working with.  Currently the battery piece isnt working as it should but I can figure that our, eventually.  I'd like to get Jason's proposed solution in the code.  If this isn't the right place, I'll take this somewhere
    else.
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>OSD Preflight checks</title>
    <HTA:APPLICATION
    APPLICATIONNAME="OSD Preflight checks"
    ID="objOSDPreReqChecks"
    SCROLL="no"
    CONTEXTMENU="no"
    SINGLEINSTANCE="no"
    MAXIMIZEBUTTON="no"
    MINIMIZEBUTTON="no"
    WINDOWSTATE="normal"/>
    <!-- #region STYLEs-->
    <style type="text/css">
    H1{color:Black;text-align:center;font-family: Arial, Helvetica, sans-serif;font-size: 26px;}
    p{font-family:"Arial";font-size:10px;}
    fail{color:Red;text-align:center;}
    .Version {float:left; font-size:1.0em;font-style:italic;color:#888888;font-weight:bold;}
    .Header1 {width: 180px; text-align: right;font-weight:bold;}<!-- '1st column heading -->
    H2 {font-family: Arial, Helvetica, sans-serif; text-align: center;}
    H3 {font-style: italic;}
    .style2 {width: 180px; text-align: left;}
    .Header2 {width: 150px; text-align: right;font-weight:bold;}<!-- '2nd column heading -->
    .style4 {width: 410px; text-align: left;}
    .StatusBar
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    .hidden {display: none; visibility: hidden;}
    </style><!-- #endregion -->
    </head>
    <script language="VBScript" type="text/vbscript">
    '======================================================================================
    ' Script
    ' Version
    ' Purpose To check a machine is suitable for taking an OS deployment
    '======================================================================================
    'Features
    ' Modular design
    ' Verbose "Debug Mode"
    ' In-built data validation
    ' Custom error handling
    ' Custom error codes - 90x0
    ' Generic WMI handler
    'BUGfix: Change CLng to CDbl to avoid overflow (in GetRAM)
    'fixed - moved head section to top to become head > script > body
    'fixed - fCheckModel display with leading ,
    'fixed - fgetmodels dictionary list
    Option Explicit
    ' #region GLOBAL DECLARATIONS: Persistent fold region
    '======================================================================================
    'GLOBAL Vars
    'Things to just display (in GUI)
    Dim strRAM
    Dim strCPUInfo
    Dim strCPUName
    Dim strCPUDesc
    Dim iCPUCount
    Dim iCPUCoreCount
    Dim iRAM
    Dim strBIOSver, strBIOSDate, strBIOSInfo
    'Time related
    Dim TimerInterval 'timer to refresh HTA at start
    Dim iTimer 'abort timer
    Const iAbortTimeout=300000 'delay before window closes (in milliseconds)
    Dim pbTimerID
    Dim pbHTML
    Dim pbWaitTime
    Dim pbHeight
    Dim pbWidth
    Dim pbBorder
    Dim pbUnloadedColor
    Dim pbLoadedColor
    Dim pbStartTime
    'Dictionary
    Dim objModelsDict,colKeys,strKey 'models
    Dim objApprovedMakesDict
    'Misc GLOBAL vars
    Dim blnDebug 'set TRUE to trigger debug mode
    Dim bAbortBuild 'Boolean flag to abort or not abort
    Dim strTemp 'throwaway/scratch
    Dim strNamespace 'wmi default namespace for ANY machine
    Dim strComputer 'wmi reference to current machine, just .
    Dim strService 'WMI service
    Dim strQuery 'custom WQL
    Dim ErrMsg 'custom error messages
    Dim iErrMode 'State machine for error mode
    Dim lFlags 'WMI flag
    Dim strDisks
    'Pre-requisites - things that will cause build to abort if values do not meet spec
    Dim strHTAVendor 'Make of hardware
    Dim strHTAVendorState
    Dim strHTAModel 'Model of hardware
    Dim strHTAModelState 'Model state
    Dim strHTARAM 'RAM
    Dim strHTARAMState 'RAM state
    Dim strHTACPUSpeed 'Processor speed
    Dim strHTACPUCores 'Number of cores
    Dim strHTACPUFullInfo 'CPU + cores
    Dim strHTAHDD 'Disk info
    Dim strHTAHDDState 'Disk state
    Dim strHTACheckRAW 'NTFS check
    Dim strHTAArchitecture 'Processor support
    Dim strHTAProduct 'Product ID
    Dim strHTAOutlook 'Outlook running
    Dim strHTAOutlookState 'Outlook state
    Dim strHTABattery 'Battery check
    Dim strHTABatteryState 'Battery state
    'for WQL filters
    Dim strWQLPCInfo 'Pre-req - (1) for various inc. domain role (servers)
    Dim strWQLRAM 'Pre-req - (2) RAM
    Dim strWQLCPU 'Pre-req - CPU speed string (not int)
    Dim strWQLBootOrder 'Pre-req - Boot order string
    Dim strWQLSATAMode 'Pre-req - HDD mode
    Dim strWQLGenericBIOS
    Dim strWQLCPUCount 'Pre-req - how many CPUs
    Dim strWQLCPUInfo
    Dim strWQLFSType 'Pre-req - Check HDD not RAW (i.e. is NTFS)
    Dim strWQLDisks 'Disks
    Dim strWQLChassis 'Machine type
    Dim strWQLID 'Unique code from OEM
    Dim strWQLProc 'is Outlook running = False
    Dim strWQLBattery 'is on Battery = False
    'State
    Const cProblem = " Problem!"
    Const cRunAgain =" RunCheck: Run System Check Again"
    Const cSuccess = " Success!"
    Const cPassed=" Pass"
    Const cFail=" Fail"
    'Pre-requisite to check: SET VALUES HERE vvvvvvvvvvvvvvvv
    Const cApprovedOEM="Hewlett-Packard"
    Const LegacyOEM1="Dell Inc."
    Const LegacyOEM2="IBM"
    Const cMinimumMemoryMB = 1000 'RAM in MB
    'Const cMinimumMemoryMB = 1000000 'force fail test data RAM in MB
    Const cMinFS="NTFS"
    ' Const cMinFS="HPFS" 'force fail test data
    Const iMinCores=1
    'Const iMinCores=10099 'force fail cores test data
    Const iMinCPUSpeed=2 '20 'in GHz
    'Const iMinCPUSpeed=90000 'in GHz
    Const iMinCPUArch=32
    'Const iMinCPUArch=64
    ' #endregion
    ' To hide anything use ID.className = "hidden", to show set to "", e.g. NotFoundArea.className = "hidden"
    Sub Window_Onload
    Err.Clear
    VersionSpan.InnerText = objOSDPreReqChecks.Version 'Get version
    self.focus
    self.moveTo 100,100 'Move window top left
    StatusBar.InnerText="Validating machine..."
    document.body.style.cursor = "wait" 'hourglass cursor
    'Call PreflightChecks 'use for testing as a VBS only, otherwise HTA timer will call below
    TimerInterval = window.setInterval("PreflightChecks",10)
    End Sub
    Function PreflightChecks
    ' #region HEADER NOTES: Persistent fold region
    'Version history
    'ver 5 OCTOBER 2011 - added error handler
    'ver 3rd Nov - removed HPonly queries
    '// Solution: Custom Script for use with MDT - Adapted from hardwareinfo.vbs Mikael Nystrom – http://deploymentbunny.com
    'Typical BIOS content
    'Processor Speed = 2133/1066 MHz
    'Boot Order = Network Controller,ATAPI CD-ROM Drive,USB device,Hard Drive,Diskette Drive,PnP Device #2,PnP Device #3,PnP Device #4,PnP Device #5,PnP Device #6,PnP Device #7,PnPe #8,PnP Device #9,PnP Device #10,PnP Device #11
    'SATA (disk) mode: *IDE,--,RAID,-- or IDE,*AHCI,RAID
    'On Error Resume Next
    ' #endregion
    ' #region CONSTANTS: Persistent fold region
    '======================================================================================
    'Fields available in HP BIOS
    Const sAsset = "Notebook Asset Tag"
    Const sOwner = "Notebook Ownership Tag"
    Const sMan = "Manufacturer"
    Const sNoteModel = "Notebook Model"
    Const sCPU = "Processor Type"
    Const sCPUSpeed = "Processor Speed"
    Const sRAM = "Memory Size"
    Const sModel = "Product Name"
    Const sBIOSName ="System BIOS"
    Const sBIOSVer = "BIOS Version"
    Const sBIOSDate = "BIOS Date"
    'Other BIOS stuff you could use too
    'Const sOwnerTag = "Enter Ownership Tag"
    'Const sBIOS = "PCID"
    'Const sBIOS = "Define Custom URL"
    'Const sBIOS = "Set Alarm Time"
    'Const sBIOS = "PCID Version"
    Const TextMode="1" 'text case sensitive for dict obj
    'WMI core constants
    Const wbemFlagReturnImmediately = 16 'wmi - Causes the call to return immediately.
    Const wbemFlagForwardOnly = 32 'wmi - Causes a forward-only enumerator to be returned.
    'Forward-only enumerators are generally much faster and
    'use less memory than conventional enumerators, but don't allow calls to SWbemObject.Clone_
    'Advisory config values - as in "you want to the change these"
    Dim strHTABootOrder
    Dim strHTASATAMode
    'Dim strHTACPU
    ' #endregion
    '======================================================================================
    ' #region WQL: Persistent fold region
    lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly
    'Queries of things to check (HP)
    strWQLBootOrder = "select Name, value from HP_BIOSSetting where Name='Boot order'"
    strWQLSATAMode = "select Name, value from HP_BIOSSetting where (Name='SATA emulation' or name='SATA device mode')"
    strWQLDisks ="SELECT * FROM Win32_DiskDrive where mediatype like 'Fixed%hard disk%'" 'win32_disk only avail after W7
    strWQLFSType ="SELECT * from Win32_LogicalDisk where DriveType='3'" 'only bother with HDDs
    'Generic WMI query strings
    strWQLGenericBIOS="SELECT Manufacturer,SMBIOSBIOSVersion,ReleaseDate FROM Win32_BIOS WHERE PrimaryBIOS = True"
    strWQLCPUCount= "SELECT NumberOfProcessors,NumberOfLogicalProcessors from Win32_ComputerSystem"
    strWQLCPUInfo="SELECT Name,DataWidth,description,MaxClockSpeed,NumberofCores,NumberOfLogicalProcessors from Win32_Processor"
    strWQLPCInfo="SELECT Domain,DomainRole,SystemType,Manufacturer,Model,TotalPhysicalMemory FROM Win32_ComputerSystem"
    ' strWQLPCInfo="SELECT Domain,DomainRole,SystemType,Manufacturer FROM Win32_ComputerSystem"
    strWQLChassis="SELECT ChassisTypes from Win32_SystemEnclosure"
    strWQLID="SELECT IdentifyingNumber,UUID from Win32_ComputerSystemProduct"
    strWQLRAM="SELECT * FROM Win32_PhysicalMemory"
    strWQLProc="SELECT * FROM Win32_Process"
    strWQLBattery="SELECT * FROM BatteryStatus Where Voltage > 0"
    ' #endregion
    ' #region MAIN algorithm
    '=====================================================================================================
    ' MAIN
    'Algorithm
    '1) Check make (vendor)
    '2) Check model (in list)
    '3) Check RAM >x
    '4) Check HDD TYPE (HDD is not RAW)
    '5) Check CPU architecture
    '6) Check outlook
    '7) Check battery
    '=====================================================================================================
    'Initialise
    window.clearInterval(TimerInterval) 'Reset timer to 0
    ' blnDebug=True
    blnDebug=False
    bAbortBuild=False 'default to DON'T abort
    ' bAbortBuild=True
    'Build list of approved vendors
    Set objApprovedMakesDict = CreateObject("Scripting.Dictionary")
    objApprovedMakesDict.comparemode=VBTextCompare
    objApprovedMakesDict.add cApprovedOEM,"OK"
    objApprovedMakesDict.add LegacyOEM1,"OK"
    objApprovedMakesDict.add LegacyOEM2,"OK"
    objApprovedMakesDict.add "Lenovo","Testdata"
    If blnDebug Then Stop
    '1) all machines check make
    strHTAVendor=fCheckVendor(strWQLGenericBIOS) 'check vendor in BIOS - if vendor not approved ABORT without proceeding
    If bAbortBuild=True Then
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - goodbye cruel world"
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Else
    StatusBar.InnerText="Vendor: " & strHTAVendor & vbTab & " " & strHTAVendorState
    '2) Discover current Model
    strHTAModel=fGetModelName(strWQLPCInfo) 'get model name from WMI
    strHTAModel=fUniversalCheckData(strHTAModel,"'Discover Model - fGetModelName'") 'validate
    Call fGetModels 'get list of all valid models (from text file)
    strHTAModel=fCheckModel(strHTAModel)
    '2a) Model number (optional)
    strHTAProduct=fGetComputerSystemProdIDNumber(strWQLID) 'manufacturer's product ID
    strHTAProduct=fUniversalCheckData(strHTAProduct,"'Discover ID - fGetComputerSystemProdIDNumber'")
    ' StatusBar.InnerText=StatusBar.InnerText & VbCrLf & vbTab & "Product Code: " & vbTab & strHTAProduct
    '3) Check installed Memory
    strHTARAM=fGetRAM(strWQLRAM) 'find RAM size
    strHTARAM=fUniversalCheckData(strHTARAM,"'Detect RAM - fCheckRAM'")
    strHTARAM=fCheckRAM(strHTARAM) 'check RAM meets req
    If strHTARAMState=cFail Then Exit Function
    '4) Disk format IS NTFS
    strDisks=fGetDrives(strWQLFSType) 'Get formatting info for all drives
    strHTACheckRAW=fUniversalCheckData(strDisks,"'Detect filesystem - fCheckNTFS'") 'Validate data
    strHTACheckRAW=fCheckNTFS(strDisks) 'Check FS format is acceptable (not RAW)
    If strHTACheckRAW=cFail Then Exit Function
    'Generic CPU calls
    strHTACPUFullInfo="CPUs:" & fGetCPUInfo(strWQLCPUInfo) & " with CPU cores:" & iCPUCoreCount
    strBIOSInfo="BIOS version: " & strBIOSver & ", dated " & strBIOSDate
    '5a) CPU Speed check (info from http://www.robvanderwoude.com/wmiexamples.php)
    strCPUInfo=WMI(strWQLCPUInfo,strNamespace) 'Get CPU details
    strTemp=split(strCPUInfo,"@"): strHTACPUSpeed=strTemp(1)
    strHTACPUSpeed=fUniversalCheckData(strHTACPUSpeed,"'Check processor - fCheckCPUSpeed'") 'Validate data
    strHTACPUSpeed=fCheckCPUSpeed(strHTACPUSpeed) 'Check CPU clock speed
    '5b) cores check
    strHTACPUCores=fUniversalCheckData(iCPUCoreCount,"Check core count - fCheckCores") 'Validate data
    iCPUCoreCount=fCheckCores(iCPUCoreCount) 'pass or fail?
    '5c) CPU address width
    strHTAArchitecture=fUniversalCheckData(strHTAArchitecture,"Check core count - fCheckCores") 'Validate data
    strHTAArchitecture=fCheckCPUArch(strHTAArchitecture)
    '6) Check outlook
    strHTAOutlook=fCheckProcess(strWQLProc)
    '7) Check Battery
    strHTABattery=fCheckBattery(strWQLBattery)
    'end checkss
    document.body.style.cursor = "default"
    'Display hardware values in GUI (in table)
    Vendor.innerhtml = strHTAVendor 'Use str...var..STATE if you want Pass/fail text instead
    Model.innerhtml = strHTAModel
    Product.innerhtml = strHTAProduct
    RAM.innerhtml = strHTARAM
    CPUspeed.innerhtml = strHTACPUSpeed
    CPUInfo.innerhtml = strHTACPUFullInfo
    HDDFS.innerhtml = strHTACheckRAW
    CapableArchitecture.innerhtml=strHTAArchitecture
    BIOSversion.innerhtml = strBIOSver
    BIOSDate.innerhtml = strBIOSDate' CPUName.innerhtml = strCPUDesc 'GetCPUName
    End If
    '======================================================================================
    ' #endregion
    End Function
    'generic WMI queries, by field and namespace
    Function WMI(strQuery,strNameSpace)
    'Aim: generic WMI calls
    'return value of BIOS
    On Error Resume Next
    Dim colItems,objItem
    Dim objWMI
    Const strService = "winmgmts:{impersonationlevel=impersonate}//" 'binding to WMI
    Const strComputer = "." 'this machine
    Set objWMI = GetObject(strService & strComputer & strNamespace) 'GLOBAL wmi
    Set colItems = objWMI.ExecQuery(strQuery,,lFlags)
    For Each objItem In colItems
    If Err Then
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "WMI query: " & strQuery & " in " & strNamespace & objItem.Name
    Call ErrHandler("WMI error " & strQuery,1)
    Else
    WMI=objItem.Name 'Return value
    End If
    Next
    End Function
    Function fGetModelName(strWQLPCInfo)
    'Aim: Get model name from BIOS - WMI field sometimes varies if laptop, so try two
    'Return STRING: Model string from BIOS or "UNKNOWN" if null
    On Error Resume Next
    Dim colPCInfo,objPCItem
    Dim strModel
    Set colPCInfo = GetObject("winmgmts:").ExecQuery(strWQLPCInfo,"WQL",lFlags)
    If Err Then
    Call ErrHandler("fGetModelName: Error querying WMI " & strWQLPCInfo,2)
    Else
    For Each objPCItem In colPCInfo
    If Not IsNull(objPCItem.Model) Then
    strModel=objPCItem.Model
    ' iRAM=objPCItem.TotalPhysicalMemory
    Else
    If (strHTAVendor=cApprovedOEM And IsLaptop = True) Then ' resort to HP specific query for older laptops
    'Notebook
    strModel=QueryHPBIOS(sNoteModel)
    if strModel="" then strModel=QueryHPBIOS(sModel) 'try alt value
    Else
    strModel=QueryHPBIOS(sModel)
    End If
    End If
    Next
    End If
    If strModel = "" Then
    fGetModelName = "UNKNOWN"
    Model.style.visibility="hidden"
    Else
    fGetModelName=strModel
    End If
    End Function
    '====================================================
    '====================================================
    Function fGetRAM(strQuery)
    'Aim: get RAM installed. NB Win32_ComputerSystem::TotalPhysicalMemory may not be accurate
    'Return integer
    On Error Resume Next 'equiv to Err.Clear
    Dim colItems, item
    Dim iTotalMemory
    Set colItems = GetObject("winmgmts:").ExecQuery(strQuery,"WQL",lFlags)
    If Err Then
    Call ErrHandler("fGetRAM: Error querying " & strQuery,2)
    Else
    iTotalMemory = 0
    For Each item In colItems
    iTotalMemory = iTotalMemory + CDBL(item.Capacity)/(1024^2)
    Next
    End If
    If iTotalMemory = "" Then
    fGetRAM = "RAM UNKNOWN"
    RAM.style.visibility="hidden"
    Else
    fGetRAM=iTotalMemory
    End If
    End Function
    '====================================================
    '====================================================
    Function fGetCPUInfo(strQuery)
    'Aim: query WMI for CPU info - number and number of cores
    'Return: function=CPU count, var for the cores: iCPUCoreCount, strHTAArchitecture, strCPUDesc
    On Error Resume Next
    Dim colItems, objItem
    Dim NumberOfProcessors
    Set colItems = GetObject("winmgmts:").ExecQuery(strQuery,"WQL",lFlags)
    If Err Then
    Call ErrHandler("GetCPUInfo: Error querying " & strQuery,2)
    Else
    For Each objItem In colItems
    If Err Then
    Else
    If Not IsNull(objItem.NumberOfCores) Then
    NumberOfProcessors = Trim(objItem.NumberOfCores) 'NumberOfProcessors
    End If
    If Not IsNull(objItem.NumberOfLogicalProcessors) Then
    iCPUCoreCount = Int(Trim(objItem.NumberOfLogicalProcessors))
    End If
    If Not IsNull(objItem.DataWidth) Then
    strHTAArchitecture=Trim(objItem.DataWidth) & "-bit"
    End If
    If Not IsNull(objItem.description) Then
    strCPUDesc = Trim(objItem.description) 'cpu name
    End If
    End If
    Next
    If NumberOfProcessors = "" Then
    NumberOfProcessors = "UNKNOWN"
    End If
    fGetCPUInfo = Int(NumberOfProcessors)
    ' iCPUCoreCount = Int(NumberOfLogicalProcessors)
    End If
    End Function
    '====================================================
    '====================================================
    Function fGetComputerSystemProdIDNumber(strWQLID)
    'Aim: Get UUID from Win32_ComputerSystemProduct
    'Return: great big integer
    Dim colSys,objSys
    Dim strUUID
    On Error resume next
    Set colSys = GetObject("winmgmts:").ExecQuery(strWQLID,"WQL",lFlags)
    If Err then
    Call ErrHandler("fGetComputerSystemProdIDNumber: Error querying " & strWQLID,2)
    Else
    For Each objSys In colSys
    If Not IsNull(objSys.IdentifyingNumber) Then
    strUUID = Trim(objSys.IdentifyingNumber)
    End If
    Next
    If strUUID = "" Then
    fGetComputerSystemProdIDNumber = "UNKNOWN"
    Else
    fGetComputerSystemProdIDNumber = strUUID
    End If
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fGetDrives(strQuery)
    Dim colDisks,objHDD
    Dim strDriveType, strDiskSize, strDisk
    Dim strDiskFSType
    Dim iGBUnits
    On Error Resume Next
    iGBUnits=1073741824
    Dim iRAW
    iRAW=0
    Set colDisks = GetObject("winmgmts:").ExecQuery(strQuery)
    For Each objHDD In colDisks
    Select Case objHDD.DriveType
    Case 1 strDriveType = "Drive could not be determined."
    Case 2 strDriveType = "Removable Drive"
    Case 3 strDriveType = "Local hard disk."
    Case 4 strDriveType = "Network disk."
    Case 5 strDriveType = "Compact disk (CD)"
    Case 6 strDriveType = "RAM disk."
    Case Else strDriveType = "Drive type Problem."
    End Select
    strDiskFSType = objHDD.FileSystem
    'Find C
    If objHDD.Name="C:" Then
    If isNull(objHDD.FreeSpace) Then
    If blnDebug=True then Call ErrHandler("ALERT!! Volume " & objHDD.Name & "is RAW",1) 'Abort/clean
    fCheckDrives="ALERT!! Volume " & objHDD.Name & "is RAW"
    End If
    End If
    strDiskSize = Int(objHDD.Size /iGBUnits) & "GB" 'calc size of disk
    strDisk = strDisk & VbCrLf & "Vol " & objHDD.Name & " (" & strDriveType & ") size: " & strDiskSize & " (free: " & Int(objHDD.FreeSpace /iGBUnits) & "GB), " & strDiskFSType
    fGetDrives=strDisk
    Next
    If (Err.Number <>0) Then
    Call ErrHandler("WMI Property Query Error: [" & Err.Number & "]",2)
    fGetDrives = -1
    Exit Function
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fUniversalCheckData(varData,strStage) 'template
    'Aim: Check value passed...
    'is not blank
    'is in range x..y
    'spelt OK
    'is in a list
    'format is text, numeric
    'return: string: the original value
    On Error Resume Next
    Dim Err
    if blnDebug Then StatusBar.InnerText = StatusBar.InnerText & VbCrLf & "Validating " & strStage & " data..."
    If Err Then
    Call ErrHandler("WARNING: Error discovering value in " & strStage,2) '1=Quit,2=Warn
    strHTAModel="Unknown"
    Else
    Select Case varData
    Case IsEmpty(varData) Or IsNull(varData)
    Call ErrHandler("WARNING: Error in "& strStage,2) '1=Quit,2=Warn
    fUniversalCheckData="Unknown"
    Case IsNumeric(varData)
    If varData<0 Then
    Call ErrHandler("WARNING: Value negative"& strStage,2) '1=Quit,2=Warn
    fUniversalCheckData="Unknown"
    End if
    ' & varData &
    Case IsDate(varData)
    Case Else
    fUniversalCheckData=varData 'Data OK - return value unchanged
    End Select
    End If
    End Function
    '=================================================================================
    'Checks - follow if true DO, if false warn/abort
    '=================================================================================
    Function fCheckBattery(strQuery)
    'Aim: Find if battery is running
    'Return pass/fail
    On Error Resume Next 'equiv to Err.Clear
    Const wbemFlagReturnImmediately = &h10
    Const wbemFlagForwardOnly = &h20
    Dim colItems, item
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
    Set colItems = objWMIService.ExecQuery("SELECT * FROM BatteryStatus Where Voltage > 0", "WQL", _
    wbemFlagReturnImmediately + wbemFlagForwardOnly)
    For Each item In colItems
    if objItem.PowerOnline = True Then
    strHTABattery=objItem.PowerOnline
    strHTABatteryState = cFail
    Err.Raise 9010,"fCheckBattery",strHTABattery & " Laptop running on battery. OSD Cannot continue."
    Call ErrHandler(ucase(strHTABatteryState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - Laptop on Battery. Please plug into an outlet before proceeding."
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Else
    strHTABatteryState = cPassed
    End if
    Next
    fCheckBattery=strHTABattery
    End Function
    '====================================================
    Function fCheckProcess(strQuery)
    'Aim: Find if outlook is running
    'Return pass/fail
    On Error Resume Next 'equiv to Err.Clear
    Dim colItems, item
    Set colItems = GetObject("winmgmts:").ExecQuery(strQuery,"WQL",lFlags)
    For Each item In colItems
    if item.Name = "OUTLOOK.EXE" Then
    strHTAOutlook=item.Name
    strHTAOutlookState = cFail
    Err.Raise 9010,"fCheckOutlook",strHTAOutlook & " running. OSD Cannot continue."
    Call ErrHandler(ucase(strHTAOutlookState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - Outlook Running, please close outlook before proceeding."
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Elseif item.Name = "communicator.exe" Then
    strHTAOutlook=item.Name
    strHTAOutlookState = cFail
    Err.Raise 9010,"fCheckOutlook",strHTAOutlook & " running. OSD Cannot continue."
    Call ErrHandler(ucase(strHTAOutlookState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - Communicator Running, please close OCS before proceeding."
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Else
    strHTAOutlookState = cPassed
    End if
    Next
    fCheckProcess=strHTAOutlook
    End Function
    '====================================================
    '1 - Make
    Function fCheckVendor(strVendor)
    'Aim: Check make is one the OS/build is designed For
    'Return: STRINGS for "Make", BIOS version and BIOS date (generic): strHTAVendorState pass or fail
    On Error Resume Next
    Dim colItems,objItem
    Set colItems = GetObject("winmgmts:").ExecQuery(strVendor, "WQL", lFlags)
    For Each objItem In colItems
    strHTAVendor=objItem.Manufacturer
    if objApprovedMakesDict.exists(strHTAVendor) then
    strBIOSver=objItem.SMBIOSBIOSVersion
    strBIOSDate=Mid( objItem.ReleaseDate, 5, 2 ) & "/" & Mid( objItem.ReleaseDate, 7, 2 ) & "/" & Left( objItem.ReleaseDate, 4 )
    strHTAVendorState=cPassed
    Else
    strHTAVendorState=cFail
    Err.Raise 9010,"fCheckVendor",strHTAVendor & " found. The build will not work on this make of hardware"
    Call ErrHandler(ucase(strHTAVendorState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    bAbortBuild=True
    end if
    Next
    fCheckVendor=strHTAVendor
    End Function
    '=================================================================================
    '=================================================================================
    '2 - Models check
    Function fCheckModel(strThisModel)
    'Aim Check target machine is in list of models
    'Return string
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking model..." & VbCrLf
    If objModelsDict.exists(trim(strThisModel)) then ' if current model in objDict then huzzah
    strHTAModelState=cPassed
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "Model detected: " & vbTab & strHTAModelState
    Else
    strHTAModelState=cFail
    Err.Raise 9010,"fCheckModel",strThisModel & " found. The build will not work on this model of hardware"
    Call ErrHandler(ucase(strHTAModelState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    end if
    fCheckModel=strHTAModel
    End Function
    '=================================================================================
    '=================================================================================
    '3 - RAM
    Function fCheckRAM(strRAM)
    'Aim: Check installed RAM > x
    'Return string digits with units, e.g. 4GB
    'use strHTARAM for value
    '==================================================================
    ' Memory Preflight Check (from MDT2012)
    '==================================================================
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking RAM..."
    If Err.Number <> 0 Then
    Call ErrHandler("Error occurred while calculating computer's memory.",2)
    End If
    fCheckRAM = Int(strRAM/1024) & "GB" 'format in GB
    If Int(strRAM) > cMinimumMemoryMB Then
    strHTARAMState=cPassed 'Sufficient memory - show whole number in GB"
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "RAM installed: " & vbTab & strHTARAMState
    Else
    strHTARAMState=cFail
    Err.Raise 9030 ,"fCheckRAM","Not enough memory in this machine!" & " Required physical memory is: " & cMinimumMemoryMB & " MB."
    Call ErrHandler(ucase(strHTARAMState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1) 'abort build
    End If
    End Function
    '=================================================================================
    '=================================================================================
    '4 - NTFS disk
    Function fCheckNTFS(strDiskFS)
    'Aim: Check HDD is NTFS
    'Return string
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking file system is not RAW..."
    If Instr(1,strDiskFS,cMinFS,VBTextCompare)<>0 Then
    fCheckNTFS=cMinFS 'disk format is OK (NTFS)
    StatusBar.InnerText=StatusBar.InnerText & vbTab & " File system: " & cPassed
    Else
    fCheckNTFS=cFail
    Err.Raise 9040 ,"fCheckNTFS","WARNING: Disk not correct file-system. Type required is: " & cMinFS & "." & VbCrLf & _
    "The deployment will fail unless you reformat the target disk immediately."
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",2) 'halt build
    End If
    End Function
    '====================================================
    '=================================================================================
    '5 - CPU checks
    '=================================================================================
    Function fCheckCPUSpeed(strCPU) 'any HW
    'Aim: Check CPU speed
    'Return string = number + appropriate units, e.g. 5HGz (strCPU)
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking CPU spec..."
    Select Case Right(strCPU,3) 'check units
    Case "MHz"
    strCPU=Left(strCPU,4)/1000 'reformat to GHz
    Case "GHz"
    strCPU=strCPU 'unit already OK
    Case Else
    Call ErrHandler("CPU units are unknown",2)
    End Select
    'Check clock speed
    If Int(Left(trim(strCPU),1))>=iMinCPUSpeed Then
    fCheckCPUSpeed=strHTACPUSpeed 'CPU is fine i.e don't change value
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "CPU Speed: " & cPassed
    Else
    fCheckCPUSpeed=cFail 'already in GHz
    Err.Raise 9050,"fCheckCPUSpeed","CPU speed pre-requisite failed. Minimum processor clock speed is: " & iMinCPUSpeed
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1) 'halt build
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fCheckCPUArch(strCPUArch) 'any HW
    'Aim: Check CPU width
    'Return string
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking CPU bus width..."
    'Check clock speed
    If Int(Left(trim(strCPUArch),2))>=iMinCPUArch Then
    fCheckCPUArch=strHTAArchitecture 'CPU is fine i.e don't change value
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "CPU width: " & cPassed
    Else
    fCheckCPUArch=cFail 'already in GHz
    Err.Raise 9052,"fCheckCPUArch","CPU width pre-requisite failed. Minimum processor width required is: " & iMinCPUArch
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1) 'abort build
    End If
    End Function
    '=================================================================================
    Function fCheckCores(iCores)
    'Aim: Check hardware (CPU) has a minimum number of cores
    'Return Integer
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking CPU cores..."
    If iCores>=iMinCores Then
    fCheckCores=iCores
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "Core count: " & vbTab & cPassed
    'StatusBar.InnerText=StatusBar.InnerText & vbTab & "CPU cores: " & cPassed
    Else
    fCheckCores=cFail
    Err.Raise 9051,"fCheckCores","WARNING: Not enough cores on the CPU to support the build. Minimum CPU cores is: " & iMinCores
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",2) 'halt build
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fCheckHPCPUSpeed 'HP ONLY
    'Aim: Check CPU speed
    'return: string
    'Check CPU speed
    On Error Resume Next
    strWQLCPU = "processor speed"
    strTemp=QueryHPBIOS(strWQLCPU,"")
    Select Case Right(strTemp,3)
    Case "MHz"
    strTemp=Left(strTemp,4)/1000 'reformat to GHz
    Case "GHz"
    strTemp 'is OK
    Case Else
    Call ErrHandler("CPU is unknown",2)
    End Select
    'Check clock speed
    If strTemp>=iMinCPUSpeed Then
    fCheckCPUSpeed= strTemp & "GHz"
    Else
    Err.Raise 9050,,"CPU speed pre-requisite failed"
    Call ErrHandler("CPU is too slow",1)
    fCheckCPUSpeed=cFail 'already in GHz
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fGetModels
    'Aim: Read external text file
    'return: dictionary object - models as key, integer as value e.g. Dell Optiplex,12
    'On Error Resume Next
    Dim objFSO
    Dim objFile
    Dim strFile
    Dim strEntry
    Dim n
    Dim strfilepath
    Dim iLineCount 'count lines to avoid listing first item with ,.
    Set objModelsDict = CreateObject("Scripting.Dictionary")
    set objFSO=CreateObject("Scripting.FileSystemObject")
    Const ForReading=1
    strfilepath = Left(window.location.pathname,InStrRev(window.location.pathname,"\"))
    strFile=strfilepath & "Models.txt"
    set objFile=objFSO.OpenTextFile(strFile,ForReading)
    iLineCount=0
    'read in each line of data until you reach the end of the file
    do While objFile.AtEndOfStream<>True
    strEntry=objFile.ReadLine
    'you can now do what ever you want with the line as referenced with the strEntry variable such as
    'echoing it back (e.g. wscript.Echo strEntry) or passing it as a variable to a function of subroutine (e.g. MyFunction strEntry)
    objModelsDict.comparemode=VBTextCompare
    objModelsDict.Add strEntry,iLineCount
    iLineCount=iLineCount+1
    If blnDebug then
    If iLineCount=1 Then
    StatusBar.InnerText=trim(strEntry)
    Else
    StatusBar.InnerText=StatusBar.InnerText & ", " & trim(strEntry) 'list models
    End If
    End If
    Loop
    objFile.Close
    End Function
    '=================================================================================
    '=================================================================================
    '====================================================
    Function ErrHandler(strErrorMsg,iErrMode)
    'Aim: to handle error states
    ' 1 = Abort
    ' 2 = Warn
    'Return 'Appropriate text message explaining the error
    '====================================================
    Const msgTitle="SCCM Deployment Preflight Checklist"
    'On Error Resume Next '< don't use that as we want to KEEP the error properties
    'Abort=1
    If iErrMode=1 Then
    StatusBar.InnerText=strErrorMsg 'overwrite status with Error message
    ' StatusBar.InnerText=StatusBar.InnerText & VbCrLf & " " & strHTAOutlook & " " & strHTAVendor & " " & strHTAVendorState & _
    ' VbCrLf & " " & strHTAModel & strHTAModelState & _
    ' VbCrLf & " " & strHTARAM & strHTARAMState & _
    ' VbCrLf & " " & strHTAHDD & strHTAHDDState
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript") 'Abort (close) after n seconds
    'MsgBox strErrorMsg,vbExclamation,msgTitle
    'ErrBar.class=""
    ElseIf iErrMode=2 Then
    'Warning
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & strErrorMsg & " " '& "(" & Err.Description & " :" & Err.Number & ")"',vbExclamation,msgTitle
    Err.Clear
    End If
    End Function
    '====================================================
    Sub Abort
    'Aim: Quit gracefully
    window.close()
    End Sub
    </script>
    <!-- #region BODY -->
    <body>
    <br />
    <div>
    <span style="version"> <span id="VersionSpan"></span></div>
    <div style="text-align: center;">
    <H1 style="font-family: Arial, Helvetica, sans-serif; font-size: large; text-align: center; color: #000000; text-transform: capitalize">System information</H1>
    <span>
    <table border="1" cellspacing="0" cellpadding="0" style="width: 912px"
    id="SysInfoTable">
    <tr class="h1">
    <td align="right" class="Header1" style="width: 76px; height: 18px">
    </td>
    <td align="right" class="Header1" style="height: 18px"><em id="VendorCaption">Vendor</em></td>
    <td align="left" class="style2" style="height: 18px"><span id="Vendor"></span></td>
    <td align="right" class="Header2" style="height: 18px"><em id="ModelCaption">Model</em></td>
    <td align="center" class="style4" style="width: 400px; height: 18px"><span id="Model"></span></td>
    </tr>
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="ProductCaption">Product ID</em></td>
    <td align="left" class="style2"><span id="Product"></span></td>
    <td align="right" class="Header2"><em id="RAMCaption">Memory(in MB)</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="RAM"></span></td>
    </tr>`
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="CPUCaption">CPU speed (in GHz)</em></td>
    <td align="left" class="style2"><span id="CPUspeed"></span></td>
    <td align="right" class="Header2"><em id="CPUInfoCaption">No: CPU\Cores</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="CPUInfo"></span></td>
    </tr>
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="DiskFSCaption">Filesystem info</em></td>
    <td align="left" class="style2"><span id="HDDFS"></span></td>
    <td align="right" class="Header2"><em id="CapableArchCaption">Architecture</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="CapableArchitecture"></span></td>
    </tr>
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="BIOSVerCaption">BIOS version</em></td>
    <td align="left" class="style2" ><span id="BIOSVERSION"></span></td>
    <td align="right" class="Header2"><em id="BIOSDateCaption">BIOS Date</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="BIOSDate"></span></td>
    </tr>
    </table>
    </span>
    </div>
    <div class="StatusBar">
    <br />
    <Span id="StatusBar">Loading...please wait.</Span>
    </div> <br><br>
    <div align="center">
    <input type="button" name="btnStop" id="btnStop" value="Continue" onclick="Abort">
    <input type="Button" value="Re-Scan Machine" name="button1" onClick="Window_Onload" class="button">
    </div>
    </body><!-- #endregion -->
    </html>

  • HELP my ipod keeps going into restore mode

    hi i have a problem with my ipod touch 2nd generation firmware 3.1.2. it keeps going into restore mode randomly when i play with ir or use it. i upgraded and downgrade and nothing seems to work. i think there is a problem with the hardware!
    oh and when i bought it there was a problem with the headphone jack(brand new)
    and nobody would help. i had warranty to. we live in a cruel world. =(

    Yesh, take it to the Apple Store and make a fuss.

  • Web Service - Errors

    Please help - my Flex trial is about to run out and if I
    can't get this to work, our company will not buy Flex :-(
    In summary, I am getting the following error when attempting
    to call a web service:
    [WSDLError faultString="Element
    http://tempUri2.org/:TestMethodResponse
    not resolvable" faultCode="WSDL.BadElement" faultDetail="null"] ...
    I then get some WSDLParser errors.
    The web service has been implemented as a SQL Server 2005
    Endpoint.
    In SQL Server 2005 the HTTP/SOAP endpoints feature lets you
    consume Web services mapped to objects in SQL Server. Unlike
    earlier versions, IIS is no longer required. The Windows Server
    2003 kernel listener, HTTP.sys, lets SQL Server listen for HTTP
    requests and process them directly.
    There seems to be some connection between Flex and the WS
    being made as the "TestMethodResponse" is defined in the wsdl. I
    understand that I probably need to have an crossdomain.xml
    somewhere but don't know where to put it as there is no web server
    involved.
    Has anyone worked with Flex and SQL Server 2005 endpoints? Is
    it possible to achieve what i'm trying to do?
    Any help will be immensely appreciated ... time is running
    out and if this doesn't work, it's back to boring old reporting
    services for me.
    Hec

    Cheers for the reply,
    I am using Flex 2 with charting - no data services. I can
    load the wsdl from a browser.
    Using XML Spy I can create a SOAP request and receive a
    reply. I'm guessing that Flex just doesn't like the format of the
    wsdl and maybe won't be able to access the Web Service directly?
    Details below.
    Regards
    Hec
    Soap Request:
    =============
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="
    http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema">
    The response is:
    ===============
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xml:space="preserve" xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:sql="
    http://schemas.microsoft.com/sqlserver/2004/SOAP"
    xmlns:sqlsoaptypes="
    http://schemas.microsoft.com/sqlserver/2004/SOAP/types"
    xmlns:sqlrowcount="
    http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount"
    xmlns:sqlmessage="
    http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage"
    xmlns:sqlresultstream="
    http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream"
    xmlns:sqltransaction="
    http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction"
    xmlns:sqltypes="
    http://schemas.microsoft.com/sqlserver/2004/sqltypes"
    xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:method="
    http://tempUri2.org/">
    <SOAP-ENV:Body>
    <method:TestMethodResponse>
    <method:TestMethodResult xmlns="">
    <sqlresultstream:SqlXml
    xsi:type="sqlsoaptypes:SqlXml">
    <SqlXml>
    <Test>
    <T1 Column1int="1" column2char="Hello "
    Column3nvarchar="World">
    <T2>4</T2>
    </T1>
    <T1 Column1int="2" column2char="Good Bye "
    Column3nvarchar="Cruel World">
    <T2>4</T2>
    </T1>
    <T1 Column1int="3" column2char="It's a "
    Column3nvarchar="Funny Old world">
    <T2>4</T2>
    </T1>
    </Test>
    </SqlXml>
    </sqlresultstream:SqlXml>
    <sqlresultstream:SqlRowCount
    xsi:type="sqlrowcount:SqlRowCount">
    <sqlrowcount:Count>3</sqlrowcount:Count>
    </sqlresultstream:SqlRowCount>
    <sqlresultstream:SqlResultCode
    xsi:type="sqlsoaptypes:SqlResultCode">0</sqlresultstream:SqlResultCode>
    </method:TestMethodResult>
    </method:TestMethodResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    <SOAP-ENV:Body>
    <m:TestMethod xmlns:m="
    http://tempUri2.org/"/>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    My Flex code is:
    ===============
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*"
    pageTitle="Test"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    private namespace nstest = "
    http://tempuri.org/";
    use namespace nstest;
    ]]>
    </mx:Script>
    <mx:WebService id="wsTest"
    wsdl="
    http://csodevsql2/Test?wsdl"
    useProxy="false">
    <mx:operation name="TestMethod">
    <mx:request>
    <TestMethodResponse>
    <body>
    </body>
    </TestMethodResponse>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Panel x="10" y="10" width="475" height="400"
    layout="absolute" title="WS Test">
    <mx:Button x="30" y="30" label="Get WS Info" width="103"
    height="21"
    click="wsTest.TestMethod.send()" tabIndex="4"
    color="#008000"/>
    <mx:DataGrid x="30" y="75" id="dgTopPosts" width="400"
    dataProvider="{wsTest.TestMethod.lastResult}" height="87">
    <mx:columns>
    <mx:DataGridColumn headerText="Column 1"
    dataField="column2char"/>
    <mx:DataGridColumn headerText="Column 2" dataField="
    Column3nvarchar"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Panel>
    </mx:Application>

  • Redirect, System.out  ?

    Hi.
    I want to redirect System.out to a Swing Component like JTextArea, etc.
    try with printstream, Reader, etc. but i dont know how.!.
    I want to see, messages (The standard out) in a Swing Component.
    plis some help..
    tnks.

    I was using the Redirect method you made edna for my software and it works wonderfully when using strings, unfortunately I ran in to a strange problem which is fitting since my current objective is very strange.
    I am writing a piece of software that has an embedded jython interpreter in it. When I execute my jython scripts all the output went to the console and I had no direct way of saying append to this particular text area since I wasn't able to pass my Java GUI class in to the script.
    Thus redirecting my output with your method came in quite handy. This is where the problem comes in. I tried the println function in my regular java classes and all the primitive types worked fine, but within in the script only String worked. Here is the code for the println function
    PrintStream stdout = new PrintStream(System.out) {
       public void println(String x) {
          outputTextArea.append(x + "\n");
       public void println(int x) {
          outputTextArea.append(x + "\n");
       public void println(boolean x) {
          outputTextArea.append(x + "\n");
       public void println(Object x) {
          outputTextArea.append(x.toString() + '\n');
    };Here is the sample Jython code:
    import JythonScripter
    System.out.println(4) #fails to print correctly
    System.out.println("HelloWorld") #works
    System.out.println(10) #fails
    System.out.println("Goodbye Cruel World") #works
    If you have any advice on why strings would work but not other types I would greatly appreciate it.

  • NVROM virus on iBook G4 ??

    Hello cruel cruel World .
    I have tried with 4 different versions of Linux or UNIX for PowerPC .
    Before that , I tried to dual-boot with a de-facto Mac OS 10.5.(?) Leopard for PowerPC .  I picked a BSD UNIX OS .
    Initially it worked then it froze and the hard drive crashed (FAT broke.)   Perhaps a rouge versioning .
    Then I used a LIVE CD of UNIX PowerPC which on the Home Site said it has a GUI with the text prompt command window .  It was false there was only a text mode prompt .  During installation without a-priori mandate asked for my PASSWORD to MY ROUTER !
    After that I have tried using LIVE CD and it does not install .  And the command prompt at the BIOS screen did alll types of weird things due to what I suspicious of as NVROM virus .
    I definitely wants the original Leopard OS not an imitator(?)
    Bye cruel world .

    Make sure the iBook is capable of running Mac OS X 10.5.
    http://support.apple.com/kb/HT3759?viewlocale=en_US
    If so, Leopard is probably going to cost you more than the iBook is worth.
    http://www.amazon.com/Mac-OS-Leopard-10-5-10-51/dp/B0012RAVRC/ref=sr_1_1?ie=UTF8 &qid=1333402880&sr=8-1
    http://hardcoremac.stores.yahoo.net/macosx10le.html

  • Importing RAW files into iPhoto'08

    I'm trying to import photo's taken in a RAW format from my Canon 550d into iPhoto'08 and all the time after trying to move the photo into an album I get an error message saying 'unable to import unreadable file'.
    could this be due to a software update needed for iPhoto'08 for the 550d which I have yet to install?
    I have noticed on occasion, a software update would come up to support other camera's when using RAW files.

    since I've downloaded the trial version of Aperture 3 I have noticed I can now import and work on RAW images taken off my 550d in iPhoto '08.
    so it seems thats a way to get it to work. although now that I'm using Aperture 3 (just the trial version for now), I do not want to go back to using iPhoto '08! lol, its a cruel world...

  • Replacing an optical drive

    Hi! Any advice anyone can offer me on this would be very welcome.
    The internal optical drive in my G5 has died and I need to replace it. I've never had to do this before, and am flummoxed as to what I need.
    My system profiler says that the current drive is a Pioneer DVD-RW DVR-106D. Having looked on the Apple and Pioneer sites, I cannot find this model, so I assume it is now obsolete. Actually, I can't find any optical drives on the Apple site (?).
    Anyway - I don't want to order the wrong thing and then find it doesn't work, or doesn't fit. Can anyone tell me what I should be looking for? Any details on the specification, etc. that I should ask a manufacturer about?
    I realise this is vague, I'm just not sure where to start.
    Thanks in advance,
    Mira
    1.8 GHz PowerPC G5   Mac OS X (10.2.x)   1.67 GHz PowerBook G4 Mac OS x (10.4.6)

    It is a cruel world.
    Tiger DVD comes as 10.4.6 and you can happily use your system and optical drive without need for further patching!
    David Pogue's "Mac OS X: The Missing Manual (Tiger Ed.) is a good handbook to have.
    http://www.apple.com/macosx/resources
    Have you visited these news sites?
    http://www.xlr8yourmac.com
    http://www.macintouch.com
    http://www.macfixit.com
    Some references from MacGurus:
    Guide to Panther Upgrade
    Guide to Tiger Upgrade
    Index to Tiger Reference
    OS X Troubleshooting

  • Skype video call Blackmail

    I know skype cant do much about it. but firstly I'd like to suggest everyone post up all information you can regarding the pursuer so that everyone else can go on skype look them up and block/report them. Their accounts are usually fairly obvious once you have become a victim.
    FIRST PROTECT YOURSELF!
    DO NOT SEND MONEY. DO NOT SUPPORT THEIR THREATS. THIS WILL PROMOTE THEM TO CONTINUE. 
    Delete/block all connections you have with the pursuer. Be it any/All social networks with linked names or information you have posted up publicly. Secondly if you cannot delete these accounts/deacctivate it, change you private settings. 
    CEASE ALL COMMUNICATION with them as soon as you have done this.
    They also recycle photos with different names.
    I have been scammed by Aliacate William, Aliacate19 = Skype user name
    extortion for hundreds of dollars.
    Aliacate19 (Aliacate William) on skype
    CA, United States & Los Angeles
    April-17 88
    Age 26 
    Female
    Related website: [Link to "badoo" website removed by Moderator.]
    PLEASE search for these scammers and block/report them from everything! It won't do much about what was recorded but you may save others from falling victim.
    Also follow what Skype recommends, EMAIL [e-mail removed for privacy and security] to reinforce the investigations.
    IF you do some how find your video has gone online you should proceed with contacting police about Cyber extortion. They are criminals and not to be taken lightly.
    "Hello,
    If you are being blackmailed you should first contact the Police. Skype will ONLY become involved if requested to do so by them.
    p.s. No duplicates please. Duplicate removed."  - http://community.skype.com/t5/Security-Privacy-Trust-and/Blackmail-scammer/td-p/2853839
    Post up your criminal and help support eachother! This is a cruel world, but we'll find a way to fight back.

    I just had nora.cante76 or something similar trying to add me to skype with the message: "Hi it's me again. Add me!!!!" I blocked the account straightaway.
    Giving into their threats is the worse thing you can do. Now I will need to shut down my current skype account and start up a new one using a different name and email address otherwise this scumbag will continue to harass me.
    I found out via the scam survivors site that Nora Cante or the nomenclature to that affect is a Morrocan guy who goes under the aliases of Mario Dissoza or Marwan Dissoza. You can see his photo here :http://www.scamsurvivors.com/forum/viewtopic.php?f=20&t=24583&p=72811
    I did a google and facebook search on him and wasn't able to find his account (probably been shut down) but I was able to find a trace link to a facebook like of photos of a football match or something called Zona Clandestine in El Jadida, Morroco which was one of the places he wanted money to be sent to. He is also associated with Khouribga, Morroco. Very likely this is where he lives.
    A google search of Marwan Dissoza brings up his account on Facebook basic though it isn't actually there when you click on it suggesting his account was deactivated. Most likely by Facebook.
    Other aliases are Anime Idris Kamel and Mouab Khabsi. Most likely one times uses.
    Marwan Dissoza does seem to be closer to his real name as I also found his details on some sort of dating site: http://www.meetme.com/member/77885488
    He also appears to have a google+ account.
    Judging by his name he's a spanish Morrocan. He appears to have good english and IT savvy though he's not that good as he wasn't able to entirely erase his digital footprint.
    Nonetheless this guy is scum of the lowest order and any of his nora cante aliases is to be avoided at all costs.
    My incident started on Chat roulette. I have since stopped using it. My advice to anyone using Chat roulette is to avoid it at all costs. If you feel comfortable using then do not give out your email under any circumstances. If the so-called girl or boy you're chatting says they can't find your skype name its a trap. Just move on. I was so close to clicking 'next' and boy do I wish I had! The fake cam seems so convincing. It never occurred to me that someone could record your skype video call and use that against you.
    I sincerely hope no one else falls victim to this disgusting filth. I think we need to push Skype hard to put out a message to all users on their site to steer clear of all accounts named nora cante.

  • Indecipherable core dump on Solaris x86_64

    On a 64-bit Solaris x86 machine (SunOS tempest-solaris 5.10 Generic_141445-09 i86pc i386 i86pc Solaris), I have been running gcc 4.3.4 (configured for i686-pc-solaris2.10) without a hitch. Both dbx 7.8 and gdb 7.1 are able to read core dumps created from a simple "goodbye, cruel world" program (kind of like "hello world", but it dereferences NULL at the end) built with gcc -m64 -g. However, with a more complex program, neither gdb nor dbx are able to figure it out core dumps (though they can debug it just fine if I set a breakpoint in main and start the program in the debugger).
    gdb's failure looks like this:
    GNU gdb (GDB) 7.1
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-pc-solaris2.10".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from
    /net/chronic2nas/emake-slothman-main-201006211520/out/i686_SunOS_64.5.10/ecloud/agent/ecagent...done.
    [New LWP 1]
    [New LWP 2]
    [New LWP 3]
    [New LWP 4]
    [New LWP 5]
    Reading symbols from /usr/lib/amd64/ld.so.1...(no debugging symbols
    found)...done.
    Loaded symbols for /usr/lib/amd64/ld.so.1
    Core was generated by `/opt/ecloud/i686_SunOS.5.10/bin/ecagent
    /opt/ecloud/i686_SunOS.5.10/bin/runagen'.
    Program terminated with signal 11, Segmentation fault.
    #0  0xfffffd7ffeac431c in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeac431c in ?? ()
    Cannot access memory at address 0xfffffd7fffdfed30
    (gdb) thread 2
    [Switching to thread 2 (LWP 2)]#0  0xfffffd7ffeb2c8fa in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb2c8fa in ?? ()
    Cannot access memory at address 0xfffffd7ffe1f8dd8
    (gdb) thread 3
    [Switching to thread 3 (LWP 3)]#0  0xfffffd7ffeb27527 in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb27527 in ?? ()
    Cannot access memory at address 0xfffffd7ffdfffd68
    (gdb) thread 4
    [Switching to thread 4 (LWP 4)]#0  0xfffffd7ffeb27527 in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb27527 in ?? ()
    Cannot access memory at address 0xfffffd7ffde00e78
    (gdb) thread 5
    [Switching to thread 5 (LWP 5)]#0  0xfffffd7ffeb2c8fa in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb2c8fa in ?? ()
    Cannot access memory at address 0xfffffd7ffdbffc58
    (gdb) info sharedlibrary
    From                To                  Syms Read   Shared Object Library
    0xfffffd7fff3c1010  0xfffffd7fff3e614e  Yes (*)     /usr/lib/amd64/ld.so.1
    (*): Shared library is missing debugging information.and dbx's looks like this:
    Reading ecagent
    dbx: internal warning: writable memory segment 0x597000[28672] of size 0 in core
    dbx: internal warning: writable memory segment 0x59e000[3600384] of size 0 in core
    dbx: internal warning: writable memory segment 0xfffffd7ffd405000[4096] of size 0 in core
    dbx: internal warning: writable memory segment 0xfffffd7fff3fd000[8192] of size 0 in core
    dbx: internal warning: writable memory segment 0xfffffd7fffdfa000[24576] of size 0 in core
    core file header read successfully
    Reading ld.so.1
    dbx: core file read error: address 0xfffffd7fff3fb000 not available
    dbx: core file read error: address 0xfffffd7fff3fbae0 not available
    dbx: core file read error: address 0x598ff0 not available
    dbx: warning: Dbx could not initialize rtld_db
    Make sure this is the same version of Solaris where the core dump originated.
    Use `help core mismatch' for more info.
    (l@1) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff:     <bad address 0xffffffffffffffff>
    (dbx) where
      [1] 0xfffffd7ffeac431c(0x0, 0x0, 0x784120, 0x170, 0x7, 0xffffffff), at 0xfffffd7ffeac431c
    (dbx) threads
    dbx: thread related commands not availableI get these errors even when debugging on the exact same machine where the core dump was generated. pstack is similarly confused:
    tempest-solaris% pstack /net/chronic2nas/emake-slothman-main-201006211520/logs-201006211902-solx2-ea2/core
    core '/net/chronic2nas/emake-slothman-main-201006211520/logs-201006211902-solx2-ea2/core' of 14854:     /opt/ecloud/i686_SunOS.5.10/bin/ecagent /opt/ecloud/i686_SunOS.5.10/bi
    -----------------  lwp# 1  --------------------------------
    fffffd7ffeac431c ???????? ()
    -----------------  lwp# 2  --------------------------------
    fffffd7ffeb2c8fa ???????? ()
    -----------------  lwp# 3  --------------------------------
    fffffd7ffeb27527 ???????? ()
    -----------------  lwp# 4  --------------------------------
    fffffd7ffeb27527 ???????? ()
    -----------------  lwp# 5  --------------------------------
    fffffd7ffeb2c8fa ???????? ()
    pstack: warning: librtld_db failed to initialize; symbols from shared libraries will not be availableAre there any arcane configuration parameters in Solaris that affect the generation of core dumps?

    Bother. Spoke too soon. One of my tests generated a readable core file, but the rest are having the same issues as detailed above. I am examining the core dump on the machine that generated it. The sizes of the failed tests are 21,522,239 and 21,485,375 and 21,526,447, so I doubt it’s running into a limit. (The successful one was 27,942,207.)
    On this machine, coreadm reports:
         global core file pattern:
         global core file content: all
           init core file pattern: core
           init core file content: all
                global core dumps: disabled
           per-process core dumps: enabled
          global setid core dumps: disabled
    per-process setid core dumps: disabled
         global core dump logging: disabledThe machine that got the successful core dump was physical while the ones where it failed were running under VMware LabManager, but I would be very surprised if that makes a difference to this matter. The successful core dump was generated by signal 9 (kill), while the bad ones have all been by signal 11 (segmentation fault).

  • What's the normal fan speed?

    Hello, my fans have always been around 2000 rpm with both tiger and leopord, so I am wondering what is the normal range for fan speed when the computer is not running anything heavy.

    So, I'm not crunching much at the moment; yet I have 133 F and 3906 rpm. However, that doesn't signify. It was flat on a wood table. Now, laptop; Room fan now on. That fan is the main thing. I read a great overview, will post link if I can find it, that air is like fluid dynamics: a MBP flat on a table in an air conditioned room (no fanned air movement) will run hotter than an MBP with space under, with a room fan, moving warmer air. Yah, no, really true.
    Get freeware iStat Control 1.1 (1.2 soon): (http://www.islayer.com/), which will display fans' speed and temps in the menu bar, andmore, and make popcorn too, with the lavalamp thingee.
    Then I use Fan Control, 1.2, freeware, and set it up a tiny bit just to be cool: " ... Do you think your MacBook (Pro) is running to hot? Give Fan Control a try then. Some MacBook (Pro) are just to hot for daylong use. Fan Control adjusts the minimum fan speed depending on the current CPU temperature. For safety, it leaves the original automatic fan speed control intact ..." Leopard Ready, yah.
    http://www.lobotomo.com/products/FanControl/index.html
    Both are preference panes in System preferences, which is very elegant, imho. And yes I have Leopard still shrinkwrapped. I will take a stab at it soon. Goodbye, cruel world (nah).

  • Exception in thread "main" error

    I have a real problem. I am trying to write a hello world program in java using native code. my java code is as follow :
    class HelloWorld {
    static {
    System.loadLibrary("Hello.so");
    private native void print();
    public static void main(String[] args) {
    new HelloWorld().print();
    System.out.println("Good bye Hello World!!");
    my native c code is as follow :
    #include <jni.h>
    #include <stdio.h>
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    print(JNIEnv *env,jobject obj) {
    printf("Hello cruel world. Hope you can live through the Human Phase!.\n");
    return ;
    I use javac HelloWorld.java to get my HelloWorld.class file.
    I use javah HelloWorld to het my HelloWorld.h file
    i set my LD_LOBRARY_PATH to where my native code is.
    i compile the c code using "
    gcc -c -I /usr/java/j2sdk1.4.0/include -I /usr/java/j2sdk1.4.0/include/linux HelloWorld.c -o Hello.so
    everything is good up to this point. But when i call java HelloWorld, i get the following error : "
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no Hello.so in java.library.path     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1370)
         at java.lang.Runtime.loadLibrary0(Runtime.java:773)
         at java.lang.System.loadLibrary(System.java:835)
         at HelloWorld.<clinit>(HelloWorld.java:3)
    Can any one help. I am using RedHat 7.2, kernel 2.4.10-17.
    Thank you
    Shafi Jourabchi [email protected]

    Thank you all who have responded. The solution to my problem was with the compile options. I was not using the right option to compile the shared lib object file.
    the command i used ( and it worked ) was :
    gcc -o libHello.so -shared -Wl, -soname,libHello.so -I /usr/java/j2sdk/include -I /usr/java/j2sdk/include/linux HelloWorldImp.c -static -Lc
    Shafi jourabchi

  • My First servlet error-HTTP Status 500

    Recently Installed apache-tomcat-5.5.27 ,I followed one documentation when i googled for a while like is here [http://linux-sxs.org/internet_serving/c292.html]
    when i try to access from web-browser ,it came up with errors like
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error allocating a servlet instance
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         java.lang.Thread.run(Thread.java:595)
    root cause
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1876)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         java.lang.Thread.run(Thread.java:595)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.Here is the directory structure
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF/classes
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF/libI placed web.xml file in WEB-INF directory and HelloWorld.class in WEB-INF/classes and MyFirst.xml in /opt/apache-tomcat-5.5.27/conf/Catalina/localhost/
    the files typically contains
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
            <servlet-name>HelloWorld</servlet-name>
            <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
            <servlet-name>HelloWorld</servlet-name>
            <url-pattern>/HelloWorld</url-pattern>
    </servlet-mapping>
    </web-app>
    HelloWorld.java
    // Filename : HelloWorld.java                                                                                                                               
    // Description : This servlet merely says hello!                                                                                                            
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
        public void doGet ( HttpServletRequest request, HttpServletResponse response )
            throws ServletException, IOException    {
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>Hello, Cruel World!</title></head>");
            out.println("<body>");
            out.println("<h1>Hello, Cruel World !</h1>");
            out.println("This is my first servlet.");
            out.println("</body>");
        }// end doGet                                                                                                                                           
    }///:~
    MyFirst.xml
    <!-- MyFirst Context -->
    <Context path="/MyFirst" docBase="MyFirst" debug="0" reloadable="true"/>anybody have idea about this error...

    miriyalasrinivas wrote:
    java.lang.UnsupportedClassVersionError: Bad version number in .class fileThe class is compiled with a JDK version which is newer than the JRE version used to run the class. To solve this, just clean up your Java environment and align the versions. You can get version information of the Java compiler using javac -version and of the Java runtime using java -version.
    That said, this problem is actually not related to servlets. You didn't get a root exception of javax.servlet package. You just got a root exception of java.lang package, which basically makes it a Java SE problem. Questions related to those actually belongs in the 'New to Java' forum.

Maybe you are looking for

  • [solved] luks on lvm encryption keymap issue

    hi, i just installed arch on a new notebook of mine. i used a luks encrypted lvm installation, which works (guided by the wiki) but i am encoutering an issue with the keymap while decrypting at boot. i've installed using "de-latin1-nodeadkeys" as key

  • Can LabView FPGA module work with non-NI FPGAs?

    Simple Question: Can the LabView FPGA Module work with other FPGAs? Im assuming yes, but id like ot make sure first. Normaly I go with NI for most of my stuff, but they just are lacking in the FPGA hardware for what I need, but Im accustumed to LabVi

  • PSE 6 for MAC shutdown ?

    When I am editing photos in PSE6 for any length of time it will suddenly close unexpectedly.  Any ideas?

  • Snow leopard won't boot, but windows bootcamp does.

    My mac has a partitioned hardrive. I have xp on one side and snow leopard on the other. Starting yesterday, snow leopard won't boot. I ran the apple hardware test and came up with these 2 codes: 4MOT/4/40000003:HDD-1347 and -1352. The mac still runs

  • Any App Recommendations?

    To be honest, I'm just bored these days. I still love my iPhone, but I need some new apps to occupy my time (LOL). Any suggestions? Any apps you're really happy with?