A Million of the Smallest Numbers in a Set of a Billion Numbers
There are many ways to solve this problem. We will focus only on three of them: sorting, the minimum of the heap and ranking.
We can sort the items in ascending order, then take the first million numbers. This requires
O(nlog(n)) time. Continue reading
Lee’s algorithm is a path finding algorithm and is one reasonable solution for maze routing. It’s usually used in computer design systems to create routes for wires on printed boards.
Let’s look at the use of the algorithm on these pictures.
We need to associate cell1 with cell2:
Nowadays, mobile developers have to work with a large amount of screen resolutions. Earlier applications had to contain a lot of the same pictures with different sizes to make icons display correctly. A few years ago, the icon font toolkit called Font Awesome became very popular. It gives developers an opportunity to escape from the large amount of pictures and flexibly adapt their products to different screen resolutions.
So, let’s start with the creation of the icon font. To do this we will need images in SVG format and a free service. I will use glyphter.com, which allows the use of a lot of different icons for free.
First, you should download the Python installer. Go to the official site python.org/downloads/ and download the latest version:
After the download, run it and follow the instructions of the wizard. The default installation path is C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python35-32. You can change it using the “Customize installation” button. Don’t forget check the the box for “Add Python 3.5 to PATH”. Otherwise, you will have to do it manually. After it is done, click “Install Now”. Continue reading
To start programming in Java, you first need to install the software environment on your computer.
1) Download the Java installer.
You can download it from the official Oracle website using this link:
Download the latest version of the JDK. Choose the proper option for your operating system from the table. Remember that you should accept the license agreement to download the file. Continue reading
In this guide, I will show how to use the Fody tool to reduce the amount of the required program code, and the use of icon fonts and NcontrolView library for the manual drawing of interface elements.
The first thing you need to know is the definition of the business applications, and differences between them and other kinds of apps.
We usually divide applications into logical groups using such criteria:
– Interface complexity
– Usage of the OS features
– Frequency of the usage Continue reading
Hello! In this guide, I’ll show you the program to check the balance of different types of parentheses in an expression using C++.
Idea for Implementation
Everything would be much simpler if we had to check only one type of parentheses. If it is required to check the balance of the parentheses of only one type, for example, “(“ and “)”, we can read all the symbols one by one, ignoring all the symbols except the braces. If it is an opening bracket we increase the counter by 1, and if it’s a closing bracket we reduce the counter by one. After the check, it’s easy to define if the expression is balanced. If the counter is bigger than zero, we have more opening brackets. But if it goes lower than zero, we can’t check further. So we will use the stack. Continue reading
Hello! In this guide I’ll show you how to use BlueJ to create and run Java programs. My example will be with the Tic Tac Toe game.
Download and install BlueJ from the official website bluej.org:
Perform discriminant analysis on the results of measuring the length and width of iris flowers (SEPALLEN, SEPALWD, PETALLEN, PATELWD); identify the type of iris (SETOSA, VERSICOL, VIRGINIC) using Statistica software. Continue reading