Scanning... and Mulitple String lines

My text file that I want to scan looks like this format:
Name of Student
Test Answers (True or false)
Example:
Joe Smith
TFTFTFFTFFFTFFTFFTFTTFF etc..
Jane Sims
FTFTFTTFFTTFFTFFFTFTFTF etc..
The issue is - I know how to scan the data of my textfile. However I am dealing with Strings on two lines.
I want to compute the True and False answers, by tallying them up.
But my real question is this.
How can I seperate the detection of the line with the name, and the line with the True & false answers.
import java.util.*;
import java.io.*;
public class TureFalseTest {
     public static void main(String[]args) throws FileNotFoundException {
     System.out.println("This program computes the results of students from the test");
     Scanner input = new Scanner(new File("answers.txt"));
     while(input.hasNextLine()){
          String questionResults = input.nextLine();
          // this is the part that is getting me troubled. 
     public static int[] computeAnswers (String questionResults) {
          int[] questions = new int[70]
                // going to continue on with my arrays and what not.Below is what I got, I know that input.nextLine(); will start scanning each line in the text document, line-by-line.
I want to run my array/caclulations only on the True & False answers of every student.
But i'm not understanding
If someone could give me some pointers or tips, that will be greatly appreciated.

accident 2nd post.
Edited by: theendgame on Nov 18, 2008 6:29 PM

Similar Messages

  • I have a line drawing (black on white paper) i have scanned and need to make the white paper transparent, maintaining the line drawing, can i and then HOW can i do this in PS?

    i have a line drawing (black on white paper) i have scanned and need to make the white paper transparent, maintaining the line drawing, can i and then HOW can i do this in PS? this is for my business logo. ive used it for years but with a solid background. id like to have it just be the drawing over my photos with a transparent background.

    First let me apologize for posting a reply that was only suitable for advanced users.  Photoshop is broad and powerful therefore has a huge learning curve.  In fact I would state no one knows and uses all of Photoshop.  When we first get Photoshop it intimidate us and we're very uncomfortable using it.  Many thing are not intuitive there in much learning involved.  After some time we begin to know something and we are able to do some thing.  Learning become rapid and we start playing in Photoshop.  It is very important to play with Photoshop.  Playing with Photoshop and asking for help with in forums like this IMO is the best way to learn. 
    Photoshop Power lies in layers, selection and automation.  However it takes knowledge to use photoshop well so most powerful tool you have ins Photoshop is the gray matter between your ears.  Most at one time or another want to watermark or put a logo on their image.  So its best to automate this process. All run into a problem in the process. "Size"  We find our assets vary in size and aspect ratios. Landscape, Portraits, Panoramas and others. This complicates automation.  Vector graphics works best when size vary greatly.  If you can not work out how to create a vector solution like a custom shape.  Create your Logo and watermark large thing scale down better the up. Text scale well for text uses vectors graphics however if you rasterize text it will not scale well.
    I do not type or do English well so let me do some screen captures.  I can not stress enough how important Black, White, Grays and Blending is when it come to image processing.  Become friends with Multiply, Screen, Overlay and Luminosity blending.....
    However when there is a white or black background though you can blend them you can not add a style like a drop shadow, emboss or make it invisible setting fill to 0 so only the style is visible.  When there is contrast between the logo and background it is easy to separate the two. To select the background and delet it to have the logo with a transparent background.  Many tools can be used to create the selection hee I use my action kill white.
    Vector Shape would work better for scaling However it would be best to create the logo from scratch in a vector program like illustrator but I never had the resources to justify the Creative suite. I only had Photoshop.  Recently Adobe gave me and other a year subscription to the creative suite for our participation here.  I still have not installed anything but Photoshop,  A while back I found a program that can create vector patf for black and white art work.  It will not be as good as using something like illustrator. However vector paths can be edited in Photoshop and cleaned up some. Here is the PSD it 13MB because od the gradient http://www.mouseprints.net/old/dpr/AmPm24-7.psd

  • Having difficulty scanning and copying on Office jet 6500A plus.  Prints fine.  Scans and copies are illegible and contain hundreds of vertical lines.  I did all of the various cleaning tasks suggested.

    Having difficulty scanning and copying on Officejet 6500A Plus.  Prints fine.  Scans and copies are illegible with hundreds of verticle lines on the page.  I did all of the various cleaning and restart suggestions, but still doesn't work.

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • Scanning and Copying result in all black and lines. (with link to the scanned picture)

    Whatever I try to scan and copy, even blank, the result is the same all black and full of lines. 
    Here is the link to the scanned picture. Copying also makes the same picture. https://www.dropbox.com/s/yaprfywbpf7cq70/scan0002.jpg?dl=0
    The printer hasn't been used in a while, I just used it recently and the ink even dried out. Bought ink and printer's working fine.

    Hi @RexRegnum,
    Thank you for visiting the HP Support Forums! I see when you Copy or Scan on your HP Photosmart D110a you get black lines all over the page.
    I would like you to start troubleshooting here: Vertical Bands, Streaks, or Lines in a Copy, or Scan
    Please let me know the outcome, I will watch for your reply.
    HevnLgh
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • Difference in Null and Empty String

    Hi,
    I have been wondering about the difference between Null and Empty String in Java. So I wrote a small program like this:
    public class CompareEmptyAndNullString {
         public static void main(String args[]) {
              String sNull = null;
              String sEmpty = "";
              try {
                   if (sNull.equalsIgnoreCase(sEmpty)) {
                        System.out.println("Null and Empty Strings are Equal");
                   } else {
                        System.out.println("Null and Empty Strings are Equal");
              } catch (Exception e) {
                   e.printStackTrace();
    This program throws Exception: java.lang.NullPointerException
         at practice.programs.CompareEmptyAndNullString.main(CompareEmptyAndNullString.java:10)
    Now if I change the IF Clause to if (sEmpty.equalsIgnoreCase(sNull)) then the Program outputs this: Null and Empty Strings are Equal
    Can anyone explain why this would happen ?
    Thanks in Advance !!

    JavaProwler wrote:
    Saish,
    Whether you do any of the following code, the JUnit Test always passes: I mean he NOT Sign doesnt make a difference ...
    assert (! "".equals(null));
    assert ("".equals(null));
    You probably have assertions turned off. Note the the assert keyword has nothing to do with JUnit tests.
    I think that older versions of JUnit, before assert was a language keyword (which started in 1.4 or 1.5), had a method called assert. Thus, if you have old-style JUnit tests, they might still compile, but the behavior is completely different from what it was in JUnit, and has nothing to do with JUnit at all.
    If you turn assertions on (-ea flag in the JVM command line, I think), the second one will throw AssertionError.

  • Failed Hardware Scan and other issues E440

    Hi all,
    This is probably more rant than anything, but I wanted to give a heads up to others too.
    I have a ThinkPad E440 that is a year old. From the very first time I turned it on, there have been issues. The first hardware scan (via Lenovo Solution Center - LSC) showed a warning for the Intel Dual Band Wireless-AC 7260 Local Connection Test. There were also tons of System Events that always show up in the "Configuration History" part of the LSC. You can look at the calendar and tell exactly which days I used the computer because there will be System Events generated each day. Things like app crashes and failed drivers.
    In July 2014, I got the first warning for the 16 GB SSD - the SMART Short Self-Test. By February this year it showed as failed for each hardware scan (these were initially set up to run monthly).
    Also the whole time I've had it the touch screen would just stop working at some point and I would have to reboot to get it working again.
    I finally called Lenovo on March 30th, before my warranty expired. When I called that time, I didn't realize the hard drive failure was the SSD. So they sent me a new 500 GB drive. I also added the other things into the case when I talked to them. For the wireless issue they suggested making sure the driver was up to date. I did this and let them know when I called back that it was up to date and still having the warning. So I called them to tell them to tell them about the wireless and also that I realized it was the SSD having the failure, not the main drive. The first case had already been closed even though none of the other items were addressed.
    So they opened another case (this is #2). They said to mail them the laptop since the wireless issue would probably be on the board and it wasn't something I could fix myself. They sent a box with a prepaid overnight shipping label. I was very sick for a few days so I sent it back to them on April 10th (a Friday). Via UPS I saw it was delivered on Saturday. Work was performed on it Monday, April 13th and sent back to me that very day. I received it on April 14th. This part of the service has been excellent - very fast response.
    Being in IT, I included a letter with the laptop that outlined the issues that should have been in the case. I also printed the hardware scans and what the system events looked like.
    When I got the laptop back, the sheet inside said they had replaced the Speaker because of Distorted Sound. This was not even on the list even though I had noticed it. I didn't even power up the laptop before calling them again - yes, I was furious! Plus our power was out...
    So this was noon on the 14th. They opened case #3 and sent me ANOTHER BOX so I could send it back.
    After our power came back on the 15th, I powered up my laptop. I opened the browser (I have it set to restore the previous session) and there was a sexually explicit video on YouTube. I opened the other browser and there was a different video on YouTube. So this person was watching YouTube instead of fixing my laptop. I looked through both browser histories and there was quite a bit of activity while my laptop was at the repair center... I ran the hardware scan - still failed and a warning for the wireless. They really hadn't done anything.
    I also found two pictures of the repair person in the recycle bin...
    So I called back. I was LIVID! They opened another case (this is #4). And sent me ANOTHER BOX. I finally learned the other day that once a case is opened, it cannot be edited or added to at all. Instead, they close the other case and open a new one. I guess their turnaround time for closing cases is excellent! I've never seen a system like that - and I've used a lot of them.
    I got a really nice, patient fellow on the line. He took all my info (again). I emailed him the pictures, screen captures of the YouTube videos, the letter I had sent - everything. He entered as much into the new case as he could - he talked to one of the supervisors to make sure he did it right. Somehow he flagged it so that the laptop would get more attention (time) at the repair facility. He also opened a separate case (an escalation ticket?) for a supervisor to call me regarding the person's conduct at the repair facility. He said they would call me that day. (It's now the 25th and I've never heard from anyone)
    So, he sent me ANOTHER BOX. I've built up quite a stack of them.
    Our power was out AGAIN from the 17th through the 19th (don't get me started).
    I noticed a hardware scan had now gotten a failure on the main hard drive. So I called them on the 21st to add this to the case before sending the laptop back. The girl said they can't add anything to an existing case or edit it at all once it's opened. She would have to open a new case and SEND ME ANOTHER BOX. I told her to forget it because I was ready to send it in and didn't want to wait for another box. I also asked for a status on that "escalation case" where the supervisor was supposed to call me. In order to do this she, yes, wait for it, had to open ANOTHER CASE!! So they would know I wanted a status. I'm completely dumbfounded.
    So I sent it back on the 21st. This time I practically wiped it. I had already removed all my files the last time, but I had left my bookmarks and browser history intact.  I set up a guest logon with admin privileges. I updated my letter and printed off more stuff to include with the box. On one sheet I had only the case number, the serial number and machine type. On another sheet I had "DO NOT SEPARATE THIS PAPERWORK FROM THE LAPTOP" and the case number. I put this sheet on top (The guy on the 15th said my letter and stuff may have gotten separated from the laptop once it was delivered to the repair facility). I used a ton of staples so it would all stay together. I included in my letter the failure on the main hard drive and asked if they could look at it. I wrote about having to open a new case if I wanted to include it.
    They received it on the 22nd. A nice gentleman from the repair facility called me that day asking about the password. that. was. written. on the sheet they have you fill out. I told him what happened last time and also mentioned the hard drive failure and asked if he could look into it. He said they would.
    I received my laptop back yesterday morning.The sheet that came with it said they had "replaced the following parts to complete the repair of your laptop."
    Part Description                                           Symptom
    IMAGE                                                             Replaced due to engineering change
    System board                                                 Network card error
    Hard disk drive                                                Network card error
    ECA-WIRELESS                                            <no symptom listed>
    There was also a sheet saying they had installed a factory preload of software and I needed to install Lenovo and Windows updates.
    When I booted it up, the first thing I noticed, in the lower right corner was:
    Windows 8.1
    SecureBoot isn’t configured correctly
    Build 9600
    I ran a hardware scan. Well, I tried. It stopped part way through and said it finished successfully but most of the tasks showed up as cancelled. I tried to run it again - issues - rebooting ensued. It said the LSC wasn’t available and that I should try again or reboot.
    Tried several times. Then got what I guess is the new BSOD - kinder, gentler:
    Your PC ran into a problem and needs to restart. We're just
    collecting some error info, and then we'll restart for you. (xx% complete)
    If you'd like to know more, you can search online later for this error: DRIVER_CORRUPTED_EXPOOL
    Even though the LSC said my Lenovo files were all up to date, I ran the Update. And first I had to download a new version of Update. Then I downloaded all of the Lenovo updates and installed them (there were quite a few). The BIOS update failed. While I was doing the Lenovo downloads, I got a light blue screen but no text (I was out of the room so I'm not sure what happened). Did CTRL-ALT-DEL and it shows only IE and Task Manager as applications that are running. Could not “Switch to” IE. Hitting window key to go to start didn't do anything. So I had to restart.
    By 3pm yesterday there were 34 system events in the configuration history.
    I ran the hardware scan again after I updated the Lenovo files, and you guessed it! Failure on the SSD (SMART Short Self-Test) and warning on the wireless. Nothing had changed. Except hardware scan is acting different than it did before I sent in the laptop for repairs. When it finishes, it instantly closes and just shows 100% complete. When I click on "see last results" it shows a screen called
    Log Information,
    Canceled 04/24/2015 n:nn pm 
    You have not done a hardware test on your computer
    And the calendar in LSC only shows the very first hardware scan I did on Friday. Even the hardware scan screen shows the date and time of the last scan. It also shows the error code. In order to see exactly what is failing, I have to sit there and watch it very closely and snap a picture of the screen as soon as the error (or warning) shows up.
    When I would try to run Windows update, it would hang up PC Settings. I couldn't even kill it using task manager because it didn't show up as a task. During this, I got a flag saying the firewall wasn't turned on. I tried to turn it on, but clicking on Turn on Windows Firewall didn't do anything. I tried to setup my Microsoft account but that just hung too.
    I ended up running Windows Update FOUR TIMES to get all the updates installed. Every time I ran it, it said "Done!" and I would run it again and more would show up. The last time was this morning.
    At some point, the error about SecureBoot went away.
    Then, I created a bootable BIOS update disk. Following the ReadMe instructions, I went through ThinkPad Setup and verified several values. Of note:
    Secure Boot was DISABLED. According to the ReadMe file, this should be ENABLED in Windows 8.1. I enabled it.
    Under Startup/Boot, according to the ReadMe that came with the BIOS update, UEFI/Legacy Boot is supposed to be set at UEFI Only for Windows 8.1. Mine was set to "Both". I changed it.
    In Startup, OS Optimized Defaults was DISABLED, even though it says right there (and in the BIOS update ReadMe) it should be ENABLED to meet Microsoft Windows 8 Certification Requirement.
    After these updates, I flashed the new BIOS.
    Then, I ran hardware scan again...
    Now I have TWO failures on the SSD: Random Seek Test and SMART Short Self-Test. Great.
    In the Event Viewer (that I recently discovered), it says my disk has a bad block. It just says The device, \Device\Harddisk\DR1, has a bad block. I assume this is the SSD...
    There are 867 events in the event viewer - Critical, Error, and Warning...
    Fifty-two of these are from October 7, 2013 - before my little laptop was a glimmer.
    The rest are from when Lenovo had it and yesterday and today.
    64 of them are the disk error.
    341 are from DeviceSetupManager. 65 of those are from failed driver installs. 69 are for not being able to establish a connection to the windows update service. 64 are from not being able to establish a connection to the Windows Metadata and Internet Services (WMIS).
    3 times it's rebooted without cleanly shutting down
    60 of them are from Service Control Manager and say The TDKLIB service failed to start due to the following error: The system cannot find the file specified.
    One of them says {Registry Hive Recovered} Registry hive (file): '\??\C:\Users\Default\NTUSER.DAT' was corrupted and it has been recovered. Some data might have been lost.
    16 are warnings that various processors in Group 0 are being limited by system firmware.
    12 say the certificate for local system with thumbprint <bunch of hex numbers> is about to expire or already expired.
    108 are warnings for failure to load the driver \Driver\WUDFRd for various devices
    16 are application errors
    One is for the computer rebooting from a "bug check"
    15 are for name resolutions timing out after none of the configured DNS servers responded.
    10 are for SecureBoot being disabled.
    14 for services terminating unexpectedly
    15 are for WLAN Extensibility Module has stopped
    61 are for applications not being able to be restarted because the application SID does not match Conductor SID
    12 are for activation of CLSID timing out waiting for the service wuauserv to stop
    So, I'll call them on Monday and open. a. new. case (#5?) - but really 7. And get A NEW BOX.
    I'll keep you updated!

    Hi amycdero and welcome to the HP Forum,
    I understand that you are having scanning and printing issues after upgrading to Mavericks OS X v10.9.1. I will try my best to help you resolve this issue.
    In this document for Mac OS X: Scanning Software Does Not Open or Stops Responding are steps the may help you with your scanning issue.
    This document for Fixing Ink Streaks, Faded Prints, and Other Common Print Quality Problems should help with the streaking printing issue.
    I hope this information is helpful. Please let me know.
    Thank you,
    I worked on behalf of HP.

  • Officejet Pro 8600 e. Problem scanning from Scan and Capture App in Win 8.1

    Officejet Pro 8600 e.  New.
    Installed on HP Envy 23 Touch. Running Windows 8.1.  
    Wireless set up. Prints fine.  Problem is scanning from the HP Scan and Capture Software App in Win 8.1  
    Using Scan and Capture App I can scan photos fine.  They come out clear.  Scanning documents in GRAY has multiple bands/lines in gray over the entire page running vertically.  Scanning documents in COLOR are fine.
    Also, if I scan from the printer directly using the touch screen on the printer, the scan output is fine.
     I did the Scan utilty to discover any errors and it did not show any.  I think it's a software error.  I am going to uninstall the HP Scan App and then reinstall.  So, I will do the uninstall/reinstall and report back.
    Also, I would like to know if there is a desktop program for scanning?  I would prefer to use that instead of the Modern HP Scan and Capture App.
    Thanks....
    This question was solved.
    View Solution.

    Hi artrum,
    I understand you've been experiencing issues scanning from your Officejet 8600 using the Windows Scan and Capture program. I will certainly do my best to help you with this!
    From what you've explained, I believe you're correct, it does seem like it's an issue just with the Windows Scan and Capture program and as you've been able to scan from the front panel of the printer you definitely have the HP software installed. What I'd like to do is have you use the HP Scan software, where you should no longer run into issues.
    To access the HP Scan software and be able to access it easily from your desktop I'd like you to follow the steps below:
    1. Go to your start screen and just start typing File Explorer. You should be able to then open it to access your computer's files.
    2. Then open Local Disk (C: ), followed by Program Files (x86), followed by HP, then HP Officejet Pro 8600, followed finally by bin.
    3. In the bin folder you should see HPScan. You will want to right click on HPScan and go to Send To and then select Desktop.
    Now you should see HP Scan on your desktop and be able to open it and scan through that application.
    Hope this helps, have a great day!
    Please click “Accept as Solution ” if you feel my post resolved your issue, as it will help others find the solution faster
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    **MissTeriLynn**
    I work on behalf of HP

  • Windows is Scanning and repairing drive... (- Errors in Event Viewer)

    Long post, please be patient... :)
    I have a fairly new (purchased 8/2013) Lenovo ThinkPad T431s with Windows 8.1 Pro 64-bit (updated from 8.0 -> 8.1). It has a very tricky error coming basically 8 / 10 boots:
    Windows is Scanning and repairing drive...
    Error details from Windows Event Viewer (a new similar error appears on every boot to event viewer):
    A corruption was discovered in the file system structure on volume \?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984}.
    A file on the volume is no longer reachable from its parent directory. The parent file reference number is 0x2000000000002. The name of the parent directory is "". The parent index attribute is ":$I30:$INDEX_ALLOCATION". The file reference
    number of the file that needs to be reconnected is 0x400000003db80. There may be additional files on the volume that also need to be reconnected to this parent directory.
    What has been done 1st trying to fix that:
    SSD disk has been changed (image from previous SSD copied back) ->
    no solution, error remains
    chkdsk /F /R -> no solution, error remains
    SFC /scannow -> no solution, error remains
    dism /online /cleanup-image /restorehealth -> no solution, error remains after a few boots
    TRIED using Windows 8.1 "Update & Recovery -> Refresh Your PC without affecting your files" -> Inserted the Lenovo "Operating System Recovery Disk Windows 8 Pro (OEM Activation 3.0 Required)" BUT Windows did not accept
    that DVD claiming "The media inserted is not valid"... ???
    Ended up calling Lenovo Support and they instructed me to order the Recovery DVD from
    Lenovorecovery.com -> Unfortunatelly Windows does not recognice the DVD(s)...
    mountvol returns:
    \\?\Volume{4d337687-0033-42f7-8a8e-b6968b533cb3}\
    (This is my C:\ drive where Windows installation resides)
    \\?\Volume{e010cf9d-c04d-4c82-b517-3cda1b647fe7}\
    *** NO MOUNT POINTS ***
    \\?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984}\
    *** NO MOUNT POINTS ***
    \\?\Volume{33f0062f-0aff-4fd2-8402-1c7911d86897}\
    *** NO MOUNT POINTS ***
    Then running fsutil dirty query on each returns:
    Volume - \\?\Volume{4d337687-0033-42f7-8a8e-b6968b533cb3} is NOT Dirty
    Volume - \\?\Volume{e010cf9d-c04d-4c82-b517-3cda1b647fe7} is NOT Dirty
    Volume - \\?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984} is Dirty
    Volume - \\?\Volume{33f0062f-0aff-4fd2-8402-1c7911d86897} is NOT Dirty
    The chkdsk on the dirty volume
    \\?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984}\ returned:
    The type of the file system is NTFS.
    Insufficient storage available to create either the shadow copy storage file or
    other shadow copy data.
    A snapshot error occured while scanning this drive. Run an offline scan and fix.
    Diskpart output on the same volume:
    DISKPART> lis par
    Partition ### Type Size Offset
    Partition 1 Reserved 128 MB 17 KB
    Partition 2 Recovery 1000 MB 129 MB
    Partition 3 System 260 MB 1129 MB
    Partition 4 Primary 146 GB 1389 MB
    Partition 5 Recovery 350 MB 147 GB
    Partition 6 Recovery 19 GB 148 GB
    Questions:
    1) Are my Partitions OK, haven't "touched" anything?
    2) Excluded the dirty volume from boot checking with chkntfs /x
    -> still the Error appears in Event viewer log (but Scanning is skipped/not shown anymore during the boot).
    What is causing the error?
    3) Why do I have three (3) recovery partitions?

    What has happened in the past days:
    A) Lenovo on-site-Support changed the motherboard -> had no impact on the error (which I expected).
    B) I found
    instructions how to manually create USB Flash stick with a booting Custom (OEM) Recovery Image.
    C) Booted with USB and performed "Refresh your PC without affecting your files."
    D) Windows was refreshed but...
    -->>
    Still the error remains (Windows scanning and repairing drive \?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984} on each and every boot.
    1) Related Error in Event viewer (NTFS):
    A corruption was discovered in the file system structure on volume \?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984}.
    A file on the volume is no longer reachable from its parent directory. The parent file reference number is 0x2000000000002. The name of the parent directory is "". The parent index attribute is ":$I30:$INDEX_ALLOCATION". The file reference number of the
    file that needs to be reconnected is 0x400000003db80. There may be additional files on the volume that also need to be reconnected to this parent directory.
    2) Related Error in Event viewer (NTFS - Microsoft Windows NTFS):
    Volume \\?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984} (\Device\HarddiskVolume5) needs to be taken offline to perform a Full Chkdsk.  Please run "CHKDSK /F" locally via the command line, or run "REPAIR-VOLUME <drive:>" locally or remotely via
    PowerShell.
    -->>
    Now Lenovo support is proposing a full re-install (to be performed by myself) of Windows as this is SW issue.
    Summary:
    - Refreshing my T431s with OEM Image does not help
    - The error remains on \?\Volume{f62db2cf-efe4-4b55-a3f7-0e7db991a984} (\Device\HarddiskVolume5; Lenovo Recovery partition) OR at least Windows thinks so...

  • Unable to scan and install windows updates on Win 2008 R2 server

    I've encountered some of my win 2008 servers are unable to scan and receive windows updates from SCCM 2012. Browse through the logs and found some error code related to
    0x80244023. Excerpt from the WindowsUpdate and WUAHandler is as below. Searched the net and found some workaround which is to rename the registry key
    WinHTTPSettings to WinHTTPSettingsx (by adding x at the end of the string)
    under HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Windows -> CurrentVersion -> Internet Settings -> Connections.
    I've did just that on the effected servers and after running again the Software Update Scan Cycle action, it is now able to scan and install the updates. My questions is, based on you guys experience, is there any repercussion (apart from enable to install
    software updates) that I could encounter in changing the registry key value WinHTTPSettings?
    WUAHandler
    <![LOG[Scan results will include all superseded updates.]LOG]!><time="04:04:40.982-480" date="09-20-2014" component="WUAHandler" context="" type="1" thread="872" file="cwuahandler.cpp:2913">
    <![LOG[Search Criteria is (DeploymentAction=* AND Type='Software') OR (DeploymentAction=* AND Type='Driver')]LOG]!><time="04:04:40.982-480" date="09-20-2014" component="WUAHandler" context="" type="1"
    thread="872" file="cwuahandler.cpp:2916">
    <![LOG[Async searching of updates using WUAgent started.]LOG]!><time="04:04:40.988-480" date="09-20-2014" component="WUAHandler" context="" type="1" thread="872" file="cwuahandler.cpp:579">
    <![LOG[Async searching completed.]LOG]!><time="04:05:06.262-480" date="09-20-2014" component="WUAHandler" context="" type="1" thread="8112" file="cwuahandler.cpp:2068">
    <![LOG[OnSearchComplete - Failed to end search job. Error = 0x80244023.]LOG]!><time="04:05:06.263-480" date="09-20-2014" component="WUAHandler" context="" type="3"
    thread="872" file="cwuahandler.cpp:3064">
    <![LOG[Scan failed with error = 0x80244023.]LOG]!><time="04:05:06.263-480" date="09-20-2014" component="WUAHandler" context="" type="3" thread="872" file="cwuahandler.cpp:3520">
    WindowsUpdate
    2014-09-20 06:04:03:506  552 634 PT +++++++++++  PT: Synchronizing server updates  +++++++++++
    2014-09-20 06:04:03:506  552 634 PT   + ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, Server URL =
    http://"SCCM Server":8530/ClientWebService/client.asmx
    2014-09-20 06:04:25:166  552 634 PT WARNING:
    GetConfig failure, error = 0x80244023, soap client error = 10, soap error code = 0, HTTP status code = 504
    2014-09-20 06:04:25:166  552 634 PT WARNING:
    PTError: 0x80244023
    2014-09-20 06:04:25:166  552 634 PT WARNING:
    GetConfig_WithRecovery failed: 0x80244023
    2014-09-20 06:04:25:166  552 634 PT WARNING: RefreshConfig failed: 0x80244023
    2014-09-20 06:04:25:166  552 634 PT WARNING: RefreshPTState failed: 0x80244023
    2014-09-20 06:04:25:166  552 634 PT WARNING: Sync of Updates: 0x80244023
    2014-09-20 06:04:25:166  552 634 PT WARNING: SyncServerUpdatesInternal failed: 0x80244023
    2014-09-20 06:04:25:166  552 634 Agent   * WARNING:
    Failed to synchronize, error = 0x80244023
    2014-09-20 06:04:25:170  552 634 Agent   * WARNING: Exit code = 0x80244023
    2014-09-20 06:04:25:170  552 634 Agent *********
    2014-09-20 06:04:25:170  552 634 Agent **  END  **  Agent: Finding updates [CallerId = CcmExec]
    2014-09-20 06:04:25:170  552 634 Agent *************
    2014-09-20 06:04:25:170  552 634 Agent WARNING:
    WU client failed Searching for update with error 0x80244023
    2014-09-20 06:04:25:171 5752 de4 COMAPI >>--  RESUMED  -- COMAPI: Search [ClientId = CcmExec]
    2014-09-20 06:04:25:172 5752 de4 COMAPI   - Updates found = 0
    2014-09-20 06:04:25:172 5752 de4 COMAPI   - WARNING: Exit code = 0x00000000, Result code = 0x80244023
    2014-09-20 06:04:25:172 5752 de4 COMAPI ---------
    2014-09-20 06:04:25:172 5752 de4 COMAPI --  END  --  COMAPI: Search [ClientId = CcmExec]
    2014-09-20 06:04:25:172 5752 de4 COMAPI -------------
    2014-09-20 06:04:25:172 5752 de4 COMAPI WARNING: Operation failed due to earlier error, hr=80244023
    2014-09-20 06:04:25:172 5752 de4 COMAPI FATAL:
    Unable to complete asynchronous search. (hr=80244023)
    2014-09-20 06:04:30:171  552 634 Report REPORT EVENT: {37DD5321-4FD5-4024-9C84-1FB9C04D4A5A} 2014-09-20 06:04:25:169+0800 1 148 101 {00000000-0000-0000-0000-000000000000} 0 80244023 CcmExec Failure Software
    Synchronization Windows Update Client failed to detect with error 0x80244023.

    Hi
    If SCCM is setup correctly and your boundaries are correct then once you deploy updates the agents will pick them up.
    Also make sure you SUP role has the FQDN set. Lastly if you are using port 8530 make sure it is open.
    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Find and replace a line in a text  file

    Hi All,
    I wanted to read a text file , find a line and replace that line with out affecting any other lines and with out creating a new file.
    If any one of you know any API to do this work ,please throw some light

    This seems to be a question on optimal implementation of search and replace.
    For replacing text in the file itself, the sought text and replaced text must be the same length,
    as inserting a character somewhere in a file, is better done in a new file.
    You could do this with a java.io.RandomAccessFile[b].
    The new IO package [b]java.nio provides a memory mapped file which is faster.
    The following code does such patching.
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    public class Patch {
        private static byte[] sought;
         private static byte[] replacement;
         private static boolean matches(MappedByteBuffer bb, int pos) {
              for (int j = 0; j < sought.length; ++j)
                   if (sought[j] != bb.get(pos + j))
                        return false;
              return true;
         private static void replace(MappedByteBuffer bb, int pos) {
              for (int j = 0; j < sought.length; ++j)
                   byte b = (j < replacement.length)? replacement[j] : (byte)' ';
                   bb.put(pos + j, b);
         private static void searchAndReplace(MappedByteBuffer bb, int sz) {
              int replacementsCount = 0;
              for (int pos = 0; pos <= sz - sought.length; ++pos)
                   if (matches(bb, pos)) {
                        replace(bb, pos);
                        pos += sought.length - 1;
                        ++replacementsCount;
              System.out.println("" + replacementsCount + " replacements done.");
        // Search for occurrences of the input pattern in the given file
        private static void patch(File f) throws IOException {
              // Open the file and then get a channel from the stream
              RandomAccessFile raf = new RandomAccessFile(f, "rw"); // "rws", "rwd"
              FileChannel fc = raf.getChannel();
              // Get the file's size and then map it into memory
              int sz = (int)fc.size();
              MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_WRITE, 0, sz);
              searchAndReplace(bb, sz);
              bb.force(); // Write back to file, like "flush()"
              // Close the channel and the stream
              raf.close();
        public static void main(String[] args) {
              if (args.length == 0)
                   args = new String[] { "row ", "item", "2.xml" };
              if (args.length < 3) {
                   System.err.println("Usage: java Patch sought replacement file...");
                   return;
              sought = args[0].getBytes();
              replacement = args[1].getBytes();
              if (sought.length != replacement.length) {
                   // Better build-in some support for padding with blanks.
                   System.err.println("Usage: sought (" + args[0] + ") and replacement (" + args[1] + ") must have same length");
                   return;
              for (int i = 2; i < args.length; i++) {
                   File f = new File(args);
                   try {
                        patch(f);
                   } catch (IOException x) {
                        System.err.println(f + ": " + x);

  • How do i scan and put an attachment in email - - from the beginning. i have a newer lexmark printer

    I'm a "senior", sort of computer illiterate.  I need to send 13 pages of documents to my mortgage lender.  Do I scan and put in a
    file/folder, or is there a way to get them right in the email?  All I've ever done is write emails and send them - - with no attachments.  Can someone help me with step-by-step instructions?  Thanks . . . .

    Hello Moose:
                Scan your documents frist save it my documents folder. When you search for these scans. They maybe might bestored in my scans file folder. Most printers give you the option. You select my docomentsand under the name of file click on black arrow change to pdf file. JPEG is for pictures.
          Now ounce you completed the scan. Goto my documents and see if you can find it and open it and see if errors occurred. No errors scan cam out good. Now just close it. Now it is ready to be used.
         So now we goto your E-mail account. Depending on your e-mail provider. In the email tool bar you will see icons or words. Fronts (Letters type) B (Bold Type) I (Italic type) U (under line) Smile faces( insert smile face) A( Color letter) Chages color of letters. You will see words Send, Save( save e-mal) and Attach( This is for attaching pictures, and doccuments) Icons various for this. Such as here on this web-site it is green icon. papper clip iccon is the most common. Any thing with a piture of a chain icon is for inserting web-links.
            Now click on attach when the window drops down select my documents and locate the file you want to send or pictures. Let it load up. Some email accounts show a load up progress bar. Others will just say files are done. Some emails have a limits of sizes a file can be. If for that reason just break down the file size into parts. Like in your case I would send two pages at a time. Where you are trying to send out allot bank documents. This way you won't get upload fail error and the bank wont get fatal down load error on there end. Just number emal them as you go. Make sure you mark last one you send. Last one sent. This way reciever will know.       

  • Rpass - Secure, simple, and pluggable command-line password management

    WARNING: this program requires a python version greater than or equal to 3.
    EDIT: Fixed a bunch of bugs that made this unusable, please update!
    EDIT: Added a default configuration file.
    Hi there!
    rpass is a command-line password manager that encrypts any and all credentials you would like to store using gpg's algorithms.
    Gnome and Mac OS both have a universal credential solution, but to my knowledge there is no such generic linux application. Gnome's keyring code is long and personally, I don't trust it as much as the simple system I have in place in rpass - it is transparent and easy to understand, and any possible security holes would be blatantly visible.
    rpass can be used directly from the commandline, typing your master password (gpg passphrase) in every time, but it really shines when gpg-agent and xclip are installed. gpg-agent saves your passphrase for an interval of time, so you only have to authenticate yourself occaisonally, and the powerful search capabilities of rpass (regex-enabled) allow simple and quick account selection.
    Furthermore, with xclip installed passwords NEVER have to be printed onscreen - the first matching entry's password is automatically copied to the clipboard if a search is done with rpass. You can even run rpass from applications like 'dmenu', and although there will be no visible output, if you enter a search term after rpass you will have the password you wanted copied to your clipboard.
    Finally, it can also be easily integrated in other applications -- I use it for my email (mutt) and any script I write that requires a password.
    AUR Link: http://aur.archlinux.org/packages.php?ID=44788
    More detailed documentation and explanation can be found at: https://github.com/rscare/rpass/blob/ma … E.asciidoc (scroll down)
    or with
    $ man rpass
    after installation.
    git repository: git://github.com/rscare/rpass.git
    Please comment on the software and the documentation. Thank you very much for taking the time to try my software.
    Last edited by RedScare (2010-12-27 07:04:44)

    I'm very interested in this. However... on the initial run, pressing enter causes a crash:
    $ rpass
    Need to first create gpg key pair.
    Choose a secure passphrase -- this is going to be your master password.
    Rerun program after key creation.
    WARNING: DO NOT pick a sign-only key type.
    Press [ENTER] when ready.
    Traceback (most recent call last):
    File "/usr/bin/rpass_py_interface", line 80, in <module>
    input("Press [ENTER] when ready.")
    File "<string>", line 0
    ^
    SyntaxError: unexpected EOF while parsing
    I got around this by entering junk and I made my key. After rerunning rpass with the key generated:
    $ rpass
    Traceback (most recent call last):
    File "/usr/bin/rpass_py_interface", line 84, in <module>
    if not(IsRunning(gpg-agent)):
    File "/usr/lib/python2.7/site-packages/rpass.py", line 24, in IsRunning
    plist = [re.match(ppatt, p.strip()).groups()[0] for p in str(proc.communicate()[0], encoding=utf-8).split(n)[1:-1]]
    TypeError: str() takes at most 1 argument (2 given)
    Looks like rpass expects the gpg-agent to be running when it starts.
    edit: rather, it expects the gpg-agent to be running with the key loaded. gpg-agent was already loaded thanks to keychain but without my newly created key known to it.
    Last edited by falconindy (2010-12-26 03:42:28)

  • RandomAccessFile: How do I Clear the txt file and write multiple lines of..

    Hello all,
    I am a 6th grade teacher and am taking a not so "Advanced Java Programming" class. Could someone please help me with the following problem.
    I am having trouble with RandomAccessFile.
    What I want to do is:
    1. Write multiple lines of text to a file
    2. Be able to delete previous entries in the file
    3. It would also be nice to be able to go to a certian line of text but not manditory.
    import java.io.*;
    public class Logger
    RandomAccessFile raf;
    public Logger()
         try
              raf=new RandomAccessFile("default.txt","rw");
              raf.seek(0);
              raf.writeBytes("");
         catch(Exception e)
              e.printStackTrace();
    public Logger(String fileName)
         try
              raf=new RandomAccessFile(fileName,"rw");
              raf.seek(0);
              raf.writeBytes("");
         catch(Exception e)
              e.printStackTrace();
    public void writeLine(String line)
         try
              long index=0;
              raf.seek(raf.length());          
              raf.writeBytes(index+" "+line);
         catch(Exception e)
              e.printStackTrace();
    public void closeFile()
         try
              raf.close();
         catch(Exception e)
              e.printStackTrace();
         }

    Enjoy! The length of the code is highly attributable to the test harness/shell thingy at the end. But anyway seems to work nicely.
    import java.io.*;
    /** File structure is as follows. 1st four bytes (int) with number of live records. Followed by records.
    <p>Records are structured as follows<ul>
    <li>Alive or dead - int
    <li>Length of data - int
    <li>Data
    </ul>*/
    public class SequentialAccessStringFile{
      private static int ALIVE = 1;
      private static int DEAD = 0;
      private int numRecords, currentRecord;
      private RandomAccessFile raf;
      /** Creates a SequentialAccessStringFile from a previously created file. */
      public SequentialAccessStringFile(String filename)throws IOException{
        this(filename,false);
      /** Creates a SequentialAccessStringFile. If createnew is true then a new file is created or if it
          already exists the old one is blown away. You must call this constructor with true if you do
          not have an existing file. */
      public SequentialAccessStringFile(String filename, boolean createnew)throws IOException{
        this.raf = new RandomAccessFile(filename,"rw");
        if(createnew){
          truncate();
        this.currentRecord = 0;
        this.raf.seek(0);
        this.numRecords = raf.readInt();
      /** Truncates the file deleting all existing records. */
      public void truncate()throws IOException{
        this.numRecords = 0;
        this.currentRecord = 0;
        this.raf.setLength(0);
        this.raf.writeInt(this.numRecords);
      /** Adds the given String to the end of this file.*/
      public void addRecord(String toAdd)throws IOException{
        this.raf.seek(this.raf.length());//jump to end of file
        byte[] buff = toAdd.getBytes();// uses default encoding you may want to change this
        this.raf.writeInt(ALIVE);
        this.raf.writeInt(buff.length);
        this.raf.write(buff);
        numRecords++;
        this.raf.seek(0);
        this.raf.writeInt(this.numRecords);
        this.currentRecord = 0;   
      /** Returns the record at given index. Indexing starts at zero. */
      public String getRecord(int index)throws IOException{
        seekToRecord(index);
        int buffLength = this.raf.readInt();
        byte[] buff = new byte[buffLength];
        this.raf.readFully(buff);
        this.currentRecord++;
        return new String(buff); // again with the default charset
      /** Returns the number of records in this file. */
      public int recordCount(){
        return this.numRecords;
      /** Deletes the record at given index. This does not physically delete the file but simply marks the record as "dead" */
      public void deleteRecord(int index)throws IOException{
        seekToRecord(index);
        this.raf.seek(this.raf.getFilePointer()-4);
        this.raf.writeInt(DEAD);
        this.numRecords--;
        this.raf.seek(0);
        this.raf.writeInt(this.numRecords);
        this.currentRecord = 0;
      /** Removes dead space from file.*/
      public void optimizeFile()throws IOException{
        // excercise left for reader
      public void close()throws IOException{
        this.raf.close();
      /** Positions the file pointer just before the size attribute for the record we want to read*/
      private void seekToRecord(int index)throws IOException{
        if(index>=this.numRecords){
          throw new IOException("Record "+index+" out of range.");           
        if(index<this.currentRecord){
          this.raf.seek(4);
          currentRecord = 0;     
        int isAlive, toSkip;
        while(this.currentRecord<index){
          //skip a record
          isAlive = this.raf.readInt();
          toSkip = this.raf.readInt();
          this.raf.skipBytes(toSkip);
          if(isAlive==ALIVE){
               this.currentRecord++;
        // the next live record is the record we want
        isAlive = this.raf.readInt();
        while(isAlive==DEAD){
          toSkip = this.raf.readInt();
          this.raf.skipBytes(toSkip);
          isAlive = this.raf.readInt();     
      public static void main(String args[])throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Create a new file? y/n");
        System.out.println("(No assumes file exists)");
        System.out.print("> ");
        String command = br.readLine();
        SequentialAccessStringFile test = null;
        if(command.equalsIgnoreCase("y")){
          System.out.println("Name of file");
          System.out.print("> ");
          command = br.readLine();
          test = new SequentialAccessStringFile(command,true);     
        }else{
          System.out.println("Name of file");
          System.out.print("> ");
          command = br.readLine();
          test = new SequentialAccessStringFile(command);     
        System.out.println("File loaded. Type ? for help");
        boolean alive = true;
        while(alive){
          System.out.print("> ");
          command = br.readLine();
          boolean understood = false;
          String[] commandArgs = command.split("\\s");
          if(commandArgs.length<1){
               continue;
          if(commandArgs[0].equalsIgnoreCase("quit")){
               test.close();           
               alive = false;
               understood = true;           
          if(commandArgs[0].equalsIgnoreCase("list")){
               System.out.println("#\tValue");
               for(int i=0;i<test.recordCount();i++){
                 System.out.println(i+"\t"+test.getRecord(i));
               understood = true;
          if(commandArgs[0].equalsIgnoreCase("truncate")){
               test.truncate();
               understood = true;
               System.out.println("File truncated");
          if(commandArgs[0].equalsIgnoreCase("add")){
                test.addRecord(commandArgs[1]);
                understood = true;
                System.out.println("Record added");
          if(commandArgs[0].equalsIgnoreCase("delete")){
                int toDelete = Integer.parseInt(commandArgs[1]);
                if((toDelete<0)||(toDelete>=test.recordCount())){
                  System.out.println("Record "+toDelete+" does not exist");
                }else{
                  test.deleteRecord(toDelete);
                  System.out.println("Record deleted");
                understood = true;
          if(commandArgs[0].equals("?")){
               understood = true;
          if(!understood){
               System.out.println("'"+command+"' unrecognized");
               commandArgs[0] = "?";
          if(commandArgs[0].equals("?")){
               System.out.println("list - prints current file contents");
               System.out.println("add [data] - adds data to file");
               System.out.println("delete [record index] - deletes record from file");
               System.out.println("truncate - truncates file (deletes all record)");
               System.out.println("quit - quit this program");
               System.out.println("? - displays this help");
        System.out.println("Bye!");
    }Sample output with test program
    C:\>java SequentialAccessStringFile
    Create a new file? y/n
    (No assumes file exists)
    yName of file
    mystringsFile loaded. Type ? for help
    add appleRecord added
    add orangeRecord added
    add cherryRecord added
    add pineappleRecord added
    list#       Value
    0       apple
    1       orange
    2       cherry
    3       pineapple
    delete 5Record 5 does not exist
    delete 1Record deleted
    list#       Value
    0       apple
    1       cherry
    2       pineapple
    add kiwiRecord added
    list#       Value
    0       apple
    1       cherry
    2       pineapple
    3       kiwi
    quitBye

  • Multiple String to search on the "Scan Output: Abnormal String" item

    in the job definition on the run tab on the "option scan output: abnormal string" we use this command pipe to search for the string to force the job to get abnormal status. there are some case that when the job runs and the program being called throws error message other than the string "error". for example it throws "invalid" string to indicate the program has error out. is there a work around to include more than one strings on the commnad pipe? please adivse.
    thanks,
    warren

    Just put a comma between the strings.  If your strings contain spaces you need to put quotes around it.  see below.
    "Not connected","Login failed","File not found","The system cannot find the file specified","Access is denied","Unknown host","Invalid command"

  • Please Help! my new MX472 scan has a black line in document feeder (SOLVED)

    I have no idea what to do or how to clean it. Everytime it scan using the automatic document feeder it has a black line going vertical on the left going straight down. How do I get rid of it? Thank yoU!
    here is what it look like
    a black line going down

    I took the top out and clean the glass and the black line is gone

Maybe you are looking for

  • Exchange Rate Differences for Alternative Currency

    F110 payment run for invoices posted in foreign currency creates automatic postings to exchange rate difference (realized gain or loss) accounts linked to KDW. What we are trying to do is to use another set of GL accounts to be posted automatically a

  • Getting Error code 2001 in Hyperion Workspace 11.1.1.2

    Hi, I have installed a Hyperion 11.1.1.2 setup with Sharedservice, Workspace and Reporting and Analysis services. I have a BQY dashboard, which contacts the database server from Workspace. In the Workspace Service Configurator, I am not able to see '

  • Cross references for Partner Profiles

    I have a requirement that I am not sure if is possible to do it, we have an IDOC/ALE integration with a middleware called Inovis TLE. From the side of TLE the communication with SAP is through Trading Partner that has to be created for every partner

  • The newbie is making demands!

    I know the subject is sort of offensive, sorry about that :) Here's the thing, i've been around a few webframeworks and app servers, used and coded on them but no real in depth web coding. I've seen pretty simple webapps entagled in a multitude of co

  • Possible to play while charging the battery?

    Is it possible  to play (listen to music) the ipod while charging the battery in the PC?