Privacy policyContactsAbout siteOpinionsGitHubDonate
© EVILEG 2015-2018
Recommend hosting
July 21, 2015, 1:55 p.m.


Android, ListView, ListAdapter

Customization ListView is common in developing applications for Android OS. ListView (List) allows you to display the same type of information in your application, for example, show the products with prices and features, if you develop applications for online sales. At the same time being in fact a routine operation, however, some questions for novice developers deliver a lot of inconvenience. Some of these inconveniences and questions will be discussed in this article.

Project structure

This lesson is proposed to establish a small list with the flags of countries, called the currencies of these countries, and the abbreviation of the country.

Total is used to create a list of four countries: Russia, South Africa, Singapore, Turkey. Flags of these countries are in the drawable folder. Also there is an xml file to create backgrounds ListViewi flags. For storing names and abbreviations used strings.xml file. Also, a separate xml file to create the ListView layout.

In the Project there are three classes:

  1. MainActivity
  2. MyListAdapter - which is responsible for the transmission of data in the form of a list item
  3. DataFlags - class that is designed to facilitate the transfer of data to the adapter ListView
July 20, 2015, 6:57 a.m.

Data Transmission Technologies

иерархическая звезда, кольцевая топология, топология ЛВС, полносвязная топология, ячеистая топология

Under the topology of the network refers to the configuration of the graph, whose vertices correspond to the end nodes of the network (such as computers) and communications equipment (eg, routers), and the edges of the physical or informational communication between nodes.

Full mesh

Full mesh

This topology requires communication nodes N N (N-1) / 2 duplex physical links. The advantage of this layout is that it connects each node to each. Thus, in the event of a node failure, there is no malfunction of other nodes in the network based on this topology.

But in practice, this type of topology is not applicable, because it is a very expensive option of building a network.

July 20, 2015, 6:38 a.m.

Data Transmission Technologies

network, transmission

Decomposition of the tasks of networking

Network architecture - a view of the network as a system of interrelated elements, each of which is assigned a specific private function.

In addition, each of the network elements solves a common problem. All common task is broken down into a number of small tasks that solve different network elements, ie one single task is decomposed. The interaction between all network elements through a formalized set of rules, called the protocol.

Decomposition of the task

Decomposition - splitting a complex task into several simple.

June 29, 2015, 7:47 a.m.

Fiber Optic Transmission Lines

fiber, волс, модовая дисперсия

Distinguish mode dispersion, which is caused by a large number of modes in the optical fiber and the chromatic dispersion associated with the incoherence of light sources actually operating in a certain range of wavelengths.

Consider the propagation of the light beam along the multimode fiber. In this case there are two modes, the two beams. The first extends along the longitudinal axis of the fiber, while the other is reflected from the interfaces of media. Thus the path of the second light beam is greater than the first. As a result, when the two beams carrying the electromagnetic energy are added together, compared oblique beam with an axial beam is the time delay, which is calculated by the following formula:

c – speed of light
l – fiber length
n 1 , n 2 – refractive indices of the core and shell

June 29, 2015, 7:36 a.m.

Fiber Optic Transmission Lines

fiber, волс, потери

The most important parameters are the optical fiber loss and attenuation of the transmitted energy. These parameters define the range of the FOC and on its effectiveness. Attenuation in optical fibers due to manifestation of the following losses:

α c – own loss of fiber waveguides
α k – additional cable losses
α ik – absorption loss in the infrared region
α pr – the loss caused by the presence of impurities in the optical fibers

Proper loss fibers consist, in turn, an absorption loss of α p and scattering loss α r :

Attenuation due to the absorption due to the losses on the dielectric polarization depends strongly on the properties of the fiber material and is calculated by the following formula:

tgδ – dielectric loss tangent

The attenuation in the infrared region, situated in the wavelength range of more than 1.6 microns, calculated by the formula:

C and k – constant coefficients. For quartz glass C = 0,9; k = (0,7—0,9) мкм.

June 28, 2015, 1:22 p.m.

Fiber Optic Transmission Lines

fiber, волс, типы волс

Depending on the number of the operating frequency propagating waves (modes) of the fibers and is separated into one multimode. The number of modes is dependent on the ratio of the diameter of the fiber core and the wavelength for optical fibers having step-index is calculated as follows.

α – fiber core radius,
λ – wavelength,
Δ – relative refractive index difference.

Since n 1 and n 2 have very similar meanings, the nominal value ∆ for most optical fibers is within

June 28, 2015, 12:37 p.m.

Fiber Optic Transmission Lines

fiber, волс, апертурный угол

The optical fiber is a thin glass strand bilayer, each element (core and shell) has a different refractive index. The refractive index n of transparent material is the ratio of the velocity of light in vacuo (c - velocity of light) to the speed of light in this material (v), and defined by the following formula:

where ε and μ — respectively, relative dielectric and magnetic permeabilities.

Given that the relative magnetic permeability of the transparent material is usually constant and equal to one, the refractive index of the core for n 1 = √ε 1 , and for the shell n 2 = √ε 2 .

April 17, 2019, 7:40 p.m.
Anton Ablin

Qt - Test 001. Signals and slots

  • Result:73points,
  • Rating points1
April 17, 2019, 6:16 p.m.

Qt - Test 001. Signals and slots

  • Result:100points,
  • Rating points10
April 17, 2019, 6:14 p.m.

Qt - Test 001. Signals and slots

  • Result:78points,
  • Rating points2
Last comments
April 18, 2019, 3:37 p.m.

А как иконку в хедер задать?
April 18, 2019, 2:15 a.m.

доброго времени,большое спасибо за пример для начинающего)при адаптации к своему проекту столкнулся с таким ньансом:в vepolyline.h в 47 строке нужна инициализация по умолчанию: int m_pointF...
April 11, 2019, 12:49 p.m.

Спасибо за ответ) У меня компоновщик на нее ругался просто. Оказалось, просто забыл Q_OBJECT в начале класса указать.
April 11, 2019, 12:29 p.m.
Евгений Легоцкой

Добрый день. Вы имели ввиду реализацию? Для сигналов в Qt реализация не пишется, это всё генерируется в moc файлах под капотом Qt.
April 11, 2019, 12:15 p.m.

Здравствуйте. А где описание функции signal1()?
Now discuss on the forum
April 19, 2019, 9:55 a.m.

мені важко це зараз навіть перевірити, тому що знайшов коміт, це ще було в 2016 році, і цей код не буде працювати коректно зараз, єдине скажу що це були QThread
April 17, 2019, 3:03 p.m.

BlinCT, на стороне ++ это делать необходимо так как в qml при использовании функции append происходит перерисовка всех точек лини(как я понимаю) и из-за этого при использовании больших массиво...
April 10, 2019, 11:20 a.m.
Алексей Внуков

может тоже кому надо будет - QML не принимает QVector<QVector<int>> , при попытке вывести полученый вектор QML показывает что это QVariant(QVector<QVector<int> ...
April 10, 2019, 9:36 a.m.
Stanislav Nykytiuk

Как реализовать такое меню, что бы нажмаешь меню подменю и выбор позиции? Данные меню и подменю в базе SQL.
Join us in social networks

For registered users on the site there is a minimum amount of advertising