no idea where to start: 'calculator-like' rails app that displays a keypad user can click to type - ruby-on-rails

I need my webapp to display a 'keypad' on the screen that makes special-purpose data entry very easy... can't be flash since needs to work with ipad (and also work from regular pc/browser/ mouse).
The simplest variation would be a 'calculator' app where they press number keys and functioin keys and the app takes the input and displays results.
we very specifically need to provide data input from our webapp screen by click/touch 'keys' -- not from the PC keyboard (or soft keyboard on ipad)
I have no idea where to start... any ideas would be appreciated! For example is there some nifty ajax and/or jquery thingy that lets you build an input keypad?

https://github.com/davidnorth/JsReckoner you can take this repo for your base and modify it. Good luck

Related

Send file to print in the background from ruby on rails app

I'm looking to make an app be able to print out a stick on name tag based on some fields that the user has filled out. The catch is that I don't want the user to have to interact with any sort of system print dialog, I just want it to go straight to the printer and print out after they submit.
The other catch here is that this will most likely be run on an iPad, so I will need to try to send this print job over the air either on wifi, somehow to a computer that is usb connected to the printer or over airprint if I can find one that is small enough and supports the right paper.
I've seen some solutions here and there that require the app to run on windows, or to be connected to the printer some how.
I'm not sure if this feat is possible with this setup, but the most important part is being able to print in the background, if the iPad is going to hinder that, there is a case we can make to our client for getting a small, cheap, windows 8 touch tablet instead of an iPad since I know it has a few more capabilities in this area as it seems through my research.
It doesn't matter what version of ruby or rails it's in and I don't care if it's 2 steps or 200, if the user experience is there, I can make a case for the increased work load needed to make something work.
I'm not a very experienced rails developer, but this project is my first big project that is simple enough that I can tackle it. If more information about how their name tag info is being collected I can shed some light on that as well but I don't think it matters. Whatever I'm printing I need the experience to be the above.
Have a look here: http://support.vendhq.com/hc/en-us/articles/201378390-Enable-kiosk-silent-printing-for-Google-Chrome-on-Windows-Video- under 2) Kiosk printing for Google Chrome
Basically this is using Chrome's Kiosk printing mode. So you would have to get a PC for it to work.
The "print dialog" will pop up shortly but then automatically disappear the the document will print.

(iOS) Way of viewing log messages directly on an iOS device?

As nice as debuggers have gotten these days, sometimes the best way of finding out what is going on in an app is still ye olde NSLog. Doing this is easy when you're tethered to your computer; Xcode helpfully pops up the Log Viewer panel and there you go. Not so easy to do when you're away from your desk, as you sometimes have to be when testing an app (for example, when you are testing CoreLocation functionality). Sure you can pop open Xcode and check the Console section of the Device Organizer as soon as you get back from a testing run, but then you have to wait, and by the time you can get back to view the logs you forgot what was going wrong with your app; also odds are that by the time you are able to do this, the log messages you are looking for have scrolled off into oblivion.
Is there any way of checking the console logs on the device itself? I'm guessing the answer is "no, unless you jailbreak" (IIRC there are at least one or two terminal apps in jailbreak-land that I could use to do this sort of thing). Unfortunately jailbreaking is not an option for me.
Alternatively, is there some sort of Objective-C framework or library or whatnot that handles log collection and on-device displaying? Ideally this would come in the form of a drop-in replacement for NSLog, whereby I could simply do a search-and-replace and change all occurrences of NSLog to SomeFancyPantsLoggingTool or whatever and be done with it.
A good example of the kind of functionality I am looking for can be found in the podcast client Downcast. If you tap the "More" tab, then tap on the version number string at the bottom of the screen, a new view slides up that contains a scrollable view of accumulated log messages. It even has an easy way of mailing said logs to a support e-mail address.
Take a look at LibComponentLogging which you can configure to output logging at different levels and to different destinations.
There is a file for the SysLog. You can simply open it and read from it. The file is at /var/log/syslog. If the file does not exist there are instructions on how to set it up here.

Detect The End Of A Script/Text In Lua

How can I detect in lua if a user has stop typing in a richtext box/object, so as to enable me compare the current text that has been inputed by the user for further implementations? That is, after the user stops typing a text in the richtext object or box, then the text that has just been typed is compared. However, i have manage to carry-out the further implementation part, like the comparison and the actions to be performed, but my problem is how to detect if the user has stop the typing in the richtext box for the other implementation to follow.
I have tried several approaches, but I am still not getting it right.
I'm guessing that you're using a GUI library of some sort to get the richtext box.
What you should look for is a way to see keyboard events. Some GUI toolkits have them. Every time the user presses a key (or there is other input from the keyboard), the OS triggers a Keyboard Event that the program can access. You can use that to tell if the user has entered text. If there is a large pause between events, maybe 2 seconds, you can judge that the user has stopped typing and proceed with the comparisons.
Another way to do it is to look at the contents of the text box. Basically, take a look at contents of the textbox. If they've changed since the last time you've looked, then you should wait a bit and check again. If they haven't changed, assume the user has stopped typing and run your comparison.
Keep in mind that some people type really slowly or may stop to think halfway through typing. This means you can fool yourself if you check too often, and altering the text that the user has just typed where they can see it can scare and confuse the user. (Some GUI toolkits remove the text from a textbox when you read all the data, which means the user just saw all their work disappear!) Just be careful.
Honestly, some details on what you're trying to do would be really helpful. As Mike Corcoran indicated, where this script is running can really change what options you have and what options would work best with the program as a whole. For example, a third solution is to simply ask the user to press a button or otherwise indicate that they have finished typing. This isn't a good idea in a text editor, but it would work in some other GUIs.

Automatic printing from web app

I am writing a web app that needs to quickly print a name tag and a parent claim check as we check children in. I am using a Dymo Twin Turbo (a label print that can have 1 label type on the left and a different sized label on the right). When I check in a child, it needs to print one on each side of the printer without prompting. I have found jZebra (which I am still trying to figure out) but it doesn't seem to have the capability to choose which tray it will print to. Is there another applet or such that would be better, or is there something about jZebra that I could use?
If anyone is interested in what I came up with: Dymo has a great JavaScript framework that works with its label writers. This framework can be found in the developers section of the Dymo website (http://developers.dymo.com/). The examples provided all use a button to print, instead I used an onLoad event to call my function. It was my first real attempt at JavaScript, so it took me a while to get it working like I wanted, but it works great!

Delphi - alternative solution for a global keyboard hook

sorry for this little bit strange title, didn't found a better one..
I've got the following situation:
I have a PC with an RFID reader connected via USB.
I now need a program which pops up when ab transponder was scanned the the RFID reader and shows the scanned value. (The reader just simulates keystrokes)
Problem: the value of the transponder is something like 0001230431, and I can't change it. (To prefix a hotkey combination or so)
So I have thought about using a global keyboard hook, check if three zeros where typed in, capture rest of data and when the 10 digits are complete, call the application through an automation object and show the number.
But I'm not very exalted about using a global keyboard hook. Many AV programs don't like them very much, they are not so easy to handle with Delphi and I guess that's not very resource-friendly for such a little task...
So I'm looking for an alternative solution...maybe somebody has an idea?
Big thx!
ben, you can use the RegisterRawInputDevices and GetRawInputData functions.
first you must use the RegisterRawInputDevices function to register the input device to monitor and then you can retrieves the data from the input device using the GetRawInputData function.
Check theses functions too
GetRawInputDeviceList retrieves the list of input devices attached to the system.
GetRawInputDeviceInfo retrieves information on a device.
Why not make sure the Delphi app with a text edit control has focus before the scan is done? Then the keystrokes will go straight into your Delphi app.

Resources