FAQ Database Discussion Community

Java scanner with 2 hasNext()

I would like to restore an object from a CSV file. I need to know if scanner has 2 next values: scanner.hasNext() the problem is my visit constructor takes 2 parameters and I need to ensure there are at least 2 left in my csv file. here is the relevant...

Removing spaces from astring within a CSV in python

I have a CSV that is output by a program. The delimiter is a space. One "cell" of the CSV is manually input by a user, the rest is automatically generated. The issue is that the user may have a space within the string they manually input. If I were...

Does an html element require focus to be read by screen readers

If I show a modal somewhere on the screen, and I want the screen reader to read it at some point, does setting the aria-live to one of the values suffices, or do I also have to explicitly focus the element when I show it?

Many writers one reader without concurrency

I'm programming in java, and I have a List<LogEntry> logwhich is shared between different threads. These "writers" threads are already synchronized between them, so only one thread at time can add or remove elements from log However, because of the distributed algorithm that I'm trying to implement, there are portion...

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.

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 I've missed a detail someplace. (ns cljc.core) #?(:cljs (enable-console-print!)) #?(:clj...

Need Fingerprint Reader Integration with SDK?

I need to integrate a fingerprint system with my software. Can any one recommend any best fingerprint sdk solution with complete tutorial. Thanks in advance Robert...

setting text color to transparent for hiding accessibility content?

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...

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 me to remove...

An app that just reads a bar code

I want to develop an app that just reads a bar code. I don't want it to go off to a website or shop or anything. Just read it! It must run on iPad Air. I have seen zbar and a few other suggestions but I want to be sure...

Design pattern for consecutive object value extractor

Consider an object that extracts object values from a source on a "pull" basis, until a special value (e.g., null) is encountered. In Java, the API could be something like public interface ValueExtractor<T> { public T extractNext(); } Operationally, this is an Iterator but it only has a (sort of)...

Reader return the value 63?

I tried to write random numbers with the Writer in a binary file and read it out with the Reader. So far, so good. But sometimes the Reader displays me the value 63 as opposed to the right number. Why does the programm display me the value 63? For example:...

Could not autowired Object in ItemStreamReader open method

I use Spring Batch with Spring Boot and here is a my main class. @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } } Here is my configuration classes @Configuration public class AppConfig { @Bean public MyObject getObject() { return new MyObject(); } } @Configuration...