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.

554 questions
80
votes
5 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,677
  • 4
  • 20
  • 27
36
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
  • 2,624
  • 4
  • 18
  • 26
19
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
  • 8,155
  • 15
  • 87
  • 198
13
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
  • 321
  • 2
  • 5
  • 17
12
votes
5 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,373
  • 3
  • 17
  • 42
12
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…
basakes
  • 205
  • 1
  • 3
  • 12
10
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
  • 33,322
  • 10
  • 107
  • 191
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
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
  • 2
  • 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
  • 705
  • 7
  • 20
6
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
  • 63
  • 1
  • 1
  • 5
6
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,390
  • 3
  • 38
  • 74
6
votes
2 answers

read specific line in csv file , python

In an CSV file with python we can read all the file line by line or row by row , I want to read specific line (line number 24 example ) without reading all the file and all the lines.
user3967257
  • 69
  • 1
  • 5
6
votes
5 answers

How to disable firefox's reader view from my website?

Today i updated my firefox to the latest version and one big feature is the reader view for desktop. We launched a webshop two weeks ago and now there is this tiny "reader view" icon. When i click on it i get an error-message. My team-leader wants…
moeses
  • 497
  • 1
  • 6
  • 21
5
votes
4 answers

Read local JSON file in typescript

How can I read a locally stored JSON file into a variable in typescript? I have a json file of photos that looks like this: [ { "id": 1, "camera": "", "location": "", "iso": 0, "aperture": 0, "focal length":…
Cameron Cheung
  • 197
  • 1
  • 2
  • 12
1
2 3
36 37