fmi / java-course Goto Github PK
View Code? Open in Web Editor NEWМатериали към курса "Съвременни Java технологии"
Материали към курса "Съвременни Java технологии"
Този тест ми минава, без да имам check за null PaymentInfo. Причината е, че проверявам дали картата е регистрирана първо и понеже не е -> return false.
Fix:
assertTrue(wallet.registerCard(standardCard)); assertFalse(wallet.executePayment(standardCard, null));
Сигурни ли сте, че https://github.com/fmi/java-course/blame/master/01-intro-to-java/lecture/PITCHME.md#L651 работи?
Според https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/util/Arrays.html Arrays.sort(char[] a) връща void. В лекцията се извиква .toString() директно на return value-то, но няма такова.
Когато го изпробвах, още IDEто ми се кара с cannot resolve method.
ПС: Не знам дали тук трябваше да вдигам issue-та, ако не е правилното място се извинявам :/
According to the documentation about thejava.nio.channels.Selector:
This method performs a blocking selection operation. It returns only after at least one channel is selected, this selector's wakeup method is invoked, or the current thread is interrupted, whichever comes first.
This means that the if (readyChannels == 0) {
is redundant and unreachable in https://github.com/fmi/java-course/blob/master/11-network/snippets/echoclientserver/nio/EchoServer.java#L31
Several runs on the given tests in 09-network reveal that (randomly) some of them sometimes fail and sometimes don't.
I suspect the problem comes from the fact that the server is on a different thread, thus a test may try to connect to the server before it has started.
The solution would be making each test wait for the server untill it has started. But I fail to find a painless and elegant way to do this in the current setup. How could this problem be fixed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.