Automatic printing from web app - printing

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!

Related

Lua code runs properly on my advanced computer but doesn't run on the monitor

I run a successful Minecraft Tekkit modded server with computer craft on it.
I'm fairly new to lua and only know the basics, I'm trying to make a menu with pages to display the banned items list and rules list on. I've made a program with arrows that's optimized for advanced computers and monitors.
The code runs properly on my advanced computer but doesn't run on the monitor, when it shows and someone clicks the arrows it doesn't work either.
I just started using stack so I'm not sure on what to do, if you need any info please ask for it :)
The code: http://pastebin.com/gVtPeBCE
By the way I already tried using Mon.write and Mon = peripheral.wrap("top")
For those who don't have tekkit here is a computercraft emulator: https://goo.gl/J0dPq0
I'm sorry to inform you that I haven't read through all of your code. But judging based on your description, I would say that it's likely one of three issues, not including incorrect syntax as a possibility.
Note: Your question is exclusively asking about the programs ability to run on a monitor while the emulator you link to only provides the desktop ComputerCraft computers.
Peripheral
Although you already stated:
By the way I already tried using Mon.write and Mon = peripheral.wrap("top")
I would like to clarify that you can, as a way to simplify the code transition, set the peripheral function table equal to the term variable. For example: term = peripheral.wrap(string_side).
Note: When you use this method, you shouldn't execute the program with the command:
> monitor side program.
You should instead run it as a normal program with no special treatment.
I.e. > program.
Incorrect Mouse Event Detection
Simply put, when using a monitor, you're not supposed to pull for a mouse_click event. You have to pull for a monitor_touch event instead.
while true do
type, side, x, y = os.pullEvent()
if type == "monitor_touch" then
print("Monitor '"..side.."' has been pressed at "..x..", "..y.."!")
end
end
Monitor Size
This just simply means that the program you're trying to execute on the monitor takes up to much space and is therefore unusable when displayed on that size of monitor.
Suggestion: Either update your code for the monitor size or build the monitor to fit the program.
Please remember that all of these ideas might not answer your question, as the code you have provided to look over is too large and I haven't been able to find the time to experiment with it. Therefore, these are only general suggestions.
if i had to guess, it's because term is short for terminal and will auto work with computers so if you set term to be the monitor at the top of the file it should work correctly.
term = peripheral.wrap("SIDE OF MONITOR")
Put that at the top of your code and it should work. but this what i think it is after taking a look at your code (also its not that long of a code sample...)

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.

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

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

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