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
4
votes
2 answers

Spring Batch: ItemProcessor query Database?

I have a scenario where I need to parse flat files and process those records into mysql database inserts (schema already exists). I'm using the FlatFileItemReader to parse the files and a JdbcCursorItemWriter to insert in the database. I'm also…
4
votes
3 answers

What does this "#" mean in this Clojure context?

I stumbled upon the official Om example under "examples/mixins", there's a definition as this: (def MyComponent (let [obj (om/specify-state-methods! (clj->js om/pure-methods))] (aset obj "mixins" #js [TestMixin]) (js/React.createClass…
Minos Niu
  • 85
  • 6
3
votes
1 answer

Android: Sharing a big file from my app (image, document, etc., ...) without creating a copy in a cache folder/temp file

I am trying to share a file (any type of file) from my app with another app in the phone (via the Share menu, for example), or preview it in the phone's default app, but I need to do this without creating a copy of the file in a temp or cache folder…
3
votes
8 answers

How to read numbers from a mixed txt file in python

I have a txt file which is composed of text and numbers. It looks something like this: > this is a paragraph which is introductory which lasts some more lines text text text 567 45 32 468 974 35 3578 4467 325 765 355 5466 text text text 1 3…
yagmursu
  • 55
  • 6
3
votes
1 answer

PDFBox encrypted / locked PDF is still modified by Adobe Reader during 'save as'

I am working on an implementation where our system generates a PDF file for a user to download. The key of our process and system is that this PDF file should not be modifiable by the user or program on the users computer (at least, not without bad…
JPas
  • 33
  • 4
3
votes
1 answer

Is there a function to specify a message when reading in a file if the line doesn’t follow a certain pattern

I am making a Class called Book that represents books that have a title, an author and a year, when they won the award. I have a method getList which should read in the data from a csv file and if a line doesn’t follow the pattern title,author,year…
3
votes
1 answer

How to read from socket using asyncio add_reader

I have this code: import sys import socket import asyncio async def main(dest_addr, max_hops=30, timeout=0.5): loop = asyncio.get_event_loop() queue = asyncio.Queue() port = 33434 rx = socket.socket(socket.AF_INET,…
NicoAdrian
  • 946
  • 1
  • 7
  • 18
3
votes
2 answers

Python 3 - CSV writer loop won't close after CSV reader reaches end of file

I'm trying to create a program that splits large CSV files into smaller ones. I've got the function working great, except it doesn't ever close the last file, which means it never finishes writing to that file. Here's what I've got: import…
Matt Lefevre
  • 75
  • 1
  • 9
3
votes
3 answers

How to use csv reader object multiple times

I am doing a python project.I opened a new csv files and its contents are A | B ------------- 1. 200 | 201 2. 200 | 202 3. 200 | 201 4. 200 | 203 5. 201 | 201 6. 201 | 202 ........... And what I am doing is... def…
bob marti
  • 1,523
  • 3
  • 11
  • 27
3
votes
1 answer

How to read from a USB RFID Reader with C#

I just bought an USB RFID Reader and now I want to read, write and check if a card is on the Reader at the moment or not. So I searched here and found the Code below. The description of it is pretty much all what I Need: Opens a USB device by…
ShadowOfArmy
  • 33
  • 1
  • 1
  • 4
3
votes
3 answers

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

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…
Roxy'Pro
  • 4,216
  • 9
  • 40
  • 102
3
votes
3 answers

Read line in golang

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…
Sapna Mishra
  • 187
  • 1
  • 2
  • 15
3
votes
0 answers

Mifare 1k: Authentication Key A / Key B Blocks and Sectors

I have to following Problem with the 1K Mifare Tag and ACR122U: First: Am i right, when i understand the Mifare Block Scheme like that: BLOCKS: &H0, &H1, &H2, &H3 --> Form Sector 1, where &H0 is the manufacturer block and &H3 is the block where…
3
votes
1 answer

How to implement a custom FilterReader?

I'm trying to implement a custom FilterReader class. The class is supposed to transform what it reads (never mind how). The problem I'm having is that the string after transformation is longer than the original one read into the char buffer, so I…
Magnus
  • 17,157
  • 19
  • 104
  • 189
3
votes
1 answer

How to insert a default value into missing csv field?

I am attempting to write to append values to a csv. I can search for and find where there are missing fields, but want to know if there is a way to insert 0 as a default value for these fields. I have the following code. def fillBlanks(): …
J.R.W
  • 65
  • 1
  • 9
1 2
3
36 37