Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. My Disk is BAD

My Disk is BAD

Scheduled Pinned Locked Moved The Lounge
c++
13 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Tuotrut

    My stupid disk is BAD. Why the MBR!!! Why was it hit by a cosmic ray!!!

    -------------------------- Eric I still need to learn C++! --------------------------

    C Offline
    C Offline
    code frog 0
    wrote on last edited by
    #2

    I'm going to regret asking this :-> but why do you think your disk is bad and what is it about the MBR that's wrong. I'm sorry my cosmic ray mis-fired and hit you. I was trying to snipe mosquitos and one of my mirrors in my terra-array got bumped by my 18 month old daughter. I've not got some bubble gum holding it in place so the odds are less that it might mis-fire again. ... Now back to your HDD... What gives? Tell us more as some of us may have some ideas for you...:cool: Of course it's entirely possible you know it's X| as you saw the little :badger: beating it with a hammer and if so we'll join you in R.I.P. :rose:

    A 1 Reply Last reply
    0
    • C code frog 0

      I'm going to regret asking this :-> but why do you think your disk is bad and what is it about the MBR that's wrong. I'm sorry my cosmic ray mis-fired and hit you. I was trying to snipe mosquitos and one of my mirrors in my terra-array got bumped by my 18 month old daughter. I've not got some bubble gum holding it in place so the odds are less that it might mis-fire again. ... Now back to your HDD... What gives? Tell us more as some of us may have some ideas for you...:cool: Of course it's entirely possible you know it's X| as you saw the little :badger: beating it with a hammer and if so we'll join you in R.I.P. :rose:

      A Offline
      A Offline
      Anton Afanasyev
      wrote on last edited by
      #3

      That there is the best use of emoticons (especialle the badger) and free time ive seen on these forums..But then ofcourse, i dont visit the soapbox...


      :badger:

      C 1 Reply Last reply
      0
      • A Anton Afanasyev

        That there is the best use of emoticons (especialle the badger) and free time ive seen on these forums..But then ofcourse, i dont visit the soapbox...


        :badger:

        C Offline
        C Offline
        code frog 0
        wrote on last edited by
        #4

        Well I'm actually searching the web high and low for code that would allow you to pull an image from a database convert it to a byte[] array and stream it into an image control in asp .net and it would appear that my fictional laser would be easier to pull off as there's not a single example out there that explains a way to do this. So I figured to pass away time wilst I restarted firefox by expressing my own boredom and frustration of the moment...:sigh:

        A M 2 Replies Last reply
        0
        • C code frog 0

          Well I'm actually searching the web high and low for code that would allow you to pull an image from a database convert it to a byte[] array and stream it into an image control in asp .net and it would appear that my fictional laser would be easier to pull off as there's not a single example out there that explains a way to do this. So I figured to pass away time wilst I restarted firefox by expressing my own boredom and frustration of the moment...:sigh:

          A Offline
          A Offline
          Anton Afanasyev
          wrote on last edited by
          #5

          no need for excuses ;P and as to your problem, do you _have_ to stream it? if im understanding correctly, cant you just create an image object from the byte[] and then output that to the client? if nothing else, create a separate page that does that...and then reference it with an index of the item in the DB or something. all that page would do is just output the image(gotten from the byte[]) and set its(page's) output type(or whatever its called) to image(/jpeg or something else, cant remember).


          :badger:

          C 1 Reply Last reply
          0
          • T Tuotrut

            My stupid disk is BAD. Why the MBR!!! Why was it hit by a cosmic ray!!!

            -------------------------- Eric I still need to learn C++! --------------------------

            K Offline
            K Offline
            kakan
            wrote on last edited by
            #6

            Have you tried to boot DOS and do a "FDISK /MBR" command?

            Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

            1 Reply Last reply
            0
            • A Anton Afanasyev

              no need for excuses ;P and as to your problem, do you _have_ to stream it? if im understanding correctly, cant you just create an image object from the byte[] and then output that to the client? if nothing else, create a separate page that does that...and then reference it with an index of the item in the DB or something. all that page would do is just output the image(gotten from the byte[]) and set its(page's) output type(or whatever its called) to image(/jpeg or something else, cant remember).


              :badger:

              C Offline
              C Offline
              code frog 0
              wrote on last edited by
              #7

              Yes, I can do that and I've seen that as an option but it sure seems like there should be a more elegant solution. I'd like to page the stream into memory and then build the image from the byte stream out of memory. It's looking like I'll have to use what you suggest or do something along the lines of RequestImage->WriteStreamToFile->DisplayImage.ImageURL(FilePath)->DeleteFile which is a lot more IO than I want and disk access is always a total annoyance at least they are 15,000 RPM SCSI drives but still... With all the *HYPE* in .Net and considering how *EASY* the same thing is in Winforms you'd think they would have take that tiny bit of effort to make it the same in ASP .Net. There are times where I really do wish I had the code to the framework...:suss: I'm going to pester the guys in the ASP.Net forum just to make sure I'm not overlooking something...

              A 1 Reply Last reply
              0
              • C code frog 0

                Yes, I can do that and I've seen that as an option but it sure seems like there should be a more elegant solution. I'd like to page the stream into memory and then build the image from the byte stream out of memory. It's looking like I'll have to use what you suggest or do something along the lines of RequestImage->WriteStreamToFile->DisplayImage.ImageURL(FilePath)->DeleteFile which is a lot more IO than I want and disk access is always a total annoyance at least they are 15,000 RPM SCSI drives but still... With all the *HYPE* in .Net and considering how *EASY* the same thing is in Winforms you'd think they would have take that tiny bit of effort to make it the same in ASP .Net. There are times where I really do wish I had the code to the framework...:suss: I'm going to pester the guys in the ASP.Net forum just to make sure I'm not overlooking something...

                A Offline
                A Offline
                Anton Afanasyev
                wrote on last edited by
                #8

                code-frog wrote:

                There are times where I really do wish I had the code to the framework...

                You could always learn ASM and find a disassembler you like..... And for the streaming thing, I remember I've spent a fair amount of time on trying to find that, although back in the days(heh, ok, not _THAT_ long ago) of .Net 1.0 and the only way I could get it to work is from a separate page. Ive actually tried the save-to-file-read-from-it-delete-it solution. was too slow and my HDD hated it. If you find something though, do share. i'm very interested in this, jsut for personal knowledge.


                :badger:

                1 Reply Last reply
                0
                • T Tuotrut

                  My stupid disk is BAD. Why the MBR!!! Why was it hit by a cosmic ray!!!

                  -------------------------- Eric I still need to learn C++! --------------------------

                  R Offline
                  R Offline
                  Rohde
                  wrote on last edited by
                  #9

                  Boot on your Windows XP install disk with command prompt support. Then do a fixmbr followed by a fixboot and you should be set unless your disk is physically damaged of course.

                  1 Reply Last reply
                  0
                  • C code frog 0

                    Well I'm actually searching the web high and low for code that would allow you to pull an image from a database convert it to a byte[] array and stream it into an image control in asp .net and it would appear that my fictional laser would be easier to pull off as there's not a single example out there that explains a way to do this. So I figured to pass away time wilst I restarted firefox by expressing my own boredom and frustration of the moment...:sigh:

                    M Offline
                    M Offline
                    Mike Dimmick
                    wrote on last edited by
                    #10

                    I'm fairly sure I've seen this done as an HttpHandler - .ashx file. Example: http://www.dotnetmaniac.com/ArticleViewer.aspx?Key={60bf8794-bb75-4c7b-b0fa-8a7e0a63540a}[^].

                    Stability. What an interesting concept. -- Chris Maunder

                    A 1 Reply Last reply
                    0
                    • M Mike Dimmick

                      I'm fairly sure I've seen this done as an HttpHandler - .ashx file. Example: http://www.dotnetmaniac.com/ArticleViewer.aspx?Key={60bf8794-bb75-4c7b-b0fa-8a7e0a63540a}[^].

                      Stability. What an interesting concept. -- Chris Maunder

                      A Offline
                      A Offline
                      Anton Afanasyev
                      wrote on last edited by
                      #11

                      If I could rate you more than a 5, I would. I guess I gotta start learning things from books and not through self-experimentation. ASP.Net might be one of them, although i VERY much dislike all that is .Net. Ironically, we use C# at work(not a web app).


                      :badger:

                      1 Reply Last reply
                      0
                      • T Tuotrut

                        My stupid disk is BAD. Why the MBR!!! Why was it hit by a cosmic ray!!!

                        -------------------------- Eric I still need to learn C++! --------------------------

                        J Offline
                        J Offline
                        Joe Q
                        wrote on last edited by
                        #12

                        Tuotrut wrote:

                        My stupid disk is BAD.

                        Is that evil BAD? :mad: or BAD not working? X|

                        T 1 Reply Last reply
                        0
                        • J Joe Q

                          Tuotrut wrote:

                          My stupid disk is BAD.

                          Is that evil BAD? :mad: or BAD not working? X|

                          T Offline
                          T Offline
                          Tuotrut
                          wrote on last edited by
                          #13

                          not working X| X| X| It was a cheap computer and the disk is only 2 years old! X| X| X|

                          -------------------------- Eric I still need to learn C++! --------------------------

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups