Questions tagged [reader]

Reader specifies a software that can read files of a specific format or a hardware gadget that can read some memory card or similar device.

Reader specifies a software that can read files of a specific format or a hardware gadget that can read some memory card or similar device.

462 questions
51
votes
4 answers

How to read multiple times from same io.Reader

I want to use request.Body(type io.ReadCloser) which is containing a image. I dont want to use ioutil.ReadAll() as i want to write this body directly to the file as well as want to decode it, so i only want to use the reference to the content to…
Abhishek Soni
  • 1,227
  • 3
  • 14
  • 27
29
votes
3 answers

Golang io/ioutil NopCloser

Does anyone have a good or any explanation of Golang's NopCloser function? I looked around but failed to find anything besides Golang's main doc's explanation of: NopCloser returns a ReadCloser with a no-op Close method wrapping the provided…
G4143
  • 1,912
  • 4
  • 15
  • 19
15
votes
3 answers

Android camera2: java.lang.IllegalStateException: maxImages (1) has already been acquired, call #close before acquiring more

Hello having trouble to fix this issue. I already have a imageReader.close called inside the ImageAvailable callback but still having the error: java.lang.IllegalStateException: maxImages (1) has already been acquired, call #close before acquiring…
LittleFunny
  • 7,205
  • 11
  • 71
  • 166
11
votes
7 answers

How to get float value with SqlDataReader?

In my database, I have NextStatDistanceTime value as a float. When "float time = reader.GetFloat(0);" line excecuted, it gives an error of system invalid cast exception How can I get float value from sql command in this code? Here is my…
BasakEbru
  • 175
  • 1
  • 1
  • 11
10
votes
1 answer

can cljc single-file macro definitions to work with clojurescript?

I have clojurescript successfully importing macros from other namespaces. But I wonder whether a single-file construction is/should be possible with clojure 1.7, such that a macro can be defined and used. What I have tried does not work, but maybe…
ben
  • 113
  • 1
  • 7
9
votes
2 answers

Cannot use (type []byte) as type io.Reader

I don't understand the error, this is my main.go that I execute in the machine "A": package main import ( "fmt" "net" "os" "github.com/mistifyio/go-zfs" ) func main() { // Listen for incoming connections. l, err :=…
icarbajo
  • 261
  • 1
  • 4
  • 12
8
votes
2 answers

Load pdf on foreign url with pdf.js

I am trying to load pdf from another server to the viewer of pdf.js in my server.I got error "PDF.js v1.4.20 (build: b15f335) Message: file origin does not match viewer's" I already checked many answer, many of them said that pass the pdf url…
Mukesh Gupta
  • 1,075
  • 3
  • 14
  • 36
7
votes
4 answers

Fastest way to read a CSV file java

I´ve been trying to read several csv files (arround 20 MB) using openCSV, but so far it has been slow. Im trying to read 4 csv files which I´m loading into a heap, which I have designed. I was wondering, if there is any other way this could be done…
Santiago Fajardo
  • 119
  • 1
  • 1
  • 8
6
votes
2 answers

What's the benefit of using Sharpsign Dot?

I had used cl-ppcre package recently and I am very curious about how they optimize this package because I want to learn optimizing common lisp. I notice they use Sharpsign Dot a lot in declare expression, like here. The optimized setting is here.…
ccQpein
  • 583
  • 4
  • 18
6
votes
1 answer

Getting a reader for a byte array

I'm trying to test some code which takes a reader. I've got a function: fn next_byte(reader: &mut R) -> ... How can I test it on some array of bytes? The docs say that there's a impl<'a> Read for &'a [u8], which would imply this should…
viraptor
  • 30,857
  • 7
  • 96
  • 176
5
votes
1 answer

How to localize with BufferedReader?

In Java 11 BufferedReader documentation I have found following sentence: Programs that use DataInputStreams for textual input can be localized by replacing each DataInputStream with an appropriate BufferedReader. I cannot find any explanation how…
Line
  • 1,318
  • 3
  • 14
  • 35
5
votes
2 answers

Is it possible to use NFC on the iPad?

everybody, I am currently developing an iOS application. This application should make it possible to read NFC tags with an iPad. The NFC has already been successfully tested on an iPhone 7 / 8. As soon as I test this function on an iPad (2017), the…
FabienS
  • 53
  • 1
  • 1
  • 4
5
votes
3 answers

Keep double quotes in a text file using csv reader

Hi I have a text file with string : hello,"foo, bar" i want to split it into a list as: ['hello', '"foo, bar"'] Is there a way I can acheive this ? I am trying this as of now : for line in sys.stdin: csv_file = StringIO.StringIO(line) …
piyush121
  • 467
  • 9
  • 16
5
votes
0 answers

Reading ID cards in the web

I'm interested in being able to read ID cards(Belgian ID cards if that matters) using the idcard reader. After some research I came across this blog which seems great, but it does require .NET to be able to run. I also found e-contract which allows…
Novarg
  • 7,350
  • 2
  • 34
  • 72
4
votes
1 answer

What is java.io.Reader transferTo(java.io.Writer) method in Java 10 ? Is there a similar method for InputStream?

I read the Java 10 documentation on java.io.Reader.transferTo(...) and it says: Reads all characters from this reader and writes the characters to the given writer in the order that they are read The method transferTo in Reader would be very…
Shubham Kadlag
  • 2,087
  • 1
  • 10
  • 31
1
2 3
30 31