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
B

Blubbo

@Blubbo
About
Posts
174
Topics
74
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Trying to understand my mistake... with pointers
    B Blubbo

    I've got this the following code snippets... when compiling, I kept on getting error: implicit declaration of function. This "eeprom_memory_update_byte" came from avr/eeprom.h. What I am trying to update the atmel processor eeprom memory (not write, but to update) In commands.c (in a function):

    bool Update_EEPROM_Memory_byte(byte val1, byte val2)
    {
    uint8_t eepromAddr = val1;
    uint8_t eepromVal = val2;

    eeprom_memory_update_byte(eepromAddr, eepromVal);
    return 1;
    }

    In eeprom.h

    void eeprom_update_byte (uint8_t *__p, uint8_t __value);

    In eeprom.c

    bool eeprom_memory_update_byte(uint8_t eeprom_addr, uint8_t eepromValue)
    {
    eeprom_update_byte((uint8_t*) eeprom_addr, eepromValue);

    uint8\_t eepromVal = eeprom\_read\_byte(( uint8\_t \*) eeprom\_addr);
        
    if (eepromValue == eepromVal)
      return 1;
    else
      return 0;
    

    }

    please help!

    C / C++ / MFC help performance announcement

  • Local Service to monitor a folder on desktop
    B Blubbo

    As I said on the first post: Local Service.

    C# help tutorial question

  • Local Service to monitor a folder on desktop
    B Blubbo

    Help me to clarify the "account" you are speaking of? I'm on Administrator account.

    C# help tutorial question

  • Local Service to monitor a folder on desktop
    B Blubbo

    I am currently working on monitoring the folder on desktop. When the hex data files are dragged into the "Monitored" folder, it would automatically start to analyze the hex files and create the interpreted files into other folder. I have created the Local Service process "Interpreter Service". The thing is that when I started the service then it abruptly stopped running. Upon checking Event Viewer, it reported the error: Service cannot be started. System.ArgumentException: The directory name C:\Users\RBWorkstation\Desktop\Monitored Folder\ is invalid. at System.IO.FileSystemWatcher.set_Path(String value) at InterpreterService.UM_InterpreterService.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state) The folder is right on my desktop! So anyone have any suggestion on how to fix this so this service can find the folder? Thanks! ~ Ron Boucher

    C# help tutorial question

  • DataTable output to string with filter
    B Blubbo

    Thanks! I'm learning more depth on the use of DataTable... I do appreciate some help with this. You've answered my questions.

    C# tutorial workspace

  • DataTable output to string with filter
    B Blubbo

    I plan to write the "res" value into text file (also Excel file.) I used this example as to see the quick result of the res value output through MessageBox before I start writing to the file.

    C# tutorial workspace

  • DataTable output to string with filter
    B Blubbo

    Updated code... Seems to be working... Any suggestion for a better approach?

    DataTable dataTable = new DataTable();

    dataTable.Columns.Add("Variable", typeof(string));
    dataTable.Columns.Add("Hex Value", typeof(Int64));
    dataTable.Columns.Add("Value", typeof(string));
    dataTable.Columns.Add("Hide", typeof(bool));

    dataTable.Rows.Add("Ronald", 0x0, "Value = 0", false);
    dataTable.Rows.Add("Ronald", 0x1, "Value = 1", true);
    dataTable.Rows.Add("Ronald", 0x2, "Value = 2", false);
    dataTable.Rows.Add("Ronald", 0x4, "Value = 4", true);
    dataTable.Rows.Add("Ronald", 0x8, "Value = 8", false);
    dataTable.Rows.Add("Ronald", 0x16, "Value = 16", false);
    dataTable.Rows.Add("Ronald", 0x32, "Value = 32", false);
    dataTable.Rows.Add("Ronald", 0x64, "Value = 64", true);
    dataTable.Rows.Add("Ronald", 0x128, "Value = 128", false);
    dataTable.Rows.Add("Ronald", 0xFF, "Value = 255", true);

    try
    {
    DataRow selectedRow = dataTable.Select("").FirstOrDefault(x => (Int64)x["Hex Value"] == Convert.ToInt64(tb_Input.Text, 16));
    lbl_Result.Text = selectedRow["Value"].ToString();
    }
    catch
    {
    lbl_Result.Text = "Unknown";
    }

    DataRow[] drArrRow = dataTable.Select("Hide = False");
    DataTable filteredDataTable = new DataTable();

    filteredDataTable.Columns.Add("Variable", typeof(string));
    filteredDataTable.Columns.Add("Value", typeof(string));

    foreach (DataRow dr in drArrRow)
    {
    filteredDataTable.Rows.Add(dr["Variable"], dr["Value"]);
    }

    string res = String.Join(Environment.NewLine, filteredDataTable.Rows.OfType().Select(x => String.Join(" ; ", x.ItemArray)));

    MessageBox.Show(res);

    C# tutorial workspace

  • DataTable output to string with filter
    B Blubbo

    I've got it... Now one question hasn't been answered. How do I generate output showing only the "Variable" and "Value" columns?

    C# tutorial workspace

  • DataTable output to string with filter
    B Blubbo

    What I am trying to accomplish is that I am making the datatable to interpret large data. I only wanted to print out the header, then the data. Also only to show "Variable" and "Value" columns. I'm not sure how to weed out the "Hex Value" column. Also to list the rows that are (Hidden = false). I'm not sure how to accomplish this. On the bottom code (with variable "res" does show all of the rows with all of the columns, but no header... :sigh:

    DataTable dataTable = new DataTable();
    dataTable.Columns.Add("Variable", typeof(string));
    dataTable.Columns.Add("Hex Value", typeof(Int64));
    dataTable.Columns.Add("Value", typeof(string));
    dataTable.Columns.Add("Hidden", typeof(bool));

    dataTable.Rows.Add("Ronald", 0x0, "Value = 0", false);
    dataTable.Rows.Add("Ronald", 0x1, "Value = 1", false);
    dataTable.Rows.Add("Ronald", 0x2, "Value = 2", true);
    dataTable.Rows.Add("Ronald", 0x4, "Value = 4", true);
    dataTable.Rows.Add("Ronald", 0x8, "Value = 8", false);
    dataTable.Rows.Add("Ronald", 0x16, "Value = 16", true);
    dataTable.Rows.Add("Ronald", 0x32, "Value = 32", false);
    dataTable.Rows.Add("Ronald", 0x64, "Value = 64", false);
    dataTable.Rows.Add("Ronald", 0x128, "Value = 128", false);
    dataTable.Rows.Add("Ronald", 0xFF, "Value = 255", true);

    try
    {
    DataRow selectedRow = dataTable.Select("").FirstOrDefault(x => (Int64)x["Hex Value"] == Convert.ToInt64(tb_Input.Text, 16));
    lbl_Result.Text = selectedRow["Value"].ToString();
    }
    catch
    {
    lbl_Result.Text = "Unknown";
    }

    string res = String.Join(Environment.NewLine, dataTable.Rows.OfType().Select(x => String.Join(" ; ", x.ItemArray)));

    MessageBox.Show(res);

    C# tutorial workspace

  • Referencing dll locations
    B Blubbo

    Thanks! I'll get that fixed right away.

    C# announcement csharp visual-studio debugging help

  • Referencing dll locations
    B Blubbo

    Can you explain why? Is this the step that you're referring to: 1) right click on "Reference" node 2) Add Reference 3) Click on "Projects" tab 4) Select the dlls to reference

    C# announcement csharp visual-studio debugging help

  • Referencing dll locations
    B Blubbo

    Hmm I like the 2nd suggestion (external dll). That would sure help out!

    C# announcement csharp visual-studio debugging help

  • Referencing dll locations
    B Blubbo

    I'm using Visual Studio 2010. When I was compiling the execuables that contains 19 different dlls. Each dlls have dependency on other dlls. I just got bumped into a couple of incorrect dlls' date of creation. For example, one dll 'error.dll' is being depended by half of the dlls which consists of error codes and its translations. some of the dlls has error.dll referenced being pointed to the error/bin/debug and others was pointed to error/bin/release. When compiling overall solutions, the exe ended up having the wrong version of error.dll. Is there a better way to control the location of reference files... I mean a way to test or ensure that these references are pointed in their right places to ensure that these dlls are pulled correctly? Thanks... respond back if you have any questions or answers. ~ Ron Boucher

    C# announcement csharp visual-studio debugging help

  • Dll libraries
    B Blubbo

    Since that I have created about 15 separate libraries for the main exe, they are in the same folder as exe. I was thinking of putting those class libraries (DLLs) into a folder called "Libraries" in the main exe folder, so that the directory will look cleaner and organized. How can I do that so that the exe file can load libraries from "Libraries" folder? I'm using Visual Studio 2010 Premium.

    C# question csharp visual-studio

  • Compiling the codes
    B Blubbo

    Thanks! Now that the solution is much easier to work on and compiling! THANKS A HEAP!

    C# question csharp visual-studio announcement

  • Compiling the codes
    B Blubbo

    Found it.. but not sure how to add items in project dependencies. The thing is that the those dlls are seperated (independent) in other folders... I think I need to put those dll projects in the exe project. Am I right?

    C# question csharp visual-studio announcement

  • Compiling the codes
    B Blubbo

    I am not sure if there is an easy way to compile the codes. I have created 1 exe and 4 dlls. The exe relies (depends) on 4 dlls ('a', 'b', 'c', 'd'). Illustration is as shown below:

    exe -> 'a' -> 'c' -> 'd'
    -> 'b' ----^

    The 'd' dll is the lowest level. The 'd' is referenced in 'c' dll. and so on. Also that 'a' and 'b' dlls are referenced in exe. Now when making changes in 'c' dll, I would compile the exe but the 'c' dll remains previous version, not updated when compiling the exe. I would have to compile each dlls ('a', and 'b') then the exe so that the updated 'c' dll is passed over to the exe. Now for the question is there the easy way to compile those dlls at once? Thanks! : Forgot to add that I'm using Visual Studio 2010

    C# question csharp visual-studio announcement

  • Unit Testing with Serial Port
    B Blubbo

    ... Or the other way to perform "stimulated" serial port communication?

    C# testing beta-testing question

  • Unit Testing with Serial Port
    B Blubbo

    I am using Visual Studio premium 2010

    C# testing beta-testing question

  • Unit Testing with Serial Port
    B Blubbo

    Is there a way to override SerialPort.ReadExisting() method? I'm working on the unit testing on the software that involves with Serial Port communication, using "test doubles". Anyone can point me any suggestions? Thanks!

    C# testing beta-testing question
  • Login

  • Don't have an account? Register

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