gel | modern gem manager : Gel is a lightweight alternative | Command Line Interface library

 by   gel-rb Ruby Version: v0.8.0.pre1 License: MIT

kandi X-RAY | gel Summary

kandi X-RAY | gel Summary

gel is a Ruby library typically used in Utilities, Command Line Interface, Ruby On Rails applications. gel has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A modern gem manager. Gel is a lightweight alternative to Bundler. This gem is still a work in progress, and things that are still needing some additional improvements include Documentation, UI & Error Messages, and Platform compatibility. We are open to and appreciate any help improving any of these areas.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              gel has a low active ecosystem.
              It has 757 star(s) with 26 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 9 open issues and 45 have been closed. On average issues are closed in 372 days. There are 15 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of gel is v0.8.0.pre1

            kandi-Quality Quality

              gel has 0 bugs and 0 code smells.

            kandi-Security Security

              gel has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              gel code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              gel is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              gel releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              gel saves you 9609 person hours of effort in developing the same functionality from scratch.
              It has 19605 lines of code, 610 functions and 84 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed gel and discovered the below as its top functions. This is intended to give you an instant insight into gel implemented functionality, and help decide if they suit your requirements.
            • Gets the dependencies for the given repository
            • Add Ruby versions to Ruby versions .
            • Require from the target directory .
            • Returns a range generated by the given version .
            • Gets the gemspec .
            • Determine the priority of priority by priority .
            • Install a gem .
            • Require require path for the gem
            • Create a list of gems
            • Return detailed information
            Get all kandi verified functions for this library.

            gel Key Features

            No Key Features are available at this moment for gel.

            gel Examples and Code Snippets

            No Code Snippets are available at this moment for gel.

            Community Discussions

            QUESTION

            function write in python for a json file
            Asked 2021-Jun-06 at 22:56

            I'm a beginner in python so I have this program where it classifies tweets into different categories (sport,sante, culture...) using keywords and I would like to copy-paste every line of the JSON file that belongs to a certain category into a file named text1 and I did the following : but I guess I did it the wrong way since I keep receiving the same error please any suggestion on how to solve this problem!

            ...

            ANSWER

            Answered 2021-Jun-06 at 22:54

            This might be a very simple case of fixing the encoding.

            Your error says:

            Source https://stackoverflow.com/questions/67864202

            QUESTION

            Django ecommerce: Reverse for 'cart_add' with arguments '('',)' not found. 1 pattern(s) tried: ['cart/add/(?P[0-9]+)/$']
            Asked 2021-May-22 at 10:15

            This is my first ecommerce web-site with django and it's a little tough to wrap my head around all the routing and cart function, and I fixed lots of stuff, but I just can't fix this error. I tried doing some stuff in urls but it just didn't work out.

            onlineshop/models.py:

            ...

            ANSWER

            Answered 2021-May-19 at 15:51

            Your routing logic is fine, i think your only mistake is in the use of quotes in the template onlineshop/detail.html

            You have:

            Source https://stackoverflow.com/questions/67605488

            QUESTION

            How to exclude product category from php code in woocommerce
            Asked 2021-May-20 at 10:26

            I'm using this piece of code to display the range price of variable product from € - €€€ to Starting From €. I'm taking the max price and divide it by 10 because my max variation is a pack of 10.

            ...

            ANSWER

            Answered 2021-May-20 at 10:26

            It looks like you're using the ELEX WooCommerce Dynamic Pricing and Discounts Plugin or similar, as eha_variable_sale_price_html is not a standard WooCommerce hook name.

            In any case, you should be able to access the global $product object, which you can query to get its id or its product categories. Based on that, you can then build your check to determine whether you need to divide the max price by 10 or not.

            For example, a criteria based on the product category would look like this (you will need to adapt the Quantity Product category name to your case):

            Source https://stackoverflow.com/questions/67600198

            QUESTION

            How to extract number from text in Google Sheets
            Asked 2021-May-15 at 07:26

            My product names contain different sizes: e.g. 100ml, 50ml, 30ml.

            Sample product name:

            ...

            ANSWER

            Answered 2021-May-15 at 07:24

            QUESTION

            how to update indexeddb store items with dexie
            Asked 2021-Mar-27 at 20:08

            I have Indexed db table

            ...

            ANSWER

            Answered 2021-Mar-27 at 20:08

            If you just want to increment the "quantity" property of given newItemId in cartitems, do:

            Source https://stackoverflow.com/questions/66832463

            QUESTION

            Correct usage of includes and extends in use case diagram
            Asked 2021-Mar-24 at 09:03

            I am creating a use case diagram for a barber shop system. I am not sure if the Add Product Inventory use case should include the Purchase Product use case.

            The actors which will interact with the barber shop system are:

            1. Customers
            2. System users (ie. Barber)
            3. System Administrator (ie. Manager)

            All users will need to be able to login in, customers will need to register if they are a first time user.

            The customer will interact with the system to make a booking or purchase a product i.e gel, shampoo, wax. A booking can extend to cancelling the appointment, it is unlikely for the customer to be able to reschedule the appointment but rather cancel the appointment and book again at a different time.

            The system user, the barbers, need to be able to view the timetable of appointments, view customer contact details and login to the system.

            The system admin, who is likely a manager and head barber, should also be able to view the timetable of appointments, view customer contact details and add a product inventory to the store. The product inventory will also include setting product specification, the colour or size of product, and setting the price.

            ...

            ANSWER

            Answered 2021-Mar-23 at 04:27

            I'm not familiar with the business rules in your scenario, so this is a little bit of guess-work and a few assumptions which you can verify.

            I assume the 'Add Product Inventory' Use Case is about adding products to an inventory of all products. For our purposes to answer your question, I don't think it matters whether this Use Case relates to adding one product, multiple products, managing products (e.g. editing or removing them), whether the inventory already exists or not, or if the Inventory is a separate thing to the Products on it, but answers to those questions are not 100% clear from your model and you may consider clarifying those points.

            I also assume that a Product needs to be on the Inventory in order that it can be Purchased. If that is the case, then I think what you are asking is about this very point -- how do I represent the fact that the Product needs to be Added to the Inventory before it can be Purchased? If that is what you're asking, then you can represent that using a simple 'dependency' relationship which would run from the Purchase Product Use Case to the Add Product Inventory Use Case as per below. This states that the Product Purchase is somehow dependent on Add Product, but does not go further in explaining that relationship. Alternatively, you could use a preceedes relationship running instead from the Add to the Purchase. I don't think extend is the correct relationship -- the steps of Add Product don't need to be factored in every time you Purchase Product, the dependency is on the objective of Add Product having first been achieved, not the steps.

            Source https://stackoverflow.com/questions/66754536

            QUESTION

            Why CSS animation isn't working when i use focus code?
            Asked 2021-Mar-08 at 02:08

            ...

            ANSWER

            Answered 2021-Mar-07 at 13:59
                .btn:focus{
                    animation:kac_git 500ms ease-in-out;
            

            Source https://stackoverflow.com/questions/66517152

            QUESTION

            How can I make a "read-more" button for mutiple text elements?
            Asked 2021-Feb-23 at 20:40

            I have multiple images on my website with some text about each image.

            ...

            ANSWER

            Answered 2021-Feb-23 at 20:33

            It looks like you are using jQuery already. You might want to consider using the toggle() function, which is just for this purpose:

            https://www.w3schools.com/jquery/eff_toggle.asp

            Source https://stackoverflow.com/questions/66340640

            QUESTION

            How can I sort an object using a key value of the object
            Asked 2021-Feb-23 at 08:37
                orders: {
                orders: [
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 3
                      },
                      {
                        id: '-MKBFdmYxUmkl0snpb-o',
                        oldPrice: '220',
                        productName: 'Saffola Low Cholestrol Mustard Oil (Bottle)',
                        unitPrice: '140',
                        units: 1
                      },
                      {
                        id: '-MKLtgt8Q1t7lSSLqYsH',
                        oldPrice: '840',
                        productName: 'Tide Extra Power Jasmine & Rose Detergent Powder - Brand Offer',
                        unitPrice: '729',
                        units: 1
                      }
                    ],
                    time: '26/01/2021, 10:42:17',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 1253,
                    id: '-MRx5pf06D6Jq-dha9L5'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 1
                      },
                      {
                        id: '-MKBFdmYxUmkl0snpb-o',
                        oldPrice: '220',
                        productName: 'Saffola Low Cholestrol Mustard Oil (Bottle)',
                        unitPrice: '140',
                        units: 1
                      },
                      {
                        id: '-MKF-drZP73W4DfO72bl',
                        oldPrice: '375',
                        productName: ' Aashirvaad Shudh Chakki Whole Wheat Atta',
                        unitPrice: '331',
                        units: 1
                      },
                      {
                        id: '-MKLt0meR1fvFF4ZgNY2',
                        oldPrice: '417',
                        productName: 'Tata Premium Tea (Pouch)',
                        unitPrice: '371',
                        units: 1
                      }
                    ],
                    time: '26/01/2021, 20:19:07',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 970,
                    id: '-MRz9rMOBbWcCY-fFDd8'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 1
                      }
                    ],
                    time: '25/01/2021, 15:25:05',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 128,
                    id: '-MRsxyfq3vWm1dFZl_oW'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 1
                      },
                      {
                        id: '-MKBFdmYxUmkl0snpb-o',
                        oldPrice: '220',
                        productName: 'Saffola Low Cholestrol Mustard Oil (Bottle)',
                        unitPrice: '140',
                        units: 1
                      },
                      {
                        id: '-MKF-drZP73W4DfO72bl',
                        oldPrice: '375',
                        productName: ' Aashirvaad Shudh Chakki Whole Wheat Atta',
                        unitPrice: '331',
                        units: 1
                      },
                      {
                        id: '-MKLt0meR1fvFF4ZgNY2',
                        oldPrice: '417',
                        productName: 'Tata Premium Tea (Pouch)',
                        unitPrice: '371',
                        units: 1
                      }
                    ],
                    time: '26/01/2021, 20:19:09',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 970,
                    id: '-MRz9ragOIxJXilPF3MB'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 1
                      },
                      {
                        id: '-MKBFdmYxUmkl0snpb-o',
                        oldPrice: '220',
                        productName: 'Saffola Low Cholestrol Mustard Oil (Bottle)',
                        unitPrice: '140',
                        units: 1
                      },
                      {
                        id: '-MKF-drZP73W4DfO72bl',
                        oldPrice: '375',
                        productName: ' Aashirvaad Shudh Chakki Whole Wheat Atta',
                        unitPrice: '331',
                        units: 1
                      },
                      {
                        id: '-MKLt0meR1fvFF4ZgNY2',
                        oldPrice: '417',
                        productName: 'Tata Premium Tea (Pouch)',
                        unitPrice: '371',
                        units: 1
                      },
                      {
                        id: '-MKLtgt8Q1t7lSSLqYsH',
                        oldPrice: '840',
                        productName: 'Tide Extra Power Jasmine & Rose Detergent Powder - Brand Offer',
                        unitPrice: '729',
                        units: 1
                      },
                      {
                        id: '-MKLuAm-emA5UzIhXpAD',
                        oldPrice: '162',
                        productName: 'Ghadi Detergent Powder',
                        unitPrice: '147',
                        units: 1
                      },
                      {
                        id: '-MKLwhRgudFHBbPR18lW',
                        oldPrice: '800',
                        productName: 'Surf Excel Matic Front Load Detergent Powder (Carton) - Free 1 kg - Brand Offer',
                        unitPrice: '720',
                        units: 1
                      },
                      {
                        id: '-MKLyeF47-VAn9Q6nJCf',
                        oldPrice: '134',
                        productName: 'Exo Bacterial Ginger Twist Round Touch & Shine Dishwash Bar',
                        unitPrice: '113',
                        units: 1
                      }
                    ],
                    time: '24/01/2021, 12:16:30',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 2679,
                    id: '-MRn8D25UUj5rRfAJ5EN'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 2
                      },
                      {
                        id: '-MKBFdmYxUmkl0snpb-o',
                        oldPrice: '220',
                        productName: 'Saffola Low Cholestrol Mustard Oil (Bottle)',
                        unitPrice: '140',
                        units: 1
                      },
                      {
                        id: '-MKLtgt8Q1t7lSSLqYsH',
                        oldPrice: '840',
                        productName: 'Tide Extra Power Jasmine & Rose Detergent Powder - Brand Offer',
                        unitPrice: '729',
                        units: 1
                      },
                      {
                        id: '-MKLubjoPaBv3lUIeEb6',
                        oldPrice: '1050',
                        productName: 'Ariel Matic Top Load Detergent Powder - Buy 4 kg Get 2 kg Free - Brand Offer',
                        unitPrice: '899',
                        units: 2
                      }
                    ],
                    time: '23/02/2021, 12:44:06',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 2923,
                    id: '-MUCjE5dAurxRu9Ac6EB'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '8901138509231',
                        oldPrice: '250',
                        productName: 'Aashirvaad Atta',
                        unitPrice: '200',
                        units: 1
                      }
                    ],
                    time: '25/01/2021, 15:25:37',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 200,
                    id: '-MRsy5ZvNiIai7U-O5Rj'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKLwhRgudFHBbPR18lW',
                        oldPrice: '800',
                        productName: 'Surf Excel Matic Front Load Detergent Powder (Carton) - Free 1 kg - Brand Offer',
                        unitPrice: '720',
                        units: 2
                      },
                      {
                        id: '-MKLyeF47-VAn9Q6nJCf',
                        oldPrice: '134',
                        productName: 'Exo Bacterial Ginger Twist Round Touch & Shine Dishwash Bar',
                        unitPrice: '113',
                        units: 2
                      },
                      {
                        id: '-MKLzSzyLKiALq4f6RTS',
                        oldPrice: '155',
                        productName: 'Vim Lemon Dishwash Gel (Bottle)',
                        unitPrice: '143',
                        units: 2
                      }
                    ],
                    time: '24/01/2021, 11:44:40',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 1952,
                    id: '-MRn0w2Srovbr3-0vh9j'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 2
                      },
                      {
                        id: '-MKBFdmYxUmkl0snpb-o',
                        oldPrice: '220',
                        productName: 'Saffola Low Cholestrol Mustard Oil (Bottle)',
                        unitPrice: '140',
                        units: 1
                      },
                      {
                        id: '-MKLtgt8Q1t7lSSLqYsH',
                        oldPrice: '840',
                        productName: 'Tide Extra Power Jasmine & Rose Detergent Powder - Brand Offer',
                        unitPrice: '729',
                        units: 1
                      }
                    ],
                    time: '26/01/2021, 11:09:12',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 1125,
                    id: '-MRxC-8BgmG2InUeUwrV'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKLzSzyLKiALq4f6RTS',
                        oldPrice: '155',
                        productName: 'Vim Lemon Dishwash Gel (Bottle)',
                        unitPrice: '143',
                        units: 2
                      }
                    ],
                    time: '25/01/2021, 15:27:10',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 286,
                    id: '-MRsyS9Ez1_wIAxqMMIF'
                  },
                  {
                    addressDetails: {
                      addressLine1: 'Dhruba\'s Home',
                      addressLine2: 'Dhauliguri',
                      city: 'Kokrajhar',
                      email: 'dhruba@mac.com',
                      landmark: 'Chandrapara Gas Agency',
                      phoneNo: '9876543210',
                      pinCode: '783321'
                    },
                    products: [
                      {
                        id: '-MKBFRQbLhkV5yvtclpD',
                        oldPrice: '186',
                        productName: 'Fortune Premium Kachi Ghani Pure Mustard Oil',
                        unitPrice: '128',
                        units: 1
                      },
                      {
                        id: '-MKBFdmYxUmkl0snpb-o',
                        oldPrice: '220',
                        productName: 'Saffola Low Cholestrol Mustard Oil (Bottle)',
                        unitPrice: '140',
                        units: 3
                      },
                      {
                        id: '-MKLtgt8Q1t7lSSLqYsH',
                        oldPrice: '840',
                        productName: 'Tide Extra Power Jasmine & Rose Detergent Powder - Brand Offer',
                        unitPrice: '729',
                        units: 1
                      },
                      {
                        id: '-MKLubjoPaBv3lUIeEb6',
                        oldPrice: '1050',
                        productName: 'Ariel Matic Top Load Detergent Powder - Buy 4 kg Get 2 kg Free - Brand Offer',
                        unitPrice: '899',
                        units: 4
                      },
                      {
                        id: '-MKLw4cxIo5TUgrVkgmq',
                        oldPrice: '420',
                        productName: 'Tide Ultra 3 in 1 Clean Detergent Powder - Get 1 kg Free',
                        unitPrice: '369',
                        units: 4
                      }
                    ],
                    time: '27/01/2021, 22:06:46',
                    userId: 'fWXFsnaK8vcHUX4QFVHaBePWvFr2',
                    amount: 6349,
                    id: '-MS3h5JurxnAWlLL8J4l'
                  }
                ],
                loading: false,
                error: null,
                fetched: true
              }
            }
            
            ...

            ANSWER

            Answered 2021-Feb-23 at 08:24

            You are creating Date() objects in your sorting function but you do not use them for comparison. Instead you are comparing the raw time strings from your object.

            The raw timestamp is not sort-friendly.

            If you really want to use it for sorting it should look like 2021/02/23, 12:44:06 instead of 23/02/2021, 12:44:06

            Source https://stackoverflow.com/questions/66329096

            QUESTION

            Selecting data In Excel as a group between certain cells and dividing each by group value to find percentage
            Asked 2021-Feb-07 at 12:36

            Background: I have a table describing a imaginary formulation. The main ingredients/materials are Flavour A, B, and Emulsion and a gel mix. These are highlighted in bold in the table (see attached image).

            • Flavour A makes up 54% of the total formulation and is made up of sub-components: water, Benzoic acid, HCl and Sodium
            • Flavour B makes up 10% of the formulation and is not made up on any sub components i.e. is 100%.
            • The Emulsion makes up 19% of the formulation consisting of Water, Oil, Nacl and Ester and a Blue Dye
            • The Gel mix makes up the final 17% of the formulation and consists of Gel A, B, a gum texture and purified water.

            The attached images also shows the percentage of each sub component making up each ingredient.

            Although this is a made up example the data I am provided with is presented in the same way.

            Problem: I wish to create a new column D that, looking at this data, can automatically calculates the percentage of each sub ingredient as a percentage of the Main ingredients. For example the Oil/Lipid is 63% of the emulsion which is 19% of the total formulation. (0.63*0.19)*100 = 11.97 as the desired output in column D. Similarly a hyphen in column C indicates the ingredient is 100% and should return a value equal to the percentage of the entire formulation e.g 54% returns 54. The total of each of these values will not add up to 100 since the output will contain values for the original material and its constituent sub components.

            The way the data is formatted is however what makes this quite challenging.

            What I have tried so far: Firstly I cannot offer any existing code, simply because I don't know how to go about this. All I can think of so far is that because when a Hyphen is present in column C, this identifies the start of the sub component list and the next hyphen will identify the end. Each value between these two then need to be independently divided by the cell adjacent to the hyphen In column B and multiplied by 100 (Note if necessary the hyphen can be changed to 1.0 or 100%). I'm wondering if the data can be filtered in some way (FILTERXML?) but I'm not sure.

            The desired outcome column in the attached image show the the values I am trying to achieve in column D. These were achieved by manually calculating each value however that is what I am trying to avoid here. (apologies if there are any mistakes)

            Any help is really appreciated (even if some elaborate work around). Equally however if you don't think this is possible let me know.

            Thanks very much.

            ...

            ANSWER

            Answered 2021-Feb-07 at 00:56

            Please try this formula. Paste to D3 and copy down.

            Source https://stackoverflow.com/questions/66083323

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install gel

            If you're on a Mac, we recommend that you install via Homebrew:.

            Support

            Bug reports and pull requests are welcome on GitHub at https://github.com/gel-rb/gel. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/gel-rb/gel.git

          • CLI

            gh repo clone gel-rb/gel

          • sshUrl

            git@github.com:gel-rb/gel.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link