quarta-feira, 8 de novembro de 2017

XML basics for new users

An introduction to proper markup
Comments
 
2
XML stands for Extensible Markup Language, with the markup bit being the key. You can create content and mark it up with delimiting tags, making each word, phrase, or chunk into identifiable, sortable information. The files, or document instances, you create consist of elements (tags) and content, and the elements help the documents to be understood fairly well when read from printouts or even processed electronically. The more descriptive the elements, the more a document's parts can be identified. From the early days of markup to today, one advantage of tagging content is that if a computer system is lost, the data in print can still be understood from its tags.
Markup languages evolved from early, private company and government forms into Standard Generalized Markup Language (SGML), Hypertext Markup Language (HTML), and eventually into XML. SGML can seem complex, and HTML (which was really just an element set) was just not powerful enough to identify information. XML is designed as an easy-to-use and easy-to-extend markup language.
With XML, you can create your own elements, giving you the freedom to precisely represent your pieces of information. Rather than treating your documents as headings and paragraphs, you can identify each part within the document. For efficiency, you'll want to define a finite list of your elements and stick to them. (You can define your elements in a Document Type Definition (DTD) or in a schema, which I will discuss briefly later.) As you start out and get used to XML, feel free to experiment with element names as you build practice files.

Building XML

As I mentioned, your XML files will consist of content plus markup. You place much of your content in elements by surrounding your content with tags. For example, suppose you need to create an XML cookbook. You have a recipe named Ice Cream Sundae to prepare in XML. To mark up the recipe name, you enclose that text in your element by placing the beginning tag before your text and the ending tag after your text. You might call the element recipename. To mark the beginning tag of the element, place the element's name inside angle brackets (<>) like this: <recipename>. Then, type your text Ice Cream Sundae. After the text, enter the element's ending tag, which is the element's name inside angle brackets plus an ending forward slash (/) before the element's name, like this: </recipename>. These tags form an element, into which you can enter content or even other elements.
You can create element names for individual documents or for document sets. You can craft the rules for how the elements fit together based on your specific needs. You can be very specific or keep element names more generic. You can create rules for what each element is allowed to contain and make these rules strict, lax, or something in between. Just be sure to create elements that identify the parts of your documents that you feel are important.

Start your XML file

The first line of your XML document might be an XML declaration. This optional part of the file identifies it as an XML file, which can help tools and humans identify the file as XML rather than SGML or some other markup. The declaration can be written simply as <?xml?> or include the XML version (<?xml version="1.0"?>) or even the character encoding, such as <?xml version="1.0" encoding="utf-8"?> for Unicode. Because this declaration must be first in the file, if you plan to combine smaller XML files into a larger file, you might want to omit this optional information.

Create your root element

The root element's beginning and end tags surround your XML document's content. Only one root element is in the file, and you need this "wrapper" to contain it all. Listing 1 shows a truncated portion of the example I use here with a root element named <recipe>. (See Download for the full XML file.)
Listing 1. The root element
1
2
3
<?xml version="1.0" encoding="UTF-8"?>
<recipe>
</recipe>
As you build your document, your content and additional tags will go between <recipe> and </recipe>.

Name your elements

So far, you have <recipe> as your root element. With XML, you choose the names for your elements, then define the corresponding DTD or schema based on those names. The names you create can contain alphabetic characters, numbers, and special characters such as underscores (_). Here are a few things to note about your naming:
  • Spaces are not allowed in the element names.
  • Names must begin with an alphabetic character, not a number or symbol. (After this first character, you can use any combination of letters, numbers and the allowed symbols.)
  • Case does not matter, but be consistent to avoid confusion.
Building on the prior example, if you add an element named<recipename>, it will have a beginning tag <recipename> and a corresponding end tag </recipename>.
Listing 2. More elements
1
2
3
4
5
<?xml version="1.0" encoding="UTF-8"?>
<recipe>
<recipename>Ice Cream Sundae</recipename>
<preptime>5 minutes</preptime>
</recipe>
An XML document can have some empty tags that do not have anything inside and can be expressed as a single tag instead of as a set of beginning and end tags. To use an HTML-like example, you might have <img src="mylogo.gif"> as a stand-alone element. It doesn't contain any child elements or text, so it is an empty element and you can express it as <img src="mylogo.gif" /> (finished off with a space and the familiar ending slash).

Nest the elements

Nesting is the placement of elements inside other elements. These new elements are called childelements, and the elements that enclose them are their parent elements. Several elements are nested inside the <recipe> root element, as in Listing 3. These nested child items include <recipename><ingredlist>, and <preptime>. Inside the <ingredlist> element are multiple occurrences of its own child element, <listitem>. Nesting can be many levels deep in an XML document.
A common syntax error is improper nesting of parent and child elements. Any child element must be completely enclosed between the starting and end tags of its parent element. Sibling elements must each end before the next sibling begins.
The code in Listing 3 shows proper nesting. The tags begin and end without intermingling with other tags.
Listing 3. Properly nested XML elements
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="UTF-8"?>
<recipe>
<recipename>Ice Cream Sundae</recipename>
<ingredlist>
<listitem>
<quantity>3</quantity>
<itemdescription>chocolate syrup or chocolate fudge</itemdescription>
</listitem>
<listitem>
<quantity>1</quantity>
<itemdescription>nuts</itemdescription>
</listitem>
<listitem>
<quantity>1</quantity>
<itemdescription>cherry</itemdescription>
</listitem>
</ingredlist>
<preptime>5 minutes</preptime>
</recipe>

Add attributes

Attributes are sometimes added to elements. Attributes consist of a name-value pair, with the value in double quotation marks ("), thus: type="dessert". Attributes provide a way to store additional information each time you use an element, varying the attribute value as needed from one instance of an element to another within the same document.
You type the attribute—or even multiple attributes—within the starting tag of an element: <recipe type="dessert">. If you add multiple attributes, separate them with spaces: <recipename cuisine="american" servings="1">Listing 4 shows the XML file as it currently stands.
Listing 4. The current XML file with elements and attributes
1
2
3
4
5
<?xml version="1.0" encoding="UTF-8"?>
<recipe type="dessert">
<recipename cuisine="american" servings="1">Ice Cream Sundae</recipename>
<preptime>5 minutes</preptime>
</recipe>
You can use as few or as many attributes as you feel you need. Consider the details you might add to your documents. Attributes are especially helpful if documents will be sorted—for example, by type of recipe. Attribute names can include the same characters as element names, with similar rules for omitting spaces and starting names with alphabetic characters.

Well-formed versus valid XML

If you follow the rules outlined in your structure, you can easily produce well-formed XML. Well-formed XML is XML that follows all the rules of XML: proper element naming, nesting, attribute naming, and so on.
Depending on what you do with your XML, you might work with well-formed XML. But consider the aforementioned example of sorting by recipe type. You need to ensure that every <recipe> element contains the type attribute in order to sort recipes. Being able to properly validate and ensure that this attribute’s value is always present can be invaluable (no pun intended).
Validation is checking your document's structure against rules for your elements and how you defined child elements for each parent element. You define these rules in a Document Type Definition (DTD) or in a schema. This validation requires you to create your DTD or schema, and then reference the DTD or schema file within your XML files.
To enable validation, you include the document type (DOCTYPE) in your XML documents near the top. This line refers to the DTD or schema (your list of elements and rules) to be used to validate that document. For example, your DOCTYPE might read something like Listing 5.
Listing 5. DOCTYPE
1
<!DOCTYPE MyDocs SYSTEM "filename.dtd">
This example assumes that your element list file is named filename.dtd and resides on your computer (SYSTEM versus PUBLIC if pointing to a public file location).

Using entities

Entities can be phrases of text or special characters. They can point internally or externally. Entities must be declared and expressed properly to avoid errors and to ensure proper display.
You cannot typed special characters directly into your content. To use a symbol in your text, you must set it up as an entity using its character code. You can set up phrases such as a company name as an entity, then type the entity throughout your content. To set up an entity, create a name for it, and type it within your content, starting with an ampersand (&) and ending with a semicolon (;)—for example, &coname; (or whatever you name it). You then enter code within your DOCTYPE inside square brackets ([]), as in Listing 6. This code identifies the text that stands in for the entity.
Listing 6. ENTITY
1
2
3
<!DOCTYPE MyDocs SYSTEM "filename.dtd" [ <!ENTITY coname "Rabid Turtle
Industries"
]>
Using entities might help you avoid typing the same phrase or information repeatedly. It can also make it easier to adjust the text—perhaps if the company name changes—in many places with a simple adjustment in the entity definition.

Avoiding errors

As you learn to create your XML files, open them in an XML editor to check for well-formedness and confirm that you're following the rules of XML. If, for example, you have Windows® Internet Explorer®, you can open your XML file in the browser. If it displays your elements, attributes, and content, then the XML is well formed. If instead errors are displayed, you likely have a syntax error and need to review your document carefully for typos or missing tags and punctuation.
As mentioned in Nest the elements, an element that contains another element is the parent of that contained element. In the example below, <recipe> is the root element and contains the full content of the file. This parent element, <recipe>, contains child elements <recipename><ingredlist>,<directions>, and several others. This structure makes <recipename><ingredlist>, and<directions> siblings. Remember to nest your sibling elements properly, as well. Listing 7 shows well-formed and properly nested XML.
Listing 7. Well-formed XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?>
<recipe type="dessert">
<recipename cuisine="american" servings="1">Ice Cream Sundae</recipename>
<ingredlist>
<listitem><quantity units="cups">0.5</quantity>
<itemdescription>vanilla ice cream</itemdescription></listitem>
<listitem><quantity units="tablespoons">3</quantity>
<itemdescription>chocolate syrup or chocolate fudge</itemdescription></listitem>
<listitem><quantity units="tablespoons">1</quantity>
<itemdescription>nuts</itemdescription></listitem>
<listitem><quantity units="each">1</quantity>
<itemdescription>cherry</itemdescription></listitem>
</ingredlist>
<utensils>
<listitem><quantity units="each">1</quantity>
<utensilname>bowl</utensilname></listitem>
<listitem><quantity units="each">1</quantity>
<utensilname>spoons</utensilname></listitem>
<listitem><quantity units="each">1</quantity>
<utensilname>ice cream scoop</utensilname></listitem>
</utensils>
<directions>
<step>Using ice cream scoop, place vanilla ice cream into bowl.</step>
<step>Drizzle chocolate syrup or chocolate fudge over the ice cream.</step>
<step>Sprinkle nuts over the mound of chocolate and ice cream.</step>
<step>Place cherry on top of mound with stem pointing upward.</step>
<step>Serve.</step>
</directions>
<variations>
<option>Replace nuts with raisins.</option>
<option>Use chocolate ice cream instead of vanilla ice cream.</option>
</variations>
<preptime>5 minutes</preptime>
</recipe>
Note: The line breaks make it easier for you to read your code and do not affect the XML.
You might wish to experiment with your test files, and move the end tags and beginning tags, to become familiar with the resulting error messages.

Reviewing XML

In Figure 1, your elements show up clearly when viewed within Internet Explorer. Beginning and end tags surround your content. Small plus (+) and minus (-) symbols are available next to parent elements so you can collapse all elements nested inside them (their descendants).
Figure 1. A sample XML instance (file) with some siblings collapsed
Sample XML instance with siblings collapsed

Wrapping up

Beyond a few simple rules, you have flexibility in designing your XML elements and attributes. XML’s rules are not difficult. Typing an XML document is also not difficult. What is difficult is figuring out what you need from your documents in terms of sortability or searchability, then designing elements and attributes to meet your needs.
When you have a good idea of your goals and how to mark up your content, you can build efficient elements and attributes. From that point, careful tagging is all you need to create well-formed and valid XML.

Downloadable resources

Related topics

  • XML technical library: See the developerWorks XML Zone for a wide range of technical articles and tips, tutorialsstandards, and IBM Redbooks.
  • XML topic on Wikipedia: Learn more about XML.
  • XML Tutorials at W3 Schools: Expand and test your skills from basic XML through JavaScript and other advanced topics.
  • XML specification from the World Wide Web Consortium: Read more about this flexible text format that works for large-scale electronic publishing as well as the exchange of a wide variety of data on the Web and elsewhere.
  • Introduction to XML (Doug Tidwell, developerWorks, August 2002): Further explore what XML is, why it was developed, and how it shapes electronic commerce in this tutorial. Also, cover various important XML programming interfaces and standards, plus two case studies that show how companies solve business problems with XML.
  • IBM trial software for product evaluation: Build your next project with trial software available for download directly from developerWorks, including application development tools and middleware products from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere®.
  • developerWorks podcasts: Listen to interesting interviews and discussions for software developers.
https://www.ibm.com/developerworks/library/x-newxml/

XML versus Relational Database Performance

August 22, 2010

I have been asked many times: “What is faster, XML or Relational?”. Of course, this question oversimplifies a complex issue, and so the only valid answer is “It depends!”. Sometimes people ask the same question in a slightly different way: “If I have a relational table and convert each row into a small XML document and store these documents in a separate table with 1 XML column, what’s the performance difference between the two tables (for inserts/updates/queries)?”. But, in most cases such a conversion is not recommended and this type of comparison is, again, too simplistic.
Let’s say you want store, index, and query 1 million addresses and each address has a first name, last name, street, city, state, and zip code. That’s a simple and fixed structure and it’s the same for all records. It’s a perfect fit for a relational database and can be stored in a single table. Relational databases have been optimized for decades to handle such fixed records very efficiently. However, if the application needs to convert the address data to XML format anyway, it can often be faster to store the data permanently in XML and avoid the repeated conversion from relational format to XML format in the application.
Now consider a scenario where the business objects of interest are a lot more complex and variable than simple addresses. For example, derivative trades in the financial industry are modeled in XML with an XML Schema called FpML (financial products markup language). It defines more than 7000 fields (many are optional) with hundreds of 1-to-many relationships between them. Designing a relational schema to represent such objects is very hard and leads to hundreds of tables. The process of inserting (normalizing) and reading (denormalizing) a single object into such a relational schema can easily be 10x or 100x slower than inserting and reading a corresponding XML document in a native XML column (e.g. in DB2 pureXML).
So, any performance comparison of XML versus relational depends heavily on which data you choose for the comparison, and what type of operations you measure.
A large DB2 customer recently compared XML to relational performance because their business objects are currently mapped to 12 relational tables. Their application executes at least 12 SQL statements to retrieve all the relational data that comprises one of the logical business objects. Then the application reassembles the original business object. An alternative is to store these business objects as XML so that each object is stored as a single document. Instead of 12 tables, only 1 table with 1 XML column is then needed. In multi-user tests for data retrieval the the company found that the XML-based solution allows them to retrieve objects with 55% higher throughput than the existing relational SQL-based solution. The reasons for the performance benefit include fewer JDBC interactions between application and database as well as fewer distinct pages that need to be read when one logical business object is represented as one XML document (and not scattered over 12 tables). These tests were later repeated and verified at an IBM lab.
Another important considertion in the question of XML versus relational is the data format in which the data is produced and consumed outside the database. If the data is produced and/or consumed in XML format anyway, it is often better to also store the data as XML in the database.
So, the question “What is faster, XML or Relational?” is somewhat like asking “What is faster, a truck or a ship?”, because XML and relational are meant for different purposes, and either one can outperform the other depending on which use case you look at. And there are also use cases (with high schema complexity and schema variability over time) that cannot reasonably be implemented in a relational data model. (If you need to go to Hawaii, the boat always beats the truck!).
The beauty of a hybrid database system such as DB2 is that you can use both native XML and relational capabilitues side by side, in a tightly integrated manner. Some data is better representated in relational tables, other data is better represented in XML, and you can manage both in the same database or even the same table, and with the same APIs and utilities.


https://nativexmldatabase.com/2010/08/22/xml-versus-relational-database-performance/

domingo, 7 de maio de 2017

ADB DEBUGGING TOOL

Android Debugging Tool https://developer.android.com/studio/command-line/adb.html:

Adb shell wm overscan 0,42,0,20 (neste exemplo, reduz a tela em 42 px na parte de cima e 20 px na parte de baixo)

http://www.androidpit.com.br/forum/695499/sony-xperia-z3-problema-na-barra-superior-de-notificacoes/page/3

Para executar o comando acima, o android deve estar conectado a este computador anteriormente:

Enable adb debugging on your device
To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options.

On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom.

On some devices, the Developer options screen might be located or named differently.

You can now connect your device with USB. You can verify that your device is connected by executing adb devices from the android_sdk/platform-tools/ directory. If connected, you'll see the device name listed as a "device."

Note: When you connect a device running Android 4.2.2 or higher, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer. This security mechanism protects user devices because it ensures that USB debugging and other adb commands cannot be executed unless you're able to unlock the device and acknowledge the dialog.

For more information about connecting to a device over USB, read Run Apps on a Hardware Device. https://developer.android.com/studio/run/device.html

*** Overscan:

Allows adding margins to display for greater control over the screen – useful when trying to emulate small screen (phone) on a tablet.

adb shell wm overscan a,b,c,d
a -> left edge margin
b -> top edge margin
c -> right edge margin
d -> bottom edge margin


adb shell wm size reset -> reset overscan to original values
http://www.xanh.co.uk/control-device-display-with-wm/


Driver D6633 baixado de https://developer.sonymobile.com/downloads/drivers/xperia-z3-driver/
C:\$Tempdown\Xperia_Z3_driver\Xperia_Z3_driver

Adb baixado em C:\$Tempdown\platform-tools-latest-windows

segunda-feira, 1 de maio de 2017

Coisas

- Telegrama cobrado por página. Uma página tem aproximadamente 130 palavras.

- Lâmpadas com mais calor de cor é melhor. Luz branca não é bom para residência, mas sim para as empresas para melhorar a produtividade. O ideal são lâmpadas com 2700 K (kelvins)

sábado, 22 de abril de 2017

Saiba o significado das siglas e números da abertura de lentes de câmeras




por ADRIANO HAMAGUCHI
Para o TechTudo


Mesmo que não esteja informado na embalagem ou na câmera, toda lente possui uma abertura, e é através desta abertura que a imagem “chega ao sensor” que captura a foto ou o vídeo.

abertura-lentes-titulo-01A abertura da lente é indicada na própria lente ou na câmera (Foto: Adriano Hamaguchi/TechTudo)
A sistema de abertura de uma lente é controlado pela câmera, ou pelo anel da própria câmera. A câmera envia o comando e o sistema fecha ou abre o mecanismo que abre o orifício por onde a “imagem passa”.
abertura-lentes-sistema-aberturaA abertura de uma lente controla a quantidade de luz que chega até o sensor (Foto: Reprodução/Adriano Hamaguchi)
A maneira correta e completa de identificar uma determinada abertura, é com a letra “f”, o sinal “/” e um número, por exemplo, “f/22” ou “f/1.8“. Mas para simplificar, a abertura é indicada apenas pelo “número”, o “denominador”.
O curioso é que quanto maior o “número”, menor é a abertura. E quanto menor o número, maior é a abertura. Para ficar mais fácil memorizar este detalhe, considere que abertura é uma divisão: “1/X” (“1″ dividido por um valor “X“). Sendo assim, quanto maior o valor “X”, menor é o resultado desta fração.
Por exemplo, a abertura “f/2” é maior que a abertura “f/10“. Seguindo nosso esquema, “1/2 = 0,5″ e “1/10 = 0,1″, ou seja, “0,5 > 0,1″. Fácil? Confira o esquema ilustrado a seguir.
abertura-lentes-explicandoQuanto maior o "número", menor fica a abertura por onde a imagem passa pela lente e chega ao sensor da câmera (Foto: Adriano Hamaguchi/TechTudo)
A abertura nas lentes para câmeras DSLR
Em lentes fixas (lentes que não possuem “zoom”) das câmeras DSLR, há a indicação da abertura máxima. A abertura mínima geralmente não é informada, e pode chegar até a f/36.
Em lentes “zoom”, a abertura é indicada duas vezes (3.5-5.6). Uma indica a abertura máxima quando se está utilizando o “zoom mínimo”, e a outra é quando estamos utilizando o “zoom máximo”.
abertura-lentes-distancia-lentes-fixas-e-zoomAs informações sobre abertura estão descritas na própria lente (Foto: Adriano Hamaguchi/TechTudo)
Quando a abertura máxima é a mesma no “zoom” mínimo e máximo, a abertura é indicada apenas uma vez, como na lente “70-200 mm 1:4G ED”.
abertura-lentes-esquema-siglasLentes básicas "do kit" geralmente são as 18-55 mm e possuem aberturas máximas de 3.5 e 5.6 (Foto: Reprodução/Canon e Nikon)
As medidas da abertura são apenas os números que geralmente seguem a indicação “1:” (“1:3.5-5.6″, por exemplo). As medidas “70-200 mm”, “50 mm” ou “18-55 mm” são das distâncias focais (o “zoom”) e as demais letras e siglas que acompanham estes números são recursos extras (como sistemas de estabilização e foco automático silencioso, por exemplo).
Confira a matéria do TechTudo que explica o significado das siglas das lentes.
As lentes “zoom” mais acessíveis geralmente possuem aberturas máximas limitadas. Isto ocorre por uma série de fatores, e o principal deles, é o alto número de elementos óticos da lente, necessários para não deixar a imagem ficar distorcida quando alteramos o “zoom”.
Lentes com abertura máxima limitada, são chamadas de “lentes escuras”, e são indicadas para ambientes bem iluminados. E as lentes com abertura máxima grande são chamadas de lentes “claras” ou “rápidas”.
Algumas lentes possuem anel de abertura. Para alterar a abertura é necessário girar o anel até a posição desejada. A maioria das lentes não possuem este anel, assim a abertura é controlada através da câmera.
abertura-lentes-anel-aberturaAs lentes que não possuem anel de abertura têm sua abertura controlada pela própria câmera (Foto: Adriano Hamaguchi/TechTudo)
A abertura das lentes de câmeras compactas e smartphones
A abertura das lentes de câmeras compactas, super compactas e smartphones também são indicadas próximas às lentes.
Tratando-se de smartphones, a abertura geralmente é fixa. Isto significa que não é possível aumentar, nem diminui-la. Até câmeras de smartphones avançados como o Nokia Lumia 1020 e o iPhone 5S, possuem abertura fixa, equivalendo às aberturas F/2.0 ou F/2.2, aproximadamente.
abertura-lentes-super-compactas-smartphonesAbertura da lente das compactas que não oferecem modo "manual" é controlada pela câmera (Foto: Divulgação)
Para descobrir qual a abertura de lentes de câmeras ou smartphones que não informam nada sobre a abertura, será necessário consultar o manual.
Como alterar a abertura?
Para alterar a abertura numa câmera DSLR, selecione o modo “M” (manual) ou “A”/”Av” (Prioridade de Abertura).
No modo “manual”(M), para cada abertura é necessário configurar a sensibilidade e a velocidade para balancear a luminosidade.
No modo “Prioridade de Abertura”(A ou Av), você seleciona a abertura desejada (e a senbilidade ISO), e a câmera seleciona automaticamente uma velocidade que permita obter boas imagens.
abertura-lentes-alterando-aberturaNos modos "Manual" e "Prioridade de Abertura", é possível escolher a abertura da lente (Foto: Adriano Hamaguchi/TechTudo)
Em câmeras compactas e superzoom que oferecem o modo manual, a abertura é alterada no menu de configuração. As que não oferecem modo manual, a abertura é alterada automaticamente, de acordo com a cena escolhida.
Alguns modelos de câmeras compactas “avançadas” como a Canon Powershot G15 e a Nikon P310, além de oferecer o modo “manual” (M), também possuem lentes com grandes aberturas (F/1.8).
abertura-lentes-compactas-avancadasCâmeras compactas avançadas oferecem ajustes manuais de sensibilidade ISO, velocidade e abertura (Foto: Divulgação)
Em câmeras compactas e super compactas que não oferecem o modo manual, a abertura da lente é ajustada automaticamente pela câmera, de acordo com a situação e o modo de cena escolhido. Porém, fique atento às aberturas máximas.
A relação entre Abertura, Velocidade e Sensibilidade
A abertura tem uma relação estreita com a velocidade (do obturador) e a sensibilidade do sensor (ISO). Quando você prioriza uma destas medidas, as outras devem ser ajustadas para que a imagem não fique clara demais (superexposta) ou escura demais (subexposta).
abertura-lentes-triangulo-exposicaoEsquema mostra os efeitos obtidos com diferentes configurações da velocidade, abertura e ISO da câmera (Foto: Reprodução/Exposure Guide)
Cada situação exige uma configuração diferente. De acordo com o esquema acima, quando usamos uma abertura grande (f/2.8) diminuímos a distância que ficará focada, e quando usamos uma abertura pequena (f/16) aumentamos a distâncias que ficará focada.
abertura-lentes-aberturas-lente-50mmAs lentes "50 mm f/1.8" são consideradas lentes claras, ou rápidas, por possuírem grande abertura máxima (Foto: Adriano Hamaguchi/TechTudo)
A relação entre abertura e foco
Quanto maior a abertura da lente, menor será as distâncias focadas. Assim, quando você quiser produzir uma imagem com um fundo bem desfocado, utilize a maior abertura que sua lente permite.
Por outro lado, quando você deseja mostrar o máximo de objetos e distâncias bem focadas, utilize a menor abertura possível. Quanto menor a abertura, maior será a distância que estará em foco.
abertura-lentes-profundidade-ruaGrandes aberturas permitem captar imagens com fundo desfocado (Foto: Reprodução/Marcio Spaolonse)
O termo utilizado para identificar as “zonas focadas” é “profundidade de campo”. Dizemos que a profundidade de campo é pequena, quando a zona focada é pequena. E a profundidade de campo é grande, quando a zona focada é grande.
Desfocar o fundo é uma técnica utilizada para destacar ainda mais o objeto principal ou quando desejamos “omitir” o fundo. Desfocar o fundo é fácil quando usamos uma lente com abertura grande, basta abrir a abertura ao máximo.
Utilizando câmeras com abertura máxima limitada, como as compactas, conseguimos desfocar o fundo quando o objeto focado está mais próximo da câmera. Quando o objeto focado não está tão próximo da câmera, o “efeito de desfoque” fica menos evidente.
Com smartphones é mais difícil ainda desfocar o fundo. É preciso ficar bem próximo do objeto.
abertura-lentes-comparacao-smartphoneCom smartphones é mais difícil desfocar o fundo (Foto: Adriano Hamaguchi/TechTudo)
A relação entre abertura e iluminação
Se utilizarmos uma mesma configuração de sensibilidade (ISO), velocidade e distância focal (“zoom”), e alterarmos apenas a abertura, podemos notar que maiores aberturas geram imagens mais claras e menores aberturas geram imagens mais escuras.
abertura-lentes-50mm-coqueiroLentes "claras" ou "rápidas" são lentes que permitem fotografar com grandes aberturas (Foto: Adriano Hamaguchi/TechTudo)
A relação entre abertura e a velocidade
Quando utilizamos uma abertura grande, compensamos com uma alta velocidade para equilibrar a luminosidade da imagem. Isto significa que, quanto maior é a abertura, mais velocidade podemos atribuir ao obturador, nos possibilitando “congelar” a cena.
O oposto também acontece. Se utilizarmos uma abertura bem pequena, precisaremos diminuir a velocidade da foto, e assim captamos uma imagem “borrada pelo movimento”.
abertura-lentes-55mm-piscinaQuanto maior a abertura da lente, maior é a velocidade que podemos utilizar, permitindo "congelar" a cena (Foto: Adriano Hamaguchi/TechTudo)
As imagens acima foram captadas utilizando uma lente “18-55 mm 3.5/5.6″. Isto significa que a abertura máxima para a distância focal 55 mm (“zoom máximo”) é a “f/5.6″.
Não confunda abertura do diafragma com o ângulo da lente!
Lentes “grande angular” e “olho de peixe” enxergam quase 180º. Elas são indicadas, quando queremos captar tudo à nossa volta. Por outro lado, as lentes de longo alcance enxergam apenas uma porção de uma imagem, e servem para capturar imagens de objetos distantes, e isto não tem nada a ver com a “abertura do diafragma”.
abertura-lentes-distancia-focalO aumento da distância focal é o "zoom" ótico que conhecemos das câmeras compactas (Foto: Adriano Hamaguchi/TechTudo)
Quanto menor a distância focal, menor é o “zoom” e maior é o ângulo que a lente enxerga. Quanto maior a distância focal, maior é o “zoom” e menos é o ângulo que a lente enxerga.
abertura-lentes-anguloLentes são classificadas de acordo com o ângulo que conseguem "enxergar" (Foto: Adriano Hamaguchi/TechTudo)
Se fotografarmos um mesmo objeto com uma distância focal de 200 mm usando uma abertura e uma abertura pequena, por exemplo, e o “enquadramento” será o mesmo. O que muda é a profundidade de campo e as outras configurações da câmera que alteramos para compensar a iluminação, já que a quantidade de luz capturada será diferente.
abertura-lentes-distancia-fical-planosAs distâncias focadas serão mais extensas quando se usa aberturas menores (Foto: Reprodução/Marcio Spaolonse)
Confira nossas dicas sobre fotografia manual e saiba configurar a câmera corretamente na mais diversas condições e iluminação.
http://www.techtudo.com.br/dicas-e-tutoriais/noticia/2014/04/saiba-o-significado-das-siglas-e-numeros-da-abertura-de-lentes-de-cameras.html

Infográfico 'Fotografe Fácil'


O infográfico 'Fotografe Fácil' é um guia que traz todas as relações entre Exposição, Abertura, Velocidade do Obturador e ISO. Ele mostra o que acontece quando regulamos as máquinas fotográficas DSLR (profissionais) e quais efeitos acontecem quando selecionamos ou optamos por colocar as configurações das máquinas priorizando determinadas opções.

Este é um guia importante para o fotografo iniciante levar consigo para possíveis dúvidas que surjam durante seus primeiros exercícios. Clique na imagem a baixo para ampliar esta tabela e depois imprima para tirar suas dúvidas durante as aulas práticas e teóricas.


Fotografe Fácil - Infográfico: Exposição, Abertura do Diafragma, Velocidade do Obturador e ISO


Já este outro infográfico, abaixo, traz um guia rápido para realizar determinados efeitos nas fotografias à partir de câmeras fotográficas profissionais. Clique sobre ele para ver a imagem em tamanho maior.


Guia rápido para usar máquina fotográfica digital


http://www.natario.com/2015/10/infografico-fotografe-facil.html

quinta-feira, 13 de abril de 2017

Tire 7 dúvidas sobre a Quiropraxia

A Quiropraxia é um tratamento que detecta e corrige problemas na coluna vertebral. O quiropraxista usa as mãos para remover essas interferências por meio de ajustes na coluna, para que o corpo funcione de forma plena. A quiropraxia também atua de forma preventiva.

Vamos a 7 dúvidas que pacientes podem ter sobre essa ´tecnica:

1. Quiropraxia é massagem?

Não. Embora utilize as mãos para fazer "ajustes" no paciente, a quiropraxia é completamente diferente de uma sessão de massagem relaxante. Enquanto a massagem visa o relaxamento muscular, a quiropraxia corrigirá o desalinhamento da coluna e das articulações. Nem sempre as sessões são doloridas, mas você pode sair do consultório com aquela sensação de que fez um treino pesado na academia.

2. Para quais problemas a quiropraxia é indicada?

Os mais comuns são dor lombar, dor cervical, hérnia de disco, dor no nervo ciático, dor de cabeça, tendinite, contusão, torcicolo e incômodos articulares. Pessoas sem essas queixas também podem fazer a quiropraxia para manter a coluna em ordem, especialmente se já têm problemas de postura, passam o dia todo em frente ao computador ou vivem em constante tensão.

3. Quanto tempo dura uma sessão de quiropraxia?

A primeira é a mais demorada, dura cerca de uma hora. É quando o profissional avalia a história clínica do paciente, faz testes ortopédicos, neurológicos, avalia a postura e apalpa a coluna para traçar um plano de cuidado. As sessões seguintes não levam mais do que 15 a 20 minutos.


4.  Quanto tempo dura o tratamento?

O diagnóstico é individual, pode ser que você precise de apenas cinco sessões ou de 20. A frequência também varia com a gravidade do problema. Pessoas com muita dor podem fazer sessões diárias até o problema aliviar e, depois, diminuir a frequência. Quando a desordem está controlada, é recomendado manter sessões mensais. É como uma atividade física, você tem que fazer sempre para conservar a saúde.

5. Quem não pode fazer quiropraxia?

Cabe ao profissional avaliar cada pessoa. No entanto, pacientes com câncer, osteoporose, artéria calcificada ou com histórico de cirurgia na coluna normalmente não podem ser manipulados por quiropraxistas.

6. Como encontrar um bom quiropraxista?

A quiropraxia é uma profissão e não uma especialização. O profissional precisa ter feito graduação para poder atuar na área. No Brasil, apenas a Universidade Anhembi-Morumbi, em São Paulo, e a Universidade Feevale, em Novo Hamburgo (RS), oferecem o curso. Essas instituições também são conveniadas com instituições dos Estados Unidos. No site da Associação Brasileira de Quiropraxia você pode acessar a lista de profissionais associados e buscar por município um que esteja perto de você.

7. Como não se enganar?

Se você não encontrou o nome do profissional no site da ABQ, pergunte na consulta onde ele se formou. Desconfie se ele não fizer uma minuciosa avaliação antes de iniciar o procedimento. Caso o profissional tenha duas titulações, como fisioterapeuta ou educador físico, além de quiropraxista, pergunte onde ele concluiu a faculdade de quiropraxia.

http://www.facafisioterapia.net/2016/11/tire-7-duvidas-sobre-quiropraxia.html