reading a barcode generated from a weight scale in vb.net [closed] - vb.net

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
guys usually a scale's barcode contain digits that refer for the item itself and other digits which refers to the weight and price, all in the barcode itself. How can i read this barcode (getting the item in a textbox, the weight in other textbox and the price too)in vb.net.
any ideas? thanks!

Most barcode reading components are able to read multiple barcodes per so all you have to do is to
scan barcodes from image or web-cam
check every barcode's value length or format to determine if a value relates to the price or weight
additionally check X and Y coordinates of barcodes. If price barcode is always on top then you just need to find which barcode is placed higher by checking barcode1.Y > barcode2.Y
If you are looking for an open source barcode reading component then check ZXing.NET project. If you are looking for commercially supported API then check Leadtools, ByteScout BarCode Reader SDK and others
Disclosure: I'm related with ByteScout

Most likely it will be a single barcode but with different parts of the data string holding different digits (each sub-string holds a value). For example, the first digit might indicate whether this is a combined barcode with weight and/or price in it. Digits 3 to 6 could hold the item code and digits 9 to 13 could hold the price or weight value.
To get the exact specs, you'll need the information from the manufacturer of the scale that prints the barcodes. To decode them, simply read the barcode (for example like Eugene M suggested) and get the string, then split it according to the scale manufacturer's specifications.

Related

Sabre- BARGAIN FINDER MAX (OTA_AirLowFareSearchRQ) ResponseType="" [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm currently working on the development of Sabre SOAP API's for Air(Flights) and using BargainFinderMax(OTA_AirLowFareSearchRQ) to search for flight availability. so in the request, there is a parameter ResponseType that defines the type of response to the requested data.
My Question is: if there is any responsetype which will bring the result grouped based upon the prices. ForExample: a group with one price = $1000 will contain multiple Options of flights (having different timings). For now, I can only get the OTA and GIR response type. which shows separate itineraries having the same price, as shown in the image below:
It has two itineraries with the same data(same price) but different Legs. What I'm actually looking for is that Itineraries with same price be grouped together in a single element.
Same as the response returned in TravelPort if we make LOWFARESEARCH Request and set SolutionResult="false". it gives PricePoint results i.e. Itineraries grouped in a single pricepoint. Can this be possible in sabre?
ResponseType can only have those 2 values, as stated in the request documentation: ResponseType, specify type of the response, valid values: "OTA" - regular OTA response, "GIR" - Grouped Itinerary Response.
If not used, it will default to OTA.
Anyway, even though it is harder to read (by a person), GIR groups almost everything, in order to avoid duplicating data. But, since the price of the whole itinerary is inside the itinerary element, the only way to do what you want is by looping through the itineraries and grouping them together, and it can be achieved using either OTA or GIR. There's nothing built in for that.

conceptual SQL - price per piece and price per weight [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
This is a rather conceptual question:
I am working on a database with tables "product-information" and "buying transactions" - now the product-information table so far features "price" and the buying-transactions table features "amount".
But, some products are supposed to be paid per piece, and some have a price per weight.
Now I am unsure how to go about this without allowing decimal values for amounts.
Should I have the products have a flag if they are to be processed as price per weight and just do further calculations in the surrounding program? That seems to be rather impractical, since it makes aggregation in queries rather impossible. Or should I allow decimals but prohibit them in the user interface for things to be bought by piece, again requiring a flag?
What is the most sensible approach here?
Basically imagine a database containing receipts from groceries shopping and the appropriate information for each product. The user would insert the contents of a cart and the sum total would be calculated and spit out by the program, as well as the calculated price for each article to be paid per weight.
I'm sorry for the stupidity of the question.
Here's what we do for LedgerSMB, and I think the solution works relatively well.
Items are all priced per "unit." Items have a price per unit and a unit descriptor (human readable).
Items sold per piece have a unit of "piece". Items sold per weight have a unit like "kg", "oz", "g" or "T"
Price and quantity sold are both Numeric types without precision specified (so in PostgreSQL at least you have no precision limits).
Our table structure looks something like this (simplified for this question)
CREATE TABLE parts (
id SERIAL PRIMARY KEY,
sku VARCHAR NOT NULL,
unit BARCHAR(5) NOT NULL,
sell_price NUMERIC,
last_cost NUMERIC,
description TEXT,
obsolete BOOL
);
CREATE UNIQUE INDEX parts_sku_active_idx ON parts(sky) WHERE obsolete IS NOT TRUE;

Get text to display based off another reference [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to create an e-mail subject line, based on data in a cell which references another cell.
For some context, I work for an airline (not in IT you will be glad to know!) and I am trying to create a system which saves us from having to type things out, over and over again!
Desired output.
User selects "Live" or "Not Live" flight from list.
If user selects "Live", the airport code (stored in a different cell) is to show.
If user selects "Not Live", the airport code (stored in a different cell) is not to show.
I managed to put together an IF statement for the first leg, which just consisted of one flight, however I'm now struggling to find an efficient way for the other 5 sectors.
Example.
To make things a bit easier to understand, I will refer to each airport as A, B, C, D, E and F. In real life, these would be 3 letters, like Heathrow is LHR for example.
Sector 1 A-B - Not Live
Sector 2 C-D - Live
Sector 3 E-F - Not Live
Sector 4 F-E - Live
Sector 5 D-C - Not Live
Sector 6 B-A - Not Live
E-mail subject line format for above: C-D-F-E
I can for sure create the above off IF statements, however this would leave with: C-DF-E - If I was to work around it about put a hyphen at the end of D, then this wouldn't show correctly if the data was to change.
I need to stress that the "-" must separate each airport code but not at the start or end.
I hope you can help :)
Thanks!
I would rather do this with VBA, but this does work:

How to choose between two items based on a percentage in Objective-C? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am trying to figure out how to choose between two things based on a percentage, but I don't know how to code it correctly. I am trying to choose between item a and item b when the chance of item a being chosen is 33.33% and item b is 66.67%. I'm not sure if I should use if else statements or something else. I would like to know how to code it in objective c, but any advice would be helpful.
Thanks
If the percentages are fixed, it's quite easy:
int result = (arc4random_uniform(3) == 0) ? a : b;
Essentially, this says "if a uniformly distributed non-negative integer strictly less than 3 is exactly equal to 0 (which happens 1/3 of the time), then the value of this expression is a, else it is b".

table architecture,what is the best practice? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i know this is a strange question !
i need to create a table called "Smartphone".
the question is about number of columns.
do i must to create every column for every characteristic ?
(Model
Band
SIM
Telephone operator
Shell material
Operating System
CPU
GPU
ROM
RAM
Storage expansion
Size
Type
Resolution
Ringtones
Audio
Video
Image
E-book
FM Radio 
Earphones
Data transfer
Internet
Camera
Battery
Languages
Posts
Entry
TV
GPS
JAVA
WIFI
Bluetooth
Gravity Sensor
Multi-Touch
Dimensions
Weight
Standby time
Size
Weight
Accessories
)
or i just need to create the general characteristics and in the last. i create an column called “moreinformations” wish i put all information’s ...
cause i need to show all this information's and fliter by specific characteristics
what is the best practice ?
I would put all available MODEL BANDS, SIM, OPERATORS, SHELL MATERIAL, etc, so that every value which repeats and is not integer, into separated tables and then use foreign key. Example:
CREATE TABLE systems
(
ID int not null primary key,
name varchar(50),
-- other parameters
)
Other values, like bluetooth, wi-fi, would be boolean if the only states are exists or not exists, or numeric if there could be more values.
If there could be more bands or other things, I would create another table BAND LINKS, which links smartphones and bands, example band1 has ID=1, band2 had ID=2, and smartphone1 has ID=1, then I would insert into table BAND LINKS values (1,1) and (1,2) which means that 1 and 2 band is connected to ID=1 smartphone. Of course I would add procedures to improve performance.