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. General Programming
  3. C#
  4. Buffered Stream & OpenRead

Buffered Stream & OpenRead

Scheduled Pinned Locked Moved C#
csharplinqhelp
29 Posts 7 Posters 1 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.
  • C Offline
    C Offline
    computerpublic
    wrote on last edited by
    #1

    /*
    Hello friends, I am trying to show my students that a computer program is an arrangement of numbers. My kids love only video games and sports, but not every child is going to go on to play and make a living in sports. I am trying to get them interested in something other than sports. I am trying to engage then in something that they like that is more practical for them in the long run. I am not a computer programmer, but I know the importance of it. What you see here is what I have learn and read in books, but it is not working. I have tried many times to gain help in fixing this code, but no one in the forum wanted to help. They only wanted to make comments to show there arrogance. I have deleted some of it in order to make it short and simple. I can do some basic things, but now its getting very complicated. All i am attempting to do is read a file piece by piece, turn each byte into a number and SHOW IT, turn the number back to a byte and SHOW IT, then reassemble back the file and save it to another location the computer. That's all the kids want to see.
    */
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace Applica
    {
    class Program
    {
    static void Main(string[] args)
    {
    DirectoryInfo da = new DirectoryInfo("C:\\Folder1");
    FileInfo[] Arr = da.GetFiles();
    FileInfo ap = Arr[Arr.Length - 1];
    long Totbyte = ap.Length;
    string filePath = ap.FullName;
    Console.WriteLine("Total Bytes = {0} bytes", Totbyte);
    string temPath = Path.GetTempFileName();
    string temPath2 = Path.GetTempFileName();
    const int BufferSize = 1024;
    byte[] buffer = new byte[BufferSize];

            using (BufferedStream input = new BufferedStream(File.OpenRead(temPath)))
            {
                int bytesRead;
                using (BufferedStream output = new BufferedStream(File.OpenWrite(temPath2)))
                {
                    while ((bytesRead = input.Read(buffer, 0, BufferSize)) > 0)
                    {
                        // Convert the bytes to decimals:
                        decimal\[\] arry = new decimal\[Totbyte\];
                        for (int count = 0; count < buffer.Length; count++)
                        {
                            arry\[count\] = buffer\[count\];
                            Console.WriteLine("{0}={1}",arry\[
    
    Kornfeld Eliyahu PeterK OriginalGriffO L Richard DeemingR P 5 Replies Last reply
    0
    • C computerpublic

      /*
      Hello friends, I am trying to show my students that a computer program is an arrangement of numbers. My kids love only video games and sports, but not every child is going to go on to play and make a living in sports. I am trying to get them interested in something other than sports. I am trying to engage then in something that they like that is more practical for them in the long run. I am not a computer programmer, but I know the importance of it. What you see here is what I have learn and read in books, but it is not working. I have tried many times to gain help in fixing this code, but no one in the forum wanted to help. They only wanted to make comments to show there arrogance. I have deleted some of it in order to make it short and simple. I can do some basic things, but now its getting very complicated. All i am attempting to do is read a file piece by piece, turn each byte into a number and SHOW IT, turn the number back to a byte and SHOW IT, then reassemble back the file and save it to another location the computer. That's all the kids want to see.
      */
      using System;
      using System.IO;
      using System.Collections;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;

      namespace Applica
      {
      class Program
      {
      static void Main(string[] args)
      {
      DirectoryInfo da = new DirectoryInfo("C:\\Folder1");
      FileInfo[] Arr = da.GetFiles();
      FileInfo ap = Arr[Arr.Length - 1];
      long Totbyte = ap.Length;
      string filePath = ap.FullName;
      Console.WriteLine("Total Bytes = {0} bytes", Totbyte);
      string temPath = Path.GetTempFileName();
      string temPath2 = Path.GetTempFileName();
      const int BufferSize = 1024;
      byte[] buffer = new byte[BufferSize];

              using (BufferedStream input = new BufferedStream(File.OpenRead(temPath)))
              {
                  int bytesRead;
                  using (BufferedStream output = new BufferedStream(File.OpenWrite(temPath2)))
                  {
                      while ((bytesRead = input.Read(buffer, 0, BufferSize)) > 0)
                      {
                          // Convert the bytes to decimals:
                          decimal\[\] arry = new decimal\[Totbyte\];
                          for (int count = 0; count < buffer.Length; count++)
                          {
                              arry\[count\] = buffer\[count\];
                              Console.WriteLine("{0}={1}",arry\[
      
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #2

      Do you have a question to ask?

      I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      C 1 Reply Last reply
      0
      • C computerpublic

        /*
        Hello friends, I am trying to show my students that a computer program is an arrangement of numbers. My kids love only video games and sports, but not every child is going to go on to play and make a living in sports. I am trying to get them interested in something other than sports. I am trying to engage then in something that they like that is more practical for them in the long run. I am not a computer programmer, but I know the importance of it. What you see here is what I have learn and read in books, but it is not working. I have tried many times to gain help in fixing this code, but no one in the forum wanted to help. They only wanted to make comments to show there arrogance. I have deleted some of it in order to make it short and simple. I can do some basic things, but now its getting very complicated. All i am attempting to do is read a file piece by piece, turn each byte into a number and SHOW IT, turn the number back to a byte and SHOW IT, then reassemble back the file and save it to another location the computer. That's all the kids want to see.
        */
        using System;
        using System.IO;
        using System.Collections;
        using System.Collections.Generic;
        using System.Linq;
        using System.Text;

        namespace Applica
        {
        class Program
        {
        static void Main(string[] args)
        {
        DirectoryInfo da = new DirectoryInfo("C:\\Folder1");
        FileInfo[] Arr = da.GetFiles();
        FileInfo ap = Arr[Arr.Length - 1];
        long Totbyte = ap.Length;
        string filePath = ap.FullName;
        Console.WriteLine("Total Bytes = {0} bytes", Totbyte);
        string temPath = Path.GetTempFileName();
        string temPath2 = Path.GetTempFileName();
        const int BufferSize = 1024;
        byte[] buffer = new byte[BufferSize];

                using (BufferedStream input = new BufferedStream(File.OpenRead(temPath)))
                {
                    int bytesRead;
                    using (BufferedStream output = new BufferedStream(File.OpenWrite(temPath2)))
                    {
                        while ((bytesRead = input.Read(buffer, 0, BufferSize)) > 0)
                        {
                            // Convert the bytes to decimals:
                            decimal\[\] arry = new decimal\[Totbyte\];
                            for (int count = 0; count < buffer.Length; count++)
                            {
                                arry\[count\] = buffer\[count\];
                                Console.WriteLine("{0}={1}",arry\[
        
        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        And? They are "your students" - so you should in theory know more than them. And let's be honest here: reading data and converting it to a table of numbers is a trivial task in any modern language. "THE VISUAL PRESENTATION DOES NOT WORK" Yes, it does: it does exactly what you tell it to. All you have to do is work out what you want it to do, and tell it to do it... Which is, as I said, trivial. So what part of it is giving you a problem?

        Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        C 1 Reply Last reply
        0
        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

          Do you have a question to ask?

          I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

          C Offline
          C Offline
          computerpublic
          wrote on last edited by
          #4

          I clearly explain that the code was not working and I also commented the area where I think it is not working. Could you please not waste my time with stupid comments. If you have nothing useful to had, you could simply ignore my post and that would also be ok. I am school teacher and I am very busy. I am simply asking for some assistance with my code. I really don't need anymore of the idiotic comments. Thanks.

          Kornfeld Eliyahu PeterK 1 Reply Last reply
          0
          • C computerpublic

            I clearly explain that the code was not working and I also commented the area where I think it is not working. Could you please not waste my time with stupid comments. If you have nothing useful to had, you could simply ignore my post and that would also be ok. I am school teacher and I am very busy. I am simply asking for some assistance with my code. I really don't need anymore of the idiotic comments. Thanks.

            Kornfeld Eliyahu PeterK Offline
            Kornfeld Eliyahu PeterK Offline
            Kornfeld Eliyahu Peter
            wrote on last edited by
            #5

            As a school teacher you probably know what manner is, or you not as has noting of it? You see, 'does no work' is a very poor declaration. It does work and do exactly what you told to do. To describe a problem you should tell us the input, the expected output and the real output.

            I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

            "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

            C 1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              And? They are "your students" - so you should in theory know more than them. And let's be honest here: reading data and converting it to a table of numbers is a trivial task in any modern language. "THE VISUAL PRESENTATION DOES NOT WORK" Yes, it does: it does exactly what you tell it to. All you have to do is work out what you want it to do, and tell it to do it... Which is, as I said, trivial. So what part of it is giving you a problem?

              Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

              C Offline
              C Offline
              computerpublic
              wrote on last edited by
              #6

              Hey guys, thanks you very much. I will try to find someone on Craigslist who can do this for a small fee. Again, thank you very much.

              OriginalGriffO P 2 Replies Last reply
              0
              • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                As a school teacher you probably know what manner is, or you not as has noting of it? You see, 'does no work' is a very poor declaration. It does work and do exactly what you told to do. To describe a problem you should tell us the input, the expected output and the real output.

                I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

                C Offline
                C Offline
                computerpublic
                wrote on last edited by
                #7

                Hey guys, thanks you very much. I will try to find someone on Craigslist who can do this for a small fee. Again, thank you very much.

                Kornfeld Eliyahu PeterK 1 Reply Last reply
                0
                • C computerpublic

                  Hey guys, thanks you very much. I will try to find someone on Craigslist who can do this for a small fee. Again, thank you very much.

                  Kornfeld Eliyahu PeterK Offline
                  Kornfeld Eliyahu PeterK Offline
                  Kornfeld Eliyahu Peter
                  wrote on last edited by
                  #8

                  Just before you go, please tell us, what do you teach? Are you the box trainer?

                  I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

                  "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                  C 1 Reply Last reply
                  0
                  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                    Just before you go, please tell us, what do you teach? Are you the box trainer?

                    I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

                    C Offline
                    C Offline
                    computerpublic
                    wrote on last edited by
                    #9

                    To be quite honest I don't know what a box trainer is. I can only imagine that you are making a rude comments which is ok. I teach 12 year old children at a Public School 219 in Brooklyn . We are currently short staff, so everyone does a little of every thing to make our education system work. I was train as a social studies teacher, but I have been teaching everything but social studies. Thank you and have a great day.

                    1 Reply Last reply
                    0
                    • C computerpublic

                      /*
                      Hello friends, I am trying to show my students that a computer program is an arrangement of numbers. My kids love only video games and sports, but not every child is going to go on to play and make a living in sports. I am trying to get them interested in something other than sports. I am trying to engage then in something that they like that is more practical for them in the long run. I am not a computer programmer, but I know the importance of it. What you see here is what I have learn and read in books, but it is not working. I have tried many times to gain help in fixing this code, but no one in the forum wanted to help. They only wanted to make comments to show there arrogance. I have deleted some of it in order to make it short and simple. I can do some basic things, but now its getting very complicated. All i am attempting to do is read a file piece by piece, turn each byte into a number and SHOW IT, turn the number back to a byte and SHOW IT, then reassemble back the file and save it to another location the computer. That's all the kids want to see.
                      */
                      using System;
                      using System.IO;
                      using System.Collections;
                      using System.Collections.Generic;
                      using System.Linq;
                      using System.Text;

                      namespace Applica
                      {
                      class Program
                      {
                      static void Main(string[] args)
                      {
                      DirectoryInfo da = new DirectoryInfo("C:\\Folder1");
                      FileInfo[] Arr = da.GetFiles();
                      FileInfo ap = Arr[Arr.Length - 1];
                      long Totbyte = ap.Length;
                      string filePath = ap.FullName;
                      Console.WriteLine("Total Bytes = {0} bytes", Totbyte);
                      string temPath = Path.GetTempFileName();
                      string temPath2 = Path.GetTempFileName();
                      const int BufferSize = 1024;
                      byte[] buffer = new byte[BufferSize];

                              using (BufferedStream input = new BufferedStream(File.OpenRead(temPath)))
                              {
                                  int bytesRead;
                                  using (BufferedStream output = new BufferedStream(File.OpenWrite(temPath2)))
                                  {
                                      while ((bytesRead = input.Read(buffer, 0, BufferSize)) > 0)
                                      {
                                          // Convert the bytes to decimals:
                                          decimal\[\] arry = new decimal\[Totbyte\];
                                          for (int count = 0; count < buffer.Length; count++)
                                          {
                                              arry\[count\] = buffer\[count\];
                                              Console.WriteLine("{0}={1}",arry\[
                      
                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      computerpublic wrote:

                      All i am attempting to do is read a file piece by piece, turn each byte into a number

                      You're assuming a text-file in ASCII? In UTF, a charactar might consist of multiple bytes.

                      static void Main(string\[\] args)
                      {
                          string data;
                          using (var fs = new FileStream(path: @"D:\\Projects\\ConsoleApplication6\\ConsoleApplication6\\Program.cs", mode: FileMode.Open))
                          using (var rdr = new StreamReader(fs))
                          {
                              data = rdr.ReadToEnd();
                          }
                      
                          using (var fsout = new FileStream(path: "output.txt", mode: FileMode.Create))
                          foreach (char c in data)
                          {
                              Byte b = ASCIIEncoding.ASCII.GetBytes(new char\[\] { c })\[0\];
                              Console.WriteLine("{0} {1}", c, b);
                              fsout.WriteByte(b);
                          }
                      
                          Console.WriteLine();
                          Console.WriteLine(File.ReadAllText("output.txt"));
                      
                          Console.ReadLine();
                      }
                      

                      Put the cursor on the first line and press the F9. Next use F10 to step thorugh all the instructions. Soooo, to bring the subject back to my fee.. :suss:

                      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                      OriginalGriffO C 2 Replies Last reply
                      0
                      • L Lost User

                        computerpublic wrote:

                        All i am attempting to do is read a file piece by piece, turn each byte into a number

                        You're assuming a text-file in ASCII? In UTF, a charactar might consist of multiple bytes.

                        static void Main(string\[\] args)
                        {
                            string data;
                            using (var fs = new FileStream(path: @"D:\\Projects\\ConsoleApplication6\\ConsoleApplication6\\Program.cs", mode: FileMode.Open))
                            using (var rdr = new StreamReader(fs))
                            {
                                data = rdr.ReadToEnd();
                            }
                        
                            using (var fsout = new FileStream(path: "output.txt", mode: FileMode.Create))
                            foreach (char c in data)
                            {
                                Byte b = ASCIIEncoding.ASCII.GetBytes(new char\[\] { c })\[0\];
                                Console.WriteLine("{0} {1}", c, b);
                                fsout.WriteByte(b);
                            }
                        
                            Console.WriteLine();
                            Console.WriteLine(File.ReadAllText("output.txt"));
                        
                            Console.ReadLine();
                        }
                        

                        Put the cursor on the first line and press the F9. Next use F10 to step thorugh all the instructions. Soooo, to bring the subject back to my fee.. :suss:

                        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                        OriginalGriffO Offline
                        OriginalGriffO Offline
                        OriginalGriff
                        wrote on last edited by
                        #11

                        Eddy Vluggen wrote:

                        Soooo, to bring the subject back to my fee..

                        Try CraigsList - he says he is going to!

                        Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

                        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                        C 1 Reply Last reply
                        0
                        • C computerpublic

                          Hey guys, thanks you very much. I will try to find someone on Craigslist who can do this for a small fee. Again, thank you very much.

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #12

                          Is the education system in the USA really so rubbish that they let teachers who know nothing about complicated technical subjects teach it to people who probably know more about how to use the technology than the teachers? If so, then I'd fear for the future of your country, because that is like getting someone who can't drive to teach airline pilots to fly... :sigh:

                          Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          L P 2 Replies Last reply
                          0
                          • L Lost User

                            computerpublic wrote:

                            All i am attempting to do is read a file piece by piece, turn each byte into a number

                            You're assuming a text-file in ASCII? In UTF, a charactar might consist of multiple bytes.

                            static void Main(string\[\] args)
                            {
                                string data;
                                using (var fs = new FileStream(path: @"D:\\Projects\\ConsoleApplication6\\ConsoleApplication6\\Program.cs", mode: FileMode.Open))
                                using (var rdr = new StreamReader(fs))
                                {
                                    data = rdr.ReadToEnd();
                                }
                            
                                using (var fsout = new FileStream(path: "output.txt", mode: FileMode.Create))
                                foreach (char c in data)
                                {
                                    Byte b = ASCIIEncoding.ASCII.GetBytes(new char\[\] { c })\[0\];
                                    Console.WriteLine("{0} {1}", c, b);
                                    fsout.WriteByte(b);
                                }
                            
                                Console.WriteLine();
                                Console.WriteLine(File.ReadAllText("output.txt"));
                            
                                Console.ReadLine();
                            }
                            

                            Put the cursor on the first line and press the F9. Next use F10 to step thorugh all the instructions. Soooo, to bring the subject back to my fee.. :suss:

                            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                            C Offline
                            C Offline
                            computerpublic
                            wrote on last edited by
                            #13

                            You cannot engage children with text, you will lose there attention within 2 seconds. Children responds to media such as a short piece of music or video, that is why i choose to read bytes instead of what you did.

                            1 Reply Last reply
                            0
                            • C computerpublic

                              /*
                              Hello friends, I am trying to show my students that a computer program is an arrangement of numbers. My kids love only video games and sports, but not every child is going to go on to play and make a living in sports. I am trying to get them interested in something other than sports. I am trying to engage then in something that they like that is more practical for them in the long run. I am not a computer programmer, but I know the importance of it. What you see here is what I have learn and read in books, but it is not working. I have tried many times to gain help in fixing this code, but no one in the forum wanted to help. They only wanted to make comments to show there arrogance. I have deleted some of it in order to make it short and simple. I can do some basic things, but now its getting very complicated. All i am attempting to do is read a file piece by piece, turn each byte into a number and SHOW IT, turn the number back to a byte and SHOW IT, then reassemble back the file and save it to another location the computer. That's all the kids want to see.
                              */
                              using System;
                              using System.IO;
                              using System.Collections;
                              using System.Collections.Generic;
                              using System.Linq;
                              using System.Text;

                              namespace Applica
                              {
                              class Program
                              {
                              static void Main(string[] args)
                              {
                              DirectoryInfo da = new DirectoryInfo("C:\\Folder1");
                              FileInfo[] Arr = da.GetFiles();
                              FileInfo ap = Arr[Arr.Length - 1];
                              long Totbyte = ap.Length;
                              string filePath = ap.FullName;
                              Console.WriteLine("Total Bytes = {0} bytes", Totbyte);
                              string temPath = Path.GetTempFileName();
                              string temPath2 = Path.GetTempFileName();
                              const int BufferSize = 1024;
                              byte[] buffer = new byte[BufferSize];

                                      using (BufferedStream input = new BufferedStream(File.OpenRead(temPath)))
                                      {
                                          int bytesRead;
                                          using (BufferedStream output = new BufferedStream(File.OpenWrite(temPath2)))
                                          {
                                              while ((bytesRead = input.Read(buffer, 0, BufferSize)) > 0)
                                              {
                                                  // Convert the bytes to decimals:
                                                  decimal\[\] arry = new decimal\[Totbyte\];
                                                  for (int count = 0; count < buffer.Length; count++)
                                                  {
                                                      arry\[count\] = buffer\[count\];
                                                      Console.WriteLine("{0}={1}",arry\[
                              
                              Richard DeemingR Offline
                              Richard DeemingR Offline
                              Richard Deeming
                              wrote on last edited by
                              #14

                              computerpublic wrote:

                              string temPath = Path.GetTempFileName();

                              From the MSDN documentation:

                              http://msdn.microsoft.com/en-us/library/system.io.path.gettempfilename%28v=vs.110%29.aspx[^]

                              Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.

                              You have created an empty file; when you try to read it, you won't get any bytes returned, because it's empty.

                              computerpublic wrote:

                              Console.WriteLine("{0}={1}",arry[count],buffer[count]);//THE VISUAL PRESENTATION DOES NOT WORK

                              As you've written it, the code would print out "_NUMBER_=_NUMBER_" for each byte in the input file. Since there are no bytes in the input file, it won't have anything to display.

                              computerpublic wrote:

                              string filePath2 = Path.Combine("C:\\check", Path.GetFileName(filePath)); //THE OUTPUT FILE DOES NOT WORK output.Write(buffer, 0, bytesRead);

                              Apart from the fact that the input file is empty, your code suggests that you're trying to write to a file in the directory C:\check, but you're actually writing to another temporary file, which will be in the %TEMP% folder.

                              computerpublic wrote:

                              turn each byte into a number and SHOW IT, turn the number back to a byte and SHOW IT

                              A byte is a number. It's a number between 0 and 255. There's no need to turn it into a number. Saying "I need to turn this byte into a number" is like saying "I need to turn this fluid into a liquid". There's no conversion needed. What I suspect you want to do is display the byte in different number bases - for

                              "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                              1 Reply Last reply
                              0
                              • OriginalGriffO OriginalGriff

                                Eddy Vluggen wrote:

                                Soooo, to bring the subject back to my fee..

                                Try CraigsList - he says he is going to!

                                Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

                                C Offline
                                C Offline
                                computerpublic
                                wrote on last edited by
                                #15

                                I am sorry I approach you the wrong way. I didn't the code project forum was about charging individual for help. After all it is a "forum". The country is quickly becoming second class because those who know do not want help those who do not know. Our jails and prison are full to capacity and prisoners in California are being release prematurely to make room for new prisoners. Think about education the next you see someone getting robs or violated. It could be you, your neighbor or your love ones. Its because of education or lack of education why our prison system is overwhelmed. You disgrace the forum when you make comments about being paid. You tarnish the reputation of the people who genuinely join the forum to help others. You can insult me and be as rude as you want. At least I am trying to help these kids to be interested in something. Have a good day Sir.

                                Richard DeemingR OriginalGriffO L 3 Replies Last reply
                                0
                                • C computerpublic

                                  I am sorry I approach you the wrong way. I didn't the code project forum was about charging individual for help. After all it is a "forum". The country is quickly becoming second class because those who know do not want help those who do not know. Our jails and prison are full to capacity and prisoners in California are being release prematurely to make room for new prisoners. Think about education the next you see someone getting robs or violated. It could be you, your neighbor or your love ones. Its because of education or lack of education why our prison system is overwhelmed. You disgrace the forum when you make comments about being paid. You tarnish the reputation of the people who genuinely join the forum to help others. You can insult me and be as rude as you want. At least I am trying to help these kids to be interested in something. Have a good day Sir.

                                  Richard DeemingR Offline
                                  Richard DeemingR Offline
                                  Richard Deeming
                                  wrote on last edited by
                                  #16

                                  OK. Step away from the computer, take several deep breaths, and count to 10. Then realise that Eddy was joking when he mentioned his "fee". That Griff was joining in with that joke. And that nobody here was trying to insult you or be rude. We're generally a friendly bunch of geeks and nerds, even if our sense of humour might seem odd to outsiders. :)


                                  "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                  "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                                  Kornfeld Eliyahu PeterK C 2 Replies Last reply
                                  0
                                  • Richard DeemingR Richard Deeming

                                    OK. Step away from the computer, take several deep breaths, and count to 10. Then realise that Eddy was joking when he mentioned his "fee". That Griff was joining in with that joke. And that nobody here was trying to insult you or be rude. We're generally a friendly bunch of geeks and nerds, even if our sense of humour might seem odd to outsiders. :)


                                    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                    Kornfeld Eliyahu PeterK Offline
                                    Kornfeld Eliyahu PeterK Offline
                                    Kornfeld Eliyahu Peter
                                    wrote on last edited by
                                    #17

                                    You are wrong! I tried to insult him after all that rude comments he had! If he was a teacher in the school of my kids - he wasn't!!! I hope he does not pass his anger and impatience on the kids...

                                    I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

                                    "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                                    Richard DeemingR 1 Reply Last reply
                                    0
                                    • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                                      You are wrong! I tried to insult him after all that rude comments he had! If he was a teacher in the school of my kids - he wasn't!!! I hope he does not pass his anger and impatience on the kids...

                                      I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

                                      Richard DeemingR Offline
                                      Richard DeemingR Offline
                                      Richard Deeming
                                      wrote on last edited by
                                      #18

                                      OK, let me change that to: "We're generally a friendly bunch of geeks and nerds, apart from that Kornfeld Eliyahu Peter, who's a nasty scary man who should be avoided at all costs!" ;P


                                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                                      Kornfeld Eliyahu PeterK 1 Reply Last reply
                                      0
                                      • Richard DeemingR Richard Deeming

                                        OK. Step away from the computer, take several deep breaths, and count to 10. Then realise that Eddy was joking when he mentioned his "fee". That Griff was joining in with that joke. And that nobody here was trying to insult you or be rude. We're generally a friendly bunch of geeks and nerds, even if our sense of humour might seem odd to outsiders. :)


                                        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                        C Offline
                                        C Offline
                                        computerpublic
                                        wrote on last edited by
                                        #19

                                        I am a proud American and I try to instill the same values in the students. America use to be #1 in everything. Where are we now? I guess we are too busy making jokes. This is the CodeProject, not Comedy Central. Some of the users are going away from the core values of the CodeProject stand for. The jokes are not appreciated by me or my students. Mr. Deeming, thank you for your solution. I have not tried it yet, but looks like very professional. Thank you.

                                        Richard DeemingR 1 Reply Last reply
                                        0
                                        • Richard DeemingR Richard Deeming

                                          OK, let me change that to: "We're generally a friendly bunch of geeks and nerds, apart from that Kornfeld Eliyahu Peter, who's a nasty scary man who should be avoided at all costs!" ;P


                                          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                          Kornfeld Eliyahu PeterK Offline
                                          Kornfeld Eliyahu PeterK Offline
                                          Kornfeld Eliyahu Peter
                                          wrote on last edited by
                                          #20

                                          Thank you. I demand accuracy!

                                          I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

                                          "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                                          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