English

Project structure.Net (Java) - classes and interfaces

Good afternoon. I have long wondered how it is customary to store abstractions (interfaces, abstract classes) and their imple ... -> ConcreteObjectB -> IObject Option 4 - your own (I will write in the answer). Which option do you use? Why?

Rounding fractional numbers to integers

What are the standard Java tools for rounding numbers? Rounding example: 3.49 - 3, 3.50 - 4, 3.51 - 4.

Multiple inheritance of Javascript objects

Hello. I want to make inheritance from many objects. There is a great feature that solves problems with IE function inherit ... code? I have a problem how to access the property directly without name to roof.name0.name был доступен просто `roof.name`

Why use an abstract class in java

I've been studying Java recently. Stuck on the fact that I can't understand the role of an abstract class in java. In the tut ... d to an error, or just explain in what cases However, a regular class will not replace an abstract one. Thank you in advance.

Don't block the android (Java) screen)

Hello! I have not been writing for android for a long time and this is just "for the sake of development". But there was such a task: while the application is running, the screen should not go off. How can this be implemented? Android 4

Asynchronous javascript loading

Good afternoon. I decided to speed up the site. The scripts were moved to the basement. jQuery is loaded from CDN to hedere: ... the footer, but it works every other time. Sometimes there are "not defined" errors, sometimes there are none. How to fix it?

Reading and displaying the contents of a file

import java.io.*; import java.util.*; public class prints{ public static vois main(String[] args) throws IOException{ ... tem.out.println((char) c); } } There is a request to display the contents of the file on the screen, if "y" is the output.

JavaScript sort method

You need to sort the array of objects by a criterion (string) I would like to understand what the parameter(sorting function) ... b){return a-b;}); // Сортирует по возрастанию k.sort(function(a,b){return b-a;}); // Сортирует по убыванию How does it work?

Why do I need the Void class?

Why does Java need the java.lang.Void class?

Features of using scanner. nextLine()

I have this code. String anun=sc.nextLine(); System.out.println("age:"); int tar=sc.nextInt(); System.out.println("email:") ... ("email:" + mail); And always, when the time comes for String mail=sc.nextLine();, just skip the step. What is the problem?

Javascript: Are hanging commas safe?

A colleague of mine likes to leave hanging commas when defining constant Javascript objects: var myObj = { prop1: 'smth' ... hanging commas should/should not be used? For example, a positive / negative impact on the optimizers or something like that

How to write micro-tests in Java correctly?

What is the best way to write micro-tests/performance tests in Java? What are the main points to pay attention to?

Example of using the REST API

Hello. I want to create an Android client for the site. The site has an API. But I don't quite understand how to send a requ ... id":7365,"message":0.0071,"country":"UA","sunrise":1441855387,"sunset":1441901633},"id":700569,"name":"Mykolayiv","cod":200}

Bot for VK in Java

I am not well versed in web programming, so please do not take my possibly stupid questions to heart :) We plan to write an ... f you provide an example of how to log in and store this authorization, how to interact with the API (the simplest examples).

How does the foreach loop work in Java?

There is a collection and a loop foreach: List<String> someList = new ArrayList<String>(); //add "monkey", "donk ... reach loop above look like? How does the foreach loop work inside? What is the difference between the for and foreach cycles?

Choosing an obfuscator for JAVA

Advise an obfuscator that can: rename files redistribute them to other packages And it is desirable that some files can be l ... tatic int ii; private static int ij = 2 * ii; public ab(int par1) { ii = par1; } /*Дальше еще какой-то код... */ }

Self-calling JavaScript functions

(function(a){ alert(a); }(1)); (function (a) { alert(a); })(1); What is the difference between these functions? ... from the example of Stefanov: var result = (function () { return 2 + 2; }()); (function () { alert(‘watch out!’); })();

MVC model in JavaFX on your fingers

You can very simply "on your fingers" explain how to use the MVC model when building a GUI in JavaFX ? What folder structure ... ill see an example of some work with github, which will demonstrate to a full teapot how not to bydlokodit when using JavaFX.

Java development for ios (iPhone)? [closed]

Closed. This question should be specified . Answers to it are not accepted at the moment. ... he question, please answer! I really need some information. If you know about the pitfalls of this case, please also write!

Why are there two interfaces in Java: Iterable and Iterator?

In my opinion, they only add confusion. This is how I understood their roles: Iterable says that objects of the class can be ... ould look great in one interface. Which would both declare the class iterable and at the same time set methods for iterating.