Search Results

Search found 254 results on 11 pages for 'barcode'.

Page 4/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • WP7 BarcodeManager - Invalid cross-thread access

    - by rpf
    I'm trying to use Windows Phone 7 Silverlight ZXing Barcode Scanning Library but I'm having some problems. I'm using a background worker to check the image, but when I do this: WP7BarcodeManager.ScanBarcode(this.Image, BarcodeResults_Finished); The code throws an exception: Invalid cross-thread access. Here is my code... void photoChooserTask_Completed(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { ShowImage(); System.Windows.Media.Imaging.BitmapImage bmp = new System.Windows.Media.Imaging.BitmapImage(); bmp.SetSource(e.ChosenPhoto); imgCapture.Source = bmp; this.Image = new BitmapImage(); this.Image.SetSource(e.ChosenPhoto); progressBar.Visibility = System.Windows.Visibility.Visible; txtStatus.Visibility = System.Windows.Visibility.Collapsed; worker.RunWorkerAsync(); } else ShowMain(); } void worker_DoWork(object sender, DoWorkEventArgs e) { try { Thread.Sleep(2000); WP7BarcodeManager.ScanMode = com.google.zxing.BarcodeFormat.UPC_EAN; WP7BarcodeManager.ScanBarcode(this.Image, BarcodeResults_Finished); } catch (Exception ex) { Debug.WriteLine("Error processing image.", ex); } } How can I solve this?

    Read the article

  • QR Code encoding and decoding using zxing

    - by helixed
    Okay, so I'm going to take the off chance that someone here has used zxing before. I'm developing a Java application, and one of the things it needs to do is encode a byte array of data into a QR Code and then decode it at a later time. Here's an example of what my encoder looks like: byte[] b = {0x48, 0x45, 0x4C, 0x4C, 0x4F}; //convert the byte array into a UTF-8 string String data; try { data = new String(b, "UTF8"); } catch (UnsupportedEncodingException e) { //the program shouldn't be able to get here return; } //get a byte matrix for the data ByteMatrix matrix; com.google.zxing.Writer writer = new QRCodeWriter(); try { matrix = writer.encode(data, com.google.zxing.BarcodeFormat.QR_CODE, width, height); } catch (com.google.zxing.WriterException e) { //exit the method return; } //generate an image from the byte matrix int width = matrix.getWidth(); int height = matrix.getHeight(); byte[][] array = matrix.getArray(); //create buffered image to draw to BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); //iterate through the matrix and draw the pixels to the image for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int grayValue = array[y][x] & 0xff; image.setRGB(x, y, (grayValue == 0 ? 0 : 0xFFFFFF)); } } //write the image to the output stream ImageIO.write(image, "png", outputStream); The beginning byte array in this code is just used to test it. The actual byte data will be varied. Here's what my decoder looks like: //get the data from the input stream BufferedImage image = ImageIO.read(inputStream); //convert the image to a binary bitmap source LuminanceSource source = new BufferedImageLuminanceSource(image); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); //decode the barcode QRCodeReader reader = new QRCodeReader(); Result result; try { result = reader.decode(bitmap, hints); } catch (ReaderException e) { //the data is improperly formatted throw new MCCDatabaseMismatchException(); } byte[] b = result.getRawBytes(); System.out.println(ByteHelper.convertUnsignedBytesToHexString(result.getText().getBytes("UTF8"))); System.out.println(ByteHelper.convertUnsignedBytesToHexString(b)); convertUnsignedBytesToHexString(byte) is a method which converts an array of bytes in a string of hexadecimal characters. When I try to run these two blocks of code together, this is the output: 48454c4c4f 202b0b78cc00ec11ec11ec11ec11ec11ec11ec Clearly the text is being encoded, but the actual bytes of data are completely off. Any help would be appreciated here. Thanks, helixed

    Read the article

  • how to convert sql union to linq

    - by lowlyintern
    I have the following Transact SQL query using a union. I need some pointers as to how this would look in LINQ i.e some examples wouldbe nice or if anyone can recommend a good tutorial on UNIONS in linq. select top 10 Barcode, sum(ItemDiscountUnion.AmountTaken) from (SELECT d.Barcode,SUM(AmountTaken) AmountTaken FROM [Aggregation].[dbo].[DiscountPromotion] d GROUP BY d.Barcode UNION ALL SELECT i.Barcode,SUM(AmountTaken) AmountTaken FROM [Aggregation].[dbo].ItemSaleTransaction i group by i.Barcode) ItemDiscountUnion group by Barcode

    Read the article

  • Code Golf: Code 39 Bar Code

    - by gwell
    The challenge The shortest code by character count to draw an ASCII representation of a Code 39 bar code. Wikipedia article about Code 39: http://en.wikipedia.org/wiki/Code_39 Input The input will be a string of legal characters for Code 39 bar codes. This means 43 characters are valid: 0-9 A-Z (space) and -.$/+%. The * character will not appear in the input as it is used as the start and stop characters. Output Each character encoded in Code 39 bar codes have nine elements, five bars and four spaces. Bars will be represented with # characters, and spaces will be represented with the space character. Three of the nine elements will be wide. The narrow elements will be one character wide, and the wide elements will be three characters wide. A inter-character space of a single space should be added between each character pattern. The pattern should be repeated so that the height of the bar code is eight characters high. The start/stop character * (bWbwBwBwb) would be represented like this: # # ### ### # # # ### ### # # # ### ### # # # ### ### # # # ### ### # # # ### ### # # # ### ### # # # ### ### # ^ ^ ^^ ^ ^ ^ ^^^ | | || | | | ||| narrow bar -+ | || | | | ||| wide space ---+ || | | | ||| narrow bar -----+| | | | ||| narrow space ------+ | | | ||| wide bar --------+ | | ||| narrow space ----------+ | ||| wide bar ------------+ ||| narrow space --------------+|| narrow bar ---------------+| inter-character space ----------------+ The start and stop character * will need to be output at the start and end of the bar code. No quiet space will need to be included before or after the bar code. No check digit will need to be calculated. Full ASCII Code39 encoding is not required, just the standard 43 characters. No text needs to be printed below the ASCII bar code representation to identify the output contents. The character # can be replaced with another character of higher density if wanted. Using the full block character U+2588, would allow the bar code to actually scan when printed. Test cases Input: ABC Output: # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # # # ### ### # ### # # # ### # ### # # ### ### ### # # # # # ### ### # Input: 1/3 Output: # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # # # ### ### # ### # # # ### # # # # # ### ### # # # # # ### ### # Input: - $ (minus space dollar) Output: # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # # # ### ### # # # # ### ### # ### # ### # # # # # # # # ### ### # Code count includes input/output (full program).

    Read the article

  • Is there a website to lookup barcodes?

    - by strange
    Hi I know there's a http://www.upcdatabase.com/ website that allows you to lookup barcodes. This website however does not return anything for thousands of normal household items. I have seen free apps on mobile phones that can do this and list the exact product name along with price comparison. Does anyone know of good websites (even commercial ones) that have a good/reliable database that one could use for lookups?

    Read the article

  • Using Symbol MC70 series scanner with native code

    - by Sandeep
    Is it possible to use Symbol MC70 series scanner with native code? I have a Windows Mobile application written using Lazarus(Object pascal) and I want to use it with Symbol MC70. The sdk that they have are for C, .NET and Java. I had a look at the C sdk and it comes with .LIB files which I cannot use with Object Pascal. I have no clue as to how the scanner is working with .NET stuff, I could not see a WIN32 dll in the files provided, maybe it is in the cab file. Any suggestions as to what I should do to get the scanners to work for me. Sandeep

    Read the article

  • Read data matrix barcodes on iPhone?

    - by Saurabh
    Hi All, Is there any Open Source project I can use to read data matrix codes (not QR codes, I know I can use ZXing project to read QR Codes) on iPhone? Any JAVA Open Source would also be helpful (I'll convert that into a web service and use on iPhone). Any help would be much appreciated! Thanks Saurabh

    Read the article

  • Error when decoding image C# asp

    - by Wayneio
    I am trying to use MessagingToolkit to decode an image in C#/ASP. I have managed to encode a qr using this package, but when i try to decode, using the code below it comes up with 2 errors (at the bottom of the page) I believe this is because I am not getting the image correctly after uploading, but can someone point out exactly where I have gone wrong. Thanks. protected void CreateCode_OnClick(object sender, EventArgs e) { string path = "C:\\Users\\Wayneio\\Documents\\Visual Studio 2012\\Projects\\BAMSystem\\BAMSystem\\"; if (QRUpload.HasFiles == true) { FileInfo fi = new FileInfo(QRUpload.FileName); string extA = fi.Extension; if (extA == ".jpg" || extA == ".png") { QRCodeDecoder decoder = new QRCodeDecoder(); QRUpload.SaveAs(path + QRUpload.FileName); System.Drawing.Image myImg = System.Drawing.Image.FromFile(path + QRUpload.FileName); decoder.Decode(myImg); } else { error.Text = "You have uploaded a " + extA + " file. Please upload either a PNG or a JPG"; } } else { error.Text = "You have not uploaded an image."; } } Error1: Error 2 Argument 1: cannot convert from 'System.Drawing.Image' to 'MessagingToolkit.QRCode.Codec.Data.QRCodeImage' c:\users\wayneio\documents\visual studio 2012\Projects\BAMSystem\BAMSystem\default.aspx.cs 38 35 BAMSystem Error2: Error 1 The best overloaded method match for 'MessagingToolkit.QRCode.Codec.QRCodeDecoder.Decode(MessagingToolkit.QRCode.Codec.Data.QRCodeImage)' has some invalid arguments c:\users\wayneio\documents\visual studio 2012\Projects\BAMSystem\BAMSystem\default.aspx.cs 38 20 BAMSystem P.S if anyone has documentation on this MessagingToolkit QR package, it would be useful

    Read the article

  • INI file reverse engineering

    - by Akshar Prabhu Desai
    I am maintaining a legacy application which prints product labels on packaging. The format of the label is stored in a INI file. I wanted to know if anyone has any hints about the meaning of this format. I have pasted a snippet here. {D1531,1000,1501|} {C|} {U2;0130|} {D1531,1000,1501|} {AX;+000,+000,+00|} {AY;+05,0|} {PC000;0922,0555,15,15,H,11,B|} {RC00;<FE/>LABELTITLE</FE>|} {PC001;0865,0555,15,15,H,11,B|} {RC01;<FE/>CURRENT</FE>|} {PC002;0796,0040,10,10,H,11,B|}

    Read the article

  • Barcodes and Bugs

    - by Tim Dexter
    A great mail from Mike at Browning last week. He has been through the ringer getting his BIP barcoding sorted out but he's now out of the woods. Here's the final result. By way of explanation, an excerpt from Mike's email:   This is an example of the GS1_128 carton shipping labels we are now producing with BIP in our web application for our vendors who drop ship products to our dealers. It produces 4 labels per printed page, in PDF format, on peel & stick label paper. Each label has a unique carton number, and a unique carton serial number in the SSCC-18 barcode. This example is for Cabelas (each customer has slightly different GS1-128 label format requirements – custom template for each - a pain!). I am using custom java encoders I wrote for the UPC and SSCC-18 barcodes, and a standard encoder (code128b) for the ShipTo zip barcode. Is there any way yet to get around that SUPER ANNOYING bug when opening the rtf template in MS Word, and it replaces my xsl code text in the barcode fields with gibberish??? Every time I open it I have to re-enter all the xsl code. Not only to be able to read & edit it, but also to get it to work in BIP (BIP doesn’t like the gibberish if I upload the template that has it). Mike's last point, regarding the annoying bug in the template builder, is one that I have experienced occasionally. The development team have looked at it and found it to be an issue with MSWord and not a plugin problem. That's all well and good but how can you get around it? Well, you can take advantage of the font mapping that BIP offers to get the barcodes into the PDF output. As many of you know, getting a barcode font to appear in the PDF output, you need employ the use of the xdo.cfg file in the template builder config directory.You would normally have an entry such as this:         <font family="Code 128" style="normal" weight="normal">        <truetype path="C:\windows\fonts\128R00.TTF" />       </font>to map a barcode font to get it to render in the PDF output when testing from the template builder plugin.   Mike's issue is only present when the formfield is highlighted with a barcode font. The other fields in the template are OK. What you can do to get around the issue is to bend the config entry to get around having to use the barcode font in the template at all. Changing the entry to something like:         <font family="Calibri" style="normal" weight="normal">        <truetype path="C:\windows\fonts\128R00.TTF" />       </font>   Note that we are mapping the Calibri; a humanly readable and non 'erroring' font in the template, to the code 128 barcode font. Where you used to highlight the field with the barcode in MSWord, you now use the Calibri font instead. At run time, BIP will go look for the Calibri font mapping and will drop in the Code128 font. Of course, Calibri is an example; you need to pick a font that you are not going to use any where else in the layout.

    Read the article

  • Rails: User specific sequential column

    - by Alex Marchant
    I have an inventory system, where a User has many inventory. We have a barcode column which needs to be sequential for each user. I run into a problem however when doing bulk association building. I end up getting several inventories for a user with the same barcode. For example: Inventory Table: id | user_id | barcode 1 | 1 | 1 2 | 1 | 2 3 | 2 | 1 4 | 2 | 2 5 | 1 | 3 In the Inventory model I have before_validation :assign_barcode, on: :create def assign_barcode self.barcode = (user.inventories.order(barcode: :desc).first.try(:barcode) || 0) + 1 end It generally works, but ran into a problem when seeding my db: (1..5).each do user.inventories.build(...) end user.save I end up with a bunch of inventories for user that have the same barcode. How can I ensure that inventories have unique barcodes even when adding inventories in bulk?

    Read the article

  • I need to change a zip code into a series of dots and dashes (a barcode), but I can't figure out how

    - by Maggie
    Here's what I've got so far: def encodeFive(zip): zero = "||:::" one = ":::||" two = "::|:|" three = "::||:" four = ":|::|" five = ":|:|:" six = ":||::" seven = "|:::|" eight = "|::|:" nine = "|:|::" codeList = [zero,one,two,three,four,five,six,seven,eight,nine] allCodes = zero+one+two+three+four+five+six+seven+eight+nine code = "" digits = str(zip) for i in digits: code = code + i return code With this I'll get the original zip code in a string, but none of the numbers are encoded into the barcode. I've figured out how to encode one number, but it wont work the same way with five numbers.

    Read the article

  • Zxing barcode source code integration to the android project.

    - by sujitjitu
    Hi I want to integrate the zxing source code to my android application. I have downloaded the zxing1.5 and integrate the whole code to my application and i am calling the activity "CaptureActivity" through intent. It is showing only the camera view but it is not scanning the barcode. Can u please tell me how to solve this problem because i want my application to be stand alone. i don't want to install BarcodeScanner.apk separately in the device. thanks in advance....

    Read the article

  • Programming Language for RF scanner [closed]

    - by Sid
    I am a Software Developer mostly on Windows System. I have been tasked to create an App Program for an RF Barcode Scanner. Which I don't have any experience in this kind of software. I am open to learn new Programming Languages to develop the software for this barcode scanner. From which I see on our meeting. It uses Windows or Windows Mobile as OS. Can someone direct me to a tut site or just tell me what language I should use? Requirements is mostly, Log In, UI Entry of Details + Barcode, Process Button. Connection To SQL Server via Wifi Access Point to call the procedure afterwards. I am not developing a Barcode scanner, I am developing a UI Software like a Mobile App. I tried to google but I dont know what exact keywords I should search for. My question is, what PL is mostly used to develop this kind of softwares.

    Read the article

  • .change(function) can control two command

    - by klox
    dear all..i've a textfield, it using barcode scanner for input data..after scan it shows KD-R411ED 105X0001... I'm successful separate them into two text field use ".change(function)" $("#tags1").change(function() { var barcode; barCode=$("#tags1").val(); var data=barCode.split(" "); $("#tags1").val(data[0]); $("#tags2").val(data[1]); }); what i want is beside make them separate after ".change(function)" another script can read two character behind "KD-R411ED"..that is "ED"..this character can make a radiobutton which id="check1" are checked.. what's code which can combine with code above? this my complete code.. $("#tags1").change(function() { var barcode; barCode=$("#tags1").val(); var data=barCode.split(" "); $("#tags1").val(data[0]); $("#tags2").val(data[1]); var code = data[0].substr(data[0].length - 2); // suggested by Jan Willem B if (code =='UD') $('#check1').attr('checked','checked'); } else { if (code == 'ED') { $('#check2').attr('checked','checked'); } } and this the form <input id="check1" type="radio" class="check" name="check" onclick="addtext()" value="U" />U <input id="check2" type="radio" class="check" name="check" onclick="addtext_1()" value="E" />E the radiobutton still not response

    Read the article

  • Difference between `<%#` and `<%=` and an asp.net ascx file?

    - by jax
    I understand that <%= is for returning a String I seem to usually use <%# in my .ascx files. For example the following works OnClientClick=<%# String.Format("return confirm('Are you sure you wish to delete barcode ({0})?');", Eval("BARCODE") ) %> The following does not work OnClientClick=<%# String.Format("return confirm('Are you sure you wish to delete barcode ({0})?');", Eval("BARCODE") ) %>

    Read the article

  • How do I prevent a font from extending off the top of a textbox?

    - by David Ellis
    I'm using a barcode font (IDAutomationMC39H) in an SSRS 2005 report I'm developing, and while it renders fine in the preview in BIDS, if I export the results to PDF, print the results, or do any of the above (including preview) in Report Manager, the barcode font is extending off the top of the textbox. The barcode itself is nearly 20px tall, even at only a 12pt size. I've tried changing the CanGrow value for the textbox, but it seems that even with that set off the barcode isn't pushing the bottom edge of the textbox downwards, it's simply extending over the top of the box. I've also tried resizing the textbox to allow it to contain the entire height of the font, but even with the VerticalAlign set to Bottom the barcode still sticks to the top of the textbox and overflows out the top. See screenshot here: http://bit.ly/9UfycP Does anyone know how to force the font to be bound by the top of the box, instead of overlapping it?

    Read the article

  • Need ILMerge hint

    - by lakhlaniprashant.blogspot.com
    Hi all, I'm trying to merge vintasoft barcode sdk with my data access dll and it's not working after ilmerge. Any ideas are welcome here is the error: IndexOutOfRangeException: Index was outside the bounds of the array.] 2.+.©(Byte[] param0) in :0 2.+..cctor() in :0 [TypeInitializationException: The type initializer for '2.+' threw an exception.] 2.+.¥S() in :0 Vintasoft.Barcode.WriterSettings..cctor() in :0 [TypeInitializationException: The type initializer for 'Vintasoft.Barcode.WriterSettings' threw an exception.] Vintasoft.Barcode.WriterSettings..ctor() in :0 Vintasoft.Barcode.BarcodeWriter..ctor() in :0 _Default.buttonGenerateBarcode_Click(Object sender, EventArgs e) in E:\ILMergeSample\WebBarcodeWriterDemo\QRBarcode.aspx.vb:27 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 Thanks in advance

    Read the article

  • a newbie gcc compiler and c language question

    - by dydx
    Hi, when I'm trying to compile my c program it gives me this error warning: integer constant is too large for 'long' type which refers to these lines int barcode, a, b, c; scanf("%d", &barcode); a = barcode / 1000000000000; b = barcode / 100000000000 % 10; c = barcode / 10000000000 % 10; and the rest is fine. I know I'm not supposed to use int for such a large number, any suggestions on what I should use? if I replace int with double what should the '%d' part be replaced with then?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >