What does this JB code really want?

Source: Internet
Author: User
$LN = $this->lengthindicator ($this->qr_mode_nm, $this->version); $dif = $this->estimatebitsmodenum ($run)  + 4 + $ln + $this->estimatebitsmode8 (1)         //+ 4 + l8-$this->estimatebitsmode8 ($run + 1);//-4-l8if ($dif > 0) {return $this->eat8 ();} function Estimatebitsmodenum ($size) {$w = (int) $size/3; $bits = $w * 10;switch ($size-$w * 3) {Case 1: {$bits + = 4;break ;} Case 2: {$bits + = 7;break;} Default: {break;}} return $bits;} function EstimateBitsMode8 ($size) {return $size * 8;} function Lengthindicator ($mode, $version) {if ($mode = = $this->qr_mode_st) {return 0;} if ($version <= 9) {$l = 0;} elseif ($version <=) {$l = 1;} else {$l = 2;} return $this->lengthtablebits[$mode [$l];} $lengthTableBits = Array (Array (9, one, 8), Array (8, 10, 12), Array (+/-);


Reply to discussion (solution)

You're out of context, who knows what's going on.

The code is not complete, I don't see what this JB code is trying to do.

Why do you love me?

Come on, settle the bill.

I can not understand it completely!

Generate a QR code.

Generate a QR code.

I really met a master. Ask for explanations

This code is too short, like a QR code.

This code is too short, like a QR code.

Why the eat12,14 situation.

Do not understand the principle of two-dimensional code, see the code can read it?
Numeric mode digital code, from 0 to 9. If the number of digits that need to be encoded is not a multiple of 3, then the last remaining 1 or 2 digits will be converted to 4 or 7bits, then each of the other 3 digits will be 10,12,14bits corresponding to your estimatebitsmodenum
Number of digits encoded under different version:
That corresponds to your lengthindicator.

I don't understand, help you find the information: Http://coolshell.cn/articles/10590.html#jtss-tsina

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.