rfig | Ruby library for creating figures and slide presentations | Document Editor library
kandi X-RAY | rfig Summary
kandi X-RAY | rfig Summary
rfig version 1.4.7 Created by Percy Liang Last updated 05/23/12. rfig is a package that allows you to create figures or slide presentations by programming in Ruby. The Ruby code generates a Metapost file, which is compiled into a PDF file. Mandatory requirements: - Ruby 1.8 (I test on 1.8.7) - LaTeX2e: pdflatex and context (includes mptopdf) Optional: - ImageMagick (for convert if you want to embed PDF files) This was tested on Debian Linux.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rfig
rfig Key Features
rfig Examples and Code Snippets
Community Discussions
Trending Discussions on rfig
QUESTION
I am trying to pass the inputted value from one function to another function. How it works is the user click the Tkinter button which runs the chk():
function. Once the button is click the user will have to scan their tag (rfig tag) which will read the user's tagID
and give the idTag
variable a value. When the idTag
is returned the dataCheck():
function will be called and check if the idTag
value match one of the values in the userID column of my sqlite3 database.
My issue is I keep getting the Error : name 'idTag' is not defined
The command reader.read()
acts like a input function because the user actually has to scan (or input) their tag before they can continue. I think the problem is the function is being call as soon as the button is being click which is causing the idTag
variable to still be empty due to the user not having inputted the value yet. Any thoughs?
ANSWER
Answered 2020-Sep-29 at 01:54Several issues here
First, get rid of global idTag
as I think that's just creating scope issues. You don't need a global variable.
tagScanner()
does not make use of its only input argument, so get rid of it. You're getting the id from reader
, so this function does not need another input.
You're comparing the input idTag
in dateCheck(idTag)
to your query string instead of whatever's returned by the query, that's probably not your intention.
When the interpreter reaches a return
in a function, the function exits. The last line of tagScanner()
will never execute, because it returns right before that. Try calling dataCheck(idTag)
before you return idTag
Your sqlite query is always querying for "idTag", e.g. the string of characters "idTag" rather than the value that you read in and assigned to the variable idTag
. Use ?
to designate that you want to provide a value during the query, see the docs here:
https://docs.python.org/2/library/sqlite3.html
Putting it all together:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rfig
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page