A little advice for popular taxi hailing Software

Source: Internet
Author: User

I. Preface:

Recently, the prices of taxis in Beijing have been deliberately increased, and the taxi industry is probably eager to try. Even Sister Furong has just attacked me. Although it has no influence on me, I still need to sympathize with the people of the capital.

Ii. Demand research:

In the first city, many Chinese homophone characters often encounter situations where the name cannot be called or the name is wrong. When you get on the bus, tell the master's location that no one will laugh at you.

Iii. idea ):

Now the main function of taxi hailing software is to call a car. It's okay to call a taxi. I was wondering: Can ICar hailing-on-vehicle-off-vehicleThe scope is included in the taxi software.

Some time ago, I had a QR code and thought it was good. The Japanese have invented some good things. Although it is just a copy of the bar code principle, it has improved a lot.

If you call a car, you don't need to say that the car is nothing more than scoring the driver's services.Now I want to talk about the things in the car and go back to the requirement: I can't call a name or call a wrong name, so I am afraid of slaughter. Based on the idea of QR code, we can check the address before departure, generate a QR code in the taxi hailing software, and share it with the server of the taxi hailing software, of course, there are other necessary information such as the longitude and latitude of the detailed address. After you get on the bus, you don't need to talk about it. You can directly send it to the driver's app through Bluetooth or other things. You can even plan your own route, calculate the mileage and cost, and do a little bit in One-stop: you can complete the payment and electronic payment in the taxi hailing software.

In this way, taxi software will have a bright future, and the service quality of drivers will also improve. The whole industry will become networked, and humanity will make progress. We will leave the ideal society, is a harmonious society closer?

Iv. solution:

1. Scan the QR code:

1.1: Google's open-source zxing project: http://code.google.com/p/zxing/, supporting:

  • Actionscript: Partial port to Actionscript
  • Cpp: Partial C ++ port
  • Iphone: IPhone client + port to Objective C/C ++ (QR code only)
  • Csharp: Partial C # port

1.2: ThroughWork

1.3: web I used at the time: http://qrcode.com/

1.4: Call the camera in Windows: http://www.deepleo.com/archives/1518. download the source code.

The following shows the key source code:

Public class CamWorker {private const int WM_USER = 0x400; private const int WS_CHILD = 0x40000000; private const int WS_VISIBLE = 0x10000000; private const int WM_CAP_START = WM_USER; private const int WM_CAP_STOP = WM_CAP_START + 68; private const int WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10; private const int begin = WM_CAP_START + 11; private const int WM_CAP_SAVEDIB = WM_C AP_START + 25; private const int sequence = WM_CAP_START + 60; private const int WM_CAP_SEQUENCE = WM_CAP_START + 62; private const int sequence = WM_CAP_START + 20; private const int sequence = WM_CAP_START + 63; private const int WM_CAP_SET_OVERLAY = WM_CAP_START + 51; private const int WM_CAP_SET_PREVIEW = WM_CAP_START + 50; private const int WM_CAP_S ET_CALLBACK_VIDEOSTREAM = WM_CAP_START + 6; private const int starting = WM_CAP_START + 2; private const int starting = WM_CAP_START + 3; private const int WM_CAP_SET_CALLBACK_FRAME = WM_CAP_START + 5; private const int WM_CAP_SET_SCALE = WM_CAP_START + 53; private const int WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52; private IntPtr hWndC; private bool bWorkStar T = false; private IntPtr mControlPtr; private int mWidth; private int mHeight; private int mLeft; private int mTop; /// <summary> /// initialize the display image /// </summary> /// <param name = "handle"> control handle </param> /// <param name = "left"> left margin of start display </param> // <param name = "top"> top margin of start display </param> /// <param name = "width"> width </param> // <param name = "height"> length </param> public CamWorker (IntPtr h Andle, int left, int top, int width, int height) {mControlPtr = handle; mWidth = width; mHeight = height; mLeft = left; mTop = top ;} [DllImport ("avicap32.dll")] private static extern IntPtr capcreatecapture0000wa (byte [] lpszWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, int nID); [DllImport ("avicap32.dll")] private static extern int capGetVideoFormat (IntPtr HWnd, IntPtr psVideoFormat, int wSize); // note that the long in WinAPI is 32 bits, and the long in C # Is 64wei, therefore, set lParam to int // [DllImport ("User32.dll")] private static extern bool SendMessage (IntPtr hWnd, int wMsg, int wParam, int lParam ); /// <summary> /// Start to display the image /// </summary> public void Start () {if (bWorkStart) return; bWorkStart = true; byte [] lpszName = new byte [100]; hWndC = capcreatecapturew.wa (lpszName, WS_CHILD | WS_VISIBLE, mLeft, mTop, mWidth, mHeight, mControlPtr, 0); if (hWndC. ToInt32 ()! = 0) {SendMessage (hWndC, success, 0, 0); SendMessage (hWndC, WM_CAP_SET_CALLBACK_ERROR, 0, 0); SendMessage (hWndC, WM_CAP_SET_CALLBACK_STATUSA, 0, 0 ); sendMessage (hWndC, WM_CAP_DRIVER_CONNECT, 0, 0); SendMessage (hWndC, WM_CAP_SET_SCALE, 1, 0); SendMessage (hWndC, success, 66, 0); SendMessage (hWndC, success, success, 0, 1, 0); SendMessage (hWndC, WM_CAP_SET_PREVIEW, 1, 0); // Global. log. write ("SendMessage") ;}return ;}/// <summary> // Stop display /// </summary> public void Stop () {SendMessage (hWndC, WM_CAP_DRIVER_DISCONNECT, 0, 0); bWorkStart = false ;} /// <summary> /// capture the image /// </summary> /// <param name = "path"> path of the bmp file to be saved </param> public void grabImage (string path) {IntPtr hBmp = Marshal. stringToHGlobalAnsi (path); SendMessage (hWndC, WM_CAP_SAVEDIB, 0, hBmp. toInt32 ());}}

 

1.5: html5 (refrence: juery): Download source code

Others, don't have time to think about it, go to work, and do it later. Thank you...

 

Joke:

When a woman dies, a man takes hundreds of guards and finally takes her to an American movie. In a short time, she struggles to become a vampire; A group of people suddenly came out singing and dancing Indian movies. A Snow Lily filled her in, and the Hong Kong movie was revived; A male climbed onto her and made a Pistons movement for Japanese movies. An organization named her a member of a Chinese film.

Watermarks: Author: Leo

Source: http://www.deepleo.com/

The copyright of this article is shared by the author and the blog Park. You are welcome to repost this article. However, you must retain this statement without the author's consent and provide a clear link to the original article on the article page. Otherwise, you will be held legally liable.

 

 

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.