I've gotten myself tangled up with QR codes and geolocations.
I have a MySQL table with latitudes and longitudes, and I have a whole batch of QR Code images. Instead of pre-making images, I'd like to generate them on the fly, then display them in Lightbox, with their name and address.
I've gotten to this point (xxx is the MySQL table)
<a href=<?php print "http://chart.apis.google.com/chart?cht=qr&chs=230x230&chl=".$xxx->latitude->CurrentValue.",".$xxx->longitude->CurrentValue."'";?> rel="lightbox" title=<? Php print "'".$xxx->name->CurrentValue.", ".$xxx->address->CurrentValue."'";?>
This generates an image, but if I then scan the image with a phone (say), I get something like "http://aa.aaaaaa,bb.bbbbb" as the link to the map. Of course, that doesn't work. I need a more definitive link.
I'm unsure where to go from here. Ideas would be welcome.
Paul
Well, I've come some of the way.
If I add "geo:" (no quotes) in the line like this:
http://chart.apis.google.com/chart?cht=qr&chs=230x230&chl=geo:"
I get something readable. Now I need to figure how to put a marker in there, and I'm done!
Paul
Related
Does anyone know a short cut to going back up a line in psql? I've tried ending with ); and then hitting the up arrow. I can retrieve the line of code that I want and then correct it, but then what? The initial mistake prevented me from CREATING A TABLE, so do I recreate the remaining lines of code from this point forward to finish creating the table. I'm trying to avoid retyping 10 lines of information. I'm using the postgres database and the instructor accomplishing this with very little effort; however, I cannot see the commands he is using to recreate several lines of text which a appear to use only one key. If you look at 52:00 - 53:00 on the instructional video timeline you will see what I mean. After he ends the code with ); He immediately recreates the previous block of code. How does he do this?
Video Link
https://www.youtube.com/watch?v=qw--VYLpxG4
They just cut out parts of the video. No big magic there.
But you could use \e to start your default editor containing the last command you sent. That may be the most efficient way to do this.
Video of the problem
The problem happens when there is a screen switch or browser minimization, and it only happens with the svg element. Has anyone encountered this? How to fix?
imagem here
I managed to correct
good through this post
Clipping path in SVG not working in Safari
and this post http://tutorials.jenkov.com/svg/clip-path.html
but I had to make some adaptations...
how did i fix this problem
1st first
had to change inline structure that comes before all sinline svgs
before:[enter image description here][1]
[1]: https://i.stack.imgur.com/W8Pbl.jpg
after:
enter image description here
so far I had already converted all patches into points
tools that helped me in this work:
1st crucial tool because it is possible to convert paths code into points codes for polygon
https://codepen.io/team/amcharts/full/zYORoNE software built on the code pen
2st another tool to remove parts of unnecessary text such as curly braces ({}) spaces and commas that because the conversion tool transforms results into arrray
http://www.unit-conversion.info/texttools/replace-text/
3st another tool to remove lines breaks
https://www.textfixer.com/tools/remove-line-breaks.php
4st another last tool but not less important because it is possible to test directly online before inserting it in the code definitively
https://www.w3schools.com/graphics/tryit.asp?filename=trysvg_polygon
that was a good tool
final result :
before
before applying any new structure
after: after applying any new structure
I want to thank all the devs who collaborated with me, either by creating the free software and the post made, my thanks to everyone, the people of the stackoverflow, thanks!
With RestructuredText, I'd just like to insert a link where the address is the text of link. Like this: https://www.example.com/example-of-link.html
I just want the link to appear in the text, with no modification, no title, just the raw link. I can't find a way to do this. All the examples in the doc give titles to the links. Is there a way to do that?
Thanks for your help.
Ok, answering my own question: you just have to write the link and that's it, like this:
https://www.example.com/example-of-link.html
I always seem to forget that and I waste time searching for it. At least now the answer will be on Stackoverflow.
My goal is to write a validation class for Rails that is capable of using an OCR recognised text from a business card and is able to detect string snippets and assign them to the correct attributes. I know this cannot be probably 100% perfect but I want to get as close as possible. Here is my approach so far:
I scan business cards via jquery's navigator.mediaDevices
I send the scanned image to a third party API Service, called OCRSpace (a gem is available here: https://github.com/suyesh/ocr_space)
I then get a unformatted array of recognised text snippets back, for example:
result = [['John Doe'], ['+49 160 123456'], ['Mainstr. 45a'], ['12345 Berlin'], ['CEO'], ['johndoe#business-website.de'], ['www.business-website.de']]
I then iterate through the array and do some checks, for example
Using the people library (https://github.com/mericson/people)
to split the name in firstname and lastname (additionally the title
or middlenames) Using the phonelib library
(https://github.com/daddyz/phonelib) to look up a valid phone number
and format it in an international string
Doing a basic regex check on the email address and store it
What I miss now is:
How can I find out what the name-string would possibly be? Right now I let the user choose it (in my example he defines "John Doe" as the name and then the library does the rest). I'm sure I would run into conflicts when using a regex as strings like "Main Street" would then also be recognized as a name?
How do I regex a combination of ZIP-Code and City name? I'm not a regex expert, do you know any good sources that would help? Couldn't find any so far except some regex-checkers in general.
In general: Do you like my approach or is this way too complicated? And do you know some best-practices that look better?
Don't consider this a full answer, but it was too much to make it a comment.
Your way of working seems Ok but I wouldn't use the OCR Service since there are other ways , Tesseract is the best known.
If you do and all the results are comparible presented it seems not too difficult since every piece of info has it's own characteristics.
You can identify the name part because it won't have numbers in it, the rest does, also you can expect to contain it "Mr." or "Mrs." or the such and not "Str.", "street" and so on. You could also use Google Maps to check for correct adresses, there are Ruby gems but have no experience with them.
Your people gem could also help.
You could guess all of this, present the results in you webpage and let the user confirm or adjust.
You could also RegExpr the post-city combination by looking fo a number and string combination in either order but you could also use a gem like ZipCodes to help.
I'm sorry, don't have the time now to test some Regular Expressions now and I don't publish code without testing.
Hope this was some help, success !
In org-mode, I have defined a figure+caption like this:
#+CAPTION: My great figure
#+LABEL: fig:myfigure
[[myfigure.png]]
How do I write "See figure [myfigure]"? I've found the following syntax:
See figure \ref{fig:myfigure}
but this looks ugly in the source file. In particular, you cannot use it for actually jumping to the figure.
You actually don't need '#+NAME', it works fine if you use '#+LABEL', which won't break your short-caption for list of figures.
Orgmode does now offer a 'jumpable', enumerated or link with name of your choice in the exported (latex, html) text if you link with:
see figure [[fig:myfigure]].
or
see figure [[fig:myfigure][figurenameintext]].
I would have added this as a comment, but I don't have the reputation yet.
--
In response to your comment (still can't comment): you do need the '#+NAME' for it to jump within the .org source file; as mentioned in the manual, and i also just confirmed that works. Not sure about the short-captions in the latest version.
With a very recent org-mode, you can use #+name:, see:
http://thread.gmane.org/gmane.emacs.orgmode/62644/focus=62646
#+CAPTION: My great figure
#+LABEL: fig:myfigure
#+name: fig:myfigure
[[test.png]]
See figure [[fig:myfigure][test]].
This works for me to jump from the link , but has no effect when exporting, I'm afraid...