I have used Google chart and the LGPL QR code class for php to generate the QR code for an URL, but both fail to generate a correct for the URL below:
http://www.xxxxx.com/xxxx/index.php?route=sale/order/invoice&order_id=4&token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The result of the QR code after scanning will be something like
http://www.xxxxx.com/xxxx/index.php?route=sale/order/invoice&order_id=4&token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is there any way to avoid the amp; to appear?
I am not sure, wheter it helps you. Reason is that I have some difficulties to understand your question.
Maybe this javascript helps you generating you URL, I am using it as bookmark.
javascript:void(window.open('http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl='+encodeURIComponent(location.href),'Qr code','top=100,left=200,width=350,height=350,status=yes'));
Related
I want to generate a QR code to encrypt data I am entering what's the easiest way for that to be implemented? I can't seem to find anything in the documentation to suggest any classes that can handle this. There seem to be external libraries but I don't know how to include them. So what steps should I take to solve my problem?
I have a set of .groovy files (Java). All of these files have the same comment format.
I developped a tool with wich I'm able to read those files and applying a REGEX to get all the comments in a list. (Finally i just have to copy paste these comments to .html file)
I would like to know if it's a correct practice in order to generate a HTML page with the comment (a kind of documentation). If not, what would you recommend ?
I read about Doxygen and Javadoc but i'm not sure about using them (if they can be really useful in my case since the comments are already written)
If you can suggest a library in order to generate easily a HTML Webpage or any other advice.
Any help is appreciated.
There exists Groovydoc which is roughly the equivalent of Javadoc, just for Groovy.
As your setup is not that (you already have comments, probably not in Groovydoc format, and you have half the tooling), there are still multiple ways open to you. As you already extract the documentation from groovy, if I were you, I would do a minimal post-formatting, if necessary, and output the documentation as markdown (e.g., github markdown) or asciidoc (e.g., asciidoctor). Then you can use any preferred tool to convert the post-formatted documentation into HTML.
To answer the question "How to parse the java comments" – you shouldn't. If possible, especially in a new project, stick with the standard tooling. In the case of Groovy that's Groovydoc. The normal (non Java/Groovy-Doc style) comments themselves you should never need to extract from the source code. They should be so much context-specific, that without the corresponding code they are anyways useless.
We're building an application using GWT-Openlayers (not OpenLayers) and need to allow the user to load a polygon from a shapefile. Surprisingly, there doesn't seem to be an evident solution. The closest solutions are javascript libraries for interpreting shapefiles, but a javascript solution doesn't really help in a GWT application. Any recommendations?
Thanks in advance!
Lacking a simpler solution, the approach I used was as follows:
Use GWT FormPanel and FileUpload to allow user to select the file to upload
Create a custom servlet for handling the request
FormPanel sends a multipart POST of the file contents to the servlet
Servlet feeds the file content to a parser to convert to Well Known Text (WKT)
Servlet returns the WKT in the HttpResponse
Client side code converts the WKT to a gwt-openlayers vector feature and adds it to the map
Certainly not an elegant solution but seems to work. If anyone finds a better solution, it would be great to hear.
I am having some trouble understanding the samples included in the gnsdk download. All I need to do is to be able to generate an audio fingerprint from a wav. file. My plan is then to hand it off the the web api to query the database. I am much more experienced in web languages so once I can get the fingerprint I shoudl be good to go. Unfortunately my C/C++ is a bit shaky.
I am trying to figure out the exact function I need to call and how to pass a wave file to it. If anybody has any tips or clues on how to just generate the finger print I would be forever grateful.
Please refer to the sample source code under 'samples/musicid_lookup_album_fpx'.
In the main.c file look for the following functions.
APIs for generating finger prints from PCM.
gnsdk_musicid_query_fingerprint_begin()
gnsdk_musicid_query_fingerprint_write()
gnsdk_musicid_query_fingerprint_end()
API for saving finger print to a string buffer.
gnsdk_musicid_query_get_fp_data()
How can I use a regular expression to separate GET parameters in a URI and extract a certain one? Specifically, I'm trying to get just the v= part of a YouTube watch URI. I've come up with youtube.com\/watch\?(\w+=[\w-]+&?)*(v=[\w-]+)&?*(\w+=[\w-]+&?)*, but that looks awfully repetitive. Is there a better (shorter?) way to do this?
A simplified regex :
^(?:http://www.)?youtube.[^/]+?/watch?(.?)(v=([^&]+))(.)$
I know there are a lot of similar questions out there, but none has quite what I wanted. I'm looking for something capable of pulling out just the video ID—regardless of whether it's first in the parameter list, last, or buried in between others. Nothing I've seen has worked quite like that yet.
For reference, I'm using this web app for testing, and this set of test URIs:
http://www.youtube.com/watch?v=XXXXXXXXXXX
http://www.youtube.com/watch?v=XXXXXXXXXXX&feature=results_video&playnext=1&list=XXXXXXXXXXXXXXXXXX
http://www.youtube.com/watch?feature=player_embedded&v=XXXXXXXXXXX#!
http://www.youtube.com/watch?annotation_id=annotation_xxxxxx&feature=iv&src_vid=XXXXXXXXXXX&v=XXXXXXXXXX
Fellow Stack Exchangers, I propose the following regular expression to solve this:youtube.com\/watch\?(\S*)v=([\w-]+)