reader

Reading qualified symbols

耗尽温柔 提交于 2019-12-11 12:45:43
问题 I'm working on a code formatter for Lisp, which is using the reader to read code into S-expression format. This works fine for plain symbols. It doesn't work so well for qualified symbols. foo:bar is only readable if the package foo has been defined, but of course as far as the formatter is concerned, it has not, because unlike the compiler, the formatter is only reading the code, not executing it. How can I tell the reader to either go ahead and automatically create a package foo on the fly,

setting text color to transparent for hiding accessibility content?

放肆的年华 提交于 2019-12-11 11:56:25
问题 I have a bunch of tags with background-images properties that I would like to give some content for screenreaders but I obviously can't give it an alt attribute since they are not <img> tags. Would screenreaders be able to read the content as long as I set the text color to transparent? I would not like to use display:none or visibility:hidden as I've read that screenreaders will not read those content and can also be penalized by google for hiding content. What are my options to accomplish

“There is already an open DataReader associated with this Command which must be closed first.”

非 Y 不嫁゛ 提交于 2019-12-11 02:45:29
问题 I'm working on application which needs to connect to another database to get some data, and to do that, I decided to use SqlConnection, reader etc.. And I need to execute few queries, for example first I need to get CARD ID for some user, after that I need to get some data by that CARD ID.. Here is my code: #region Connection to another Database SqlConnection sqlConnection1 = new SqlConnection("Data Source=ComputerOne; Initial Catalog=TestDatabase;Integrated Security=False; User ID=test;

Clojure: How do I get the file/line number on which a map was defined?

青春壹個敷衍的年華 提交于 2019-12-10 10:46:52
问题 I know I can get the :line and :file from the metadata on a var; however, I'm building a system where the user can pass me raw maps and I will end up "linking" the data together at a later time. When this linkage fails, I'd like to report the file/line in which they specified the map. E.g.: (defn generate-stuff [] (make-thing { :k (make-thing { :k v }) })) (link (generate-stuff) (other-generator)) ;; outputs file/line of the map containing the errant :k/v pair I assume that writing a macro to

PDF Viewer in Qt

人盡茶涼 提交于 2019-12-10 10:27:44
问题 I am trying to create a pdf viewer inside qt using Adobe Readers ActiveX, but it requires to install Adobe Reader, so is it possible without installing Adobe reader we can create pdf viewer 回答1: QtPdf module in the Qt Labs. It comes with a Widgets-based PdfViewer example, which works out of the box. It can be easily incorporated into any Qt app - We are incorporating it into one if our QML applications, by creating a wrapper. Qt blog announcement here. 来源: https://stackoverflow.com/questions

C# - Write in Smartcard using PCSC-Sharp

天大地大妈咪最大 提交于 2019-12-09 07:16:14
问题 Good day everyone, I would like to ask on how to write in Smartcard. I just rely on the example given on the documentation but it only has read tag. I follow the examples here in https://github.com/danm-de/pcsc-sharp/blob/master/Examples/Transmit/Program.cs using System; using PCSC; using PCSC.Iso7816; namespace Transmit { public class Program { public static void Main() { using (var context = new SCardContext()) { context.Establish(SCardScope.System); var readerNames = context.GetReaders();

How to Connect two Smart Card Reader simultaneous with 2 Application

你离开我真会死。 提交于 2019-12-08 11:35:26
问题 I'm writting app use function SCardConnect() in lib winscard.h If run 2 app it only can Connect to one Reader 0 (Ex have 2 Reader 0 and Reader 1) How do connect to 2 Readers simultaneous? 回答1: A while ago I did something similar (lib with no instance handle), the solution was: Spawn a process for each reader. Use IPC to sync (shared memory, TCP/UDP loopback, pipes...) 来源: https://stackoverflow.com/questions/33384708/how-to-connect-two-smart-card-reader-simultaneous-with-2-application

Handler Smart Card Reader

橙三吉。 提交于 2019-12-08 10:40:07
问题 I'm writting app connect to Smart Card reader, And I want to connect 2 app to 2 Reader: # Detected readers (pcsc) Nr. Card Features Name 0 Yes ACS ACR38U 00 00 1 Yes ACS ACR38U-CCID 01 00 But, App only connects to Reader 0: ACS ACR38U 00 00. I try with IFDHandler but it is not ok. Please help me with connecting 2 apps to 2 readers 0 and 1. Thanks. 回答1: (If I understand well) You probably need to change the second argument of the function SCardConnect() to get a different reader. I.e. put "ACS

How to handle the exceptions thrown from item reader?

拥有回忆 提交于 2019-12-07 08:32:46
问题 I want to catch the exceptions thrown from item reader (e.g. reader not open , incorrect token exceptions etc) and handle it. Currently spring batch is throwing them as fatal exceptons and come out of the step. Please let me know if there is any way to do it? 回答1: I faced the same issue whereby I wanted to catch the org.springframework.batch.item.file.FlatFileParseException thrown by the FlatFileItemReader and perform some custom handling & logging. Did some research and almost reached the

Read line in golang

两盒软妹~` 提交于 2019-12-06 14:55:26
There are so many option to do this in Go. For example: scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { fmt.Println(scanner.Text()) } or reader := bufio.NewReader(os.Stdin) text, _ := reader.ReadString('\n') Neither is working in my case. I am unable to find the reason why new line scan is not working. Here's the question I'm working on: https://www.hackerrank.com/challenges/30-dictionaries-and-maps And here's my code: package main import ( "fmt" "bufio" "os" "strings" ) func main() { var count int fmt.Scan(&count) m := make(map[string]string) for i := 0; i<count; i++{ reader :=