GithubHelp home page GithubHelp logo

prakashbh / inventory-data-structure Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 7.0 588 KB

A data structure which can be used to manage inventory data. To be generic, any kind of 2D data where we have keywords and properties associated with each, tabulated in a table.

C 100.00%

inventory-data-structure's People

Contributors

prajwalkpatil avatar prakashbh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

inventory-data-structure's Issues

Formatting the table and its contents

The structure of the table while it is printed appears to be not formatted appropriately, the values of the same columns don't lie exactly below each other.

I have attempted to fix this issue.

The table which used to look like this,

old

Will look like this-

new

This will work for values of any length.

I will be posting a pull request soon!

add_key function isn't functioning as expected

The add_key function in inventory.c is not adding the key and values to the table correctly

    // Read the data from file and load into the main memory
    while (!feof(fp))
    {
        fscanf(fp, "%s %s", key, property);
        strcpy(inventory[index][key_count], property);
        index++;
    }
  • String named key is kept unused throughout the function.
  • The data read by that function is messing up the whole inventory table in the secondary memory when it is opened for the second time.

When table is viewed after updating, it is incomplete even if key and all the values are added

table_issue

When program is rerun and the table is fetched from the secondary storage, The whole table appears to be messed up.

messedtable_issue

Is it an issue or am I going wrong somewhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.