Questions tagged [quantities]

13 questions
2
votes
0 answers

SQL database model for physical quantities (table per datasource)

We are performing measurements of physical quantities and use a database (MSSQLSERVER2014) to analyze the data. The data is read from files (binary/text) to our database. We currently have the following datastructure for the table of the…
2
votes
0 answers

How to get the value of the steps quantity product added to WooCommerce cart?

I used this code to filter the products added to the cart of a certain category (id = 70). My goal is to count the number of step quantities added to the cart of a product belonging to the '70' category. Example: Minimum quantity: 0 Step: 100 I…
Vincenzo Di Gaetano
  • 3,892
  • 3
  • 13
  • 32
2
votes
0 answers

how to concatenate python quantities?

I am working with the quantities module of python, and I want to concatenate two quantiy arrays. If I use numpy.concatenate(), I loose the unit from quantities. The quantities package itself does not provide a .concatenate() method for its arrays.…
grg rsr
  • 558
  • 5
  • 13
1
vote
0 answers

How to limit quantities of discount coupon usage times in laravel

e.g .. i create a new coupon that can be use 50 times. After used 50 times, it will be expired or cannot use anymore. coupon quantities will decrease with each use .
yan naing
  • 37
  • 1
  • 6
1
vote
0 answers

Different custom quantities for each single product page woocommerce

I am working on an e-commerce site, which I want to add different custom quantities for each single product separately. For example, I want business cards page with quantities goes as 250,500,1000,1200, 1500 etc.. and Magnets page quantities goes as…
Manjula
  • 13
  • 5
1
vote
0 answers

pylatex: quantities passed in string

I'm using pylatex and the python quantities packages to create a formatted pdf and want to be able to write something like: My custom text and the math: F = 1.982 × 10^20 N I can use pylatex's doc.append() to add text and I can use it to add a…
Sandy
  • 201
  • 2
  • 9
1
vote
0 answers

An "online bin packing fixed number of bins fixed items" / "knapsack" situation

I'm trying to define what kind of problem I'm dealing with. I think it's a mixture of Online Bin packing and Knapsack. The premises are: 1) I have a fixed quantity of bins (let's say N). 2) I have to fill the bins with a fixed quantity of items (k),…
1
vote
1 answer

UnitsNet and WPF

We are possibly about to introduce UnitsNet in our application for two reasons: Type safe computations and ability to switch between different unit systems (metric, imperial etc.) This means those types will be all over our application and also in…
Olle
  • 13
  • 2
1
vote
1 answer

How to specify a scalar multiplier for units when using Quantities?

The objective is to handle cell densities expressed as "1000/mm^3", i.e. thousands per cubic millimeter. Currently I do this to handle "1/mm^3": import quantities as pq d1 = pq.Quantity(500000, "1/mm**3") which gives: array(500000) * 1/mm**3 But…
0
votes
0 answers

Training NN to map quantities into a grid

I created a simple NN (multi-layer percetpron acutally) in pytorch that takes a vector of quantities as an input and outputs an assignment map so that the products with the biggest quantities are placed the closest to the origin of the 2d map (the…
0
votes
0 answers

How can I specify a UnitsNet type in attribute?

I have a simple model class that holds values from a calculation, as doubles. Several properties are accessible, and I control the base unit, in this case I can guarantee they are in Millimeters for length, cubic millimeters for Volume and so…
Krazykraut
  • 11
  • 2
0
votes
2 answers

Identify columns, add quantites, delete duplicates

I'm working on compiling BOM's for electrical equipment. I've got a total of 18 BOMS with about 160 items each. I'm looking for a code that will scan through all of the data and identify duplicates, take their values, add them up, then delete the…
Ted
  • 3
  • 5
0
votes
1 answer

Extremely confused on how I can combine quantities and words in one line when outputting?

I am trying to make a program which will take in a list from the user with both quantities and words. However, I have everything done but am unable to combine the numbers with according word(s) on the same line. It continues to output all the…
Hannah B.
  • 23
  • 3