Android

July 26, 2015, 10:12 a.m.

Android, Toast

Give customization of all applications under OS Android !!!

With the slogan I want to tell today about customization pop-up message (Toast) in the Android OS. In any application that is designed and developed with great care, the question may arise about the customization of even such an element as a popup message. After the success of the application depends not only on ideas and utility, but also from the sale of the appearance of the parts, even the smallest and seemingly not very important.

Project structure

This lesson is to write an application that will display a customized pop-up message by pressing a button, which will not be subject of customization.

In the Project there are two classes:

  1. MainActivity
  2. MyListAdapter - which is responsible for the transmission of data in the form of a list item

Also, the project contains the following resource files:

  1. activity_main.xml
  2. toast_info.xml - pop-up message marking
  3. toast_border:xml - additional markup for background of pop-up message
  4. ic_info.png - Image Information icon, which will be used in the pop-up message
  5. string.xml - string constants file

Android

July 21, 2015, 9:55 a.m.

ListView, ListAdapter, Android

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

Data Transmission Technologies

July 20, 2015, 2:57 a.m.

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

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.

Data Transmission Technologies

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

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.

Fiber Optic Transmission Lines

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

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

Fiber Optic Transmission Lines

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

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) мкм.

Fiber Optic Transmission Lines

June 28, 2015, 9:22 a.m.

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

Fiber Optic Transmission Lines

June 28, 2015, 8:37 a.m.

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 .

Donate

Hello, Dear Users of EVILEG!!!

If the site helped you, then support the development of the site financially, please.

You can do it by following ways:

Thank you, Evgenii Legotckoi

A
April 6, 2020, 5:24 a.m.
Alexey

C++ - Test 001. The first program and data types

  • Result:86points,
  • Rating points6
R
April 5, 2020, 2:32 p.m.
Roman

C++ - Test 002. Constants

  • Result:91points,
  • Rating points8
AP
April 5, 2020, 2:31 p.m.
Alexander Peshkov

C++ - Test 001. The first program and data types

  • Result:60points,
  • Rating points-1
Last comments
April 3, 2020, 8:06 a.m.
Konstantin Grudnitskiy

Я надеюсь вы уже разобрались в чем дело, но если вдруг нет, то проблема состоит в том, что вы пытаетесь запустить программу из интерпретатора питона. Файл main.py это уже готова…
April 3, 2020, 6:18 a.m.
Konstantin Grudnitskiy

>>> text = 'hello world'>>> ' '.join(word for word in text.split()[:-1])'hello'>>> def remove_last_word(text):... return text and ' '.join(word for word in text.s…
March 27, 2020, 2:40 p.m.
Evgenij Legotskoj

Добрый день. В конце пятой статьи скачать можете.
March 27, 2020, 2:28 p.m.
mkdir _

Здравствуйте, а можно, пожалуйста, ссылку на целые исходники, если есть?
March 27, 2020, 4:36 a.m.
Evgenij Legotskoj

Скорее всего также, как и для установки всех остальных переменых в CMake, через использование set
Now discuss on the forum
s
April 6, 2020, 8:06 a.m.
shuric

Добрый день. Объясните пожалуйста ... ... допиливать стилевое оформление в прокси классе ... где именно копать ? В каком виртуальном методе лучше допиливать (если можно н…
April 6, 2020, 4:19 a.m.
Evgenij Legotskoj

Попробуй не переустанавливать материал, а просто менять цвет
April 5, 2020, 11:38 a.m.
Mihailll

Так работает windeployqt --qmldir E:\QTProject\testQmlAndCpp E:\test\build-testQmlAndCpp-Desktop_Qt_5_14_1_MinGW_32_bit-Release
April 5, 2020, 2:35 a.m.
Mihailll

Так работает console.log(textEmail.text) var str = textEmail.text; var n = str.search(/^((([0-9A-Za-z]{1}[-0-9A-z\.]{1,}[0-9A-Za-z]{1})|([0-9А-Яа-я]{1}[-0-9А-я\.]{1,}[…
April 3, 2020, 8:48 a.m.
Intruder

Евгений, добрый день. Спасибо!
EVILEG
About
Services
© EVILEG 2015-2019
Recommend hosting TIMEWEB