<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5961337748639548528</id><updated>2024-09-01T07:25:04.040-03:00</updated><category term="C#"/><category term="Pesquisas"/><category term="Android"/><category term="Javascript"/><category term="SQL Server"/><category term="Delphi"/><category term="JQuery"/><category term="Livros"/><category term="VS2008"/><title type='text'>Tudo que é Interessante</title><subtitle type='html'>Dicas de linguagens de programação,banco de dados e informática no geral.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-8363203402463442928</id><published>2012-08-29T12:38:00.000-03:00</published><updated>2012-08-29T12:38:03.508-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pesquisas"/><title type='text'>Técnicas de Levantamento de Requisitos</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;O levantamento de requisitos é a parte mais fundamental no desenvolvimento de sistemas e também a mais complexa. Estudos mostram que um levantamento de requisito mal elaborado leva a sistemas que não atendem ao usuário, são descontinuados, seus custos excedem o planejado e a vezes não entram nem em produção.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;O importante no levantamento de requisitos é entender a necessidade dos clientes e seus objetivos, apesar de muitas vezes nem mesmo o cliente saber exatamente o que ele necessita, por isso cabe &amp;nbsp;ao analista tentar entender o máximo possível do negócio, mapear o máximo possível de processos e as pessoas envolvidas.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Para nos ajudar neste passo podemos utilizar algumas técnicas que tem como objetivo superar as dificuldades que poderemos encontrar. Não existe uma técnica que seja a melhor e nem a pior, será necessário avaliar a situação e determinar qual melhor se encaixa, também não é obrigatório uso de apenas uma, dependendo da situação podemos utilizar de varias abordagem para chegar no melhor resultado.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Abaixo segue um resumo das principais técnicas que podemos utilizar:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Levantamento Orientado a Ponto de Vista&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Qualquer sistema, independente do seu tamanho, existirão pessoas com pontos de vista diferentes em relação ao seu funcionamento, necessidades e objetivos. Esta técnica tem como objetivo capitar estes pontos de vista, analisar as diferenças e similaridades formando assim o requisitos do sistema.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Para facilitar essa técnica foi criado uma Framework chamada VORD (View point Oriented Requirements Definition - Definição de Requisitos Orientado a Ponto de Vista). A primeira etapa dessa framework é o levantamento dos pontos de vista, segunda parte a estruturação dos pontos de vista seguindo uma hierarquia e depois o refinamento dos pontos de vista e a criação da documentação.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Etnografia&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;É uma técnica de observação que pode ser utilizada para entender a organização, sua cultura e o objetivo que o sistema deve alcançar. O objetivo do analista nesta técnica, é imergir no ambiente de trabalho, observar e fazer anotações do ambiente onde o sistema será usado, descobrindo os requisitos do sistema da maneira que as pessoas realmente trabalham.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;As desvantagens dessa técnica é o excessivo consumo de tempo e a indução do analista a erros na sua observação, porem é uma técnica muito utilizada para completar as demais.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Workshops&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;São reuniões com os analistas e uma seleção de pessoas que melhor representam a organização e o contexto do sistema. Nessas reuniões deve haver uma pessoa neutra para conduzir e promover as discussões, o trabalho em equipe e o mapeamento dos processos para facilitar as tomadas de decisões.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;O importante nessa técnica é a postura da pessoa que vai conduzir a reunião, pois ela deve ser neutra e boa observadora, evitando influenciar nas tomadas de decisão tanto por parte dos analista quanto das pessoas envolvidas.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Prototipagem&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;A prototipação é a criação de partes do sistemas, visando facilitar para os usuários a validação dos requisitos do sistema, o importante do prototipo é que ele não tenha todos os requisitos implantados para que não se torne a versão definitiva.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Essa técnica é muito útil para testes de interface do usuário, testes de desempenho, ajudar na compreensão e viabilidade dos requisitos, ajudando a reduzir os custos do desenvolvimento do sistema.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Entrevistas&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Entrevistas é uma das técnicas mais utilizadas no levantamento de requisitos, consiste de uma reunião do entrevistador (analista) com as pessoas envolvidas nos sistemas, se possível uma pessoa por vez. Essas entrevistas devem ter duração de no máximo uma hora, pois mais que isto leva o entrevistado a perder a concentração dificultando o levantamento de informações, também é importante que o entrevistador se integre com as funções e a rotina do entrevistado para ajudar na elaboração das questões.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Nas entrevistas podemos utilizar questões objetivas como : “Quantos tipos de produtos é vendido no seu setor ?” ou perguntas subjetivas como : “O que você acha do modelo atual ?”. As perguntas objetivas tem a vantagem de ir direto ao assunto, porem pode deixar o entrevistado entediado já as questões subjetivas tem como grande atrativo as riquezas nos detalhes e ajuda na elaboração de novas perguntas, mas pode levar a perda do controle da entrevista e a uma grande massa de dados irrelevantes.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Questionários&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;São formulários com questões que podem ser de múltipla escolha, lista de opções e &amp;nbsp;questões de reposta livre. O importante num questionário é que as questões sejam claras e de fácil entendimento procurando usar sempre o vocabulário costumeiro dos usuários e que as questões reflitam o que os analistas estão procurando.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Questionários são utilizados principalmente quanto as pessoas envolvidas no contexto do sistemas estão longe ou é&amp;nbsp;difícil&amp;nbsp;encontra-las pessoalmente, e também quanto precisamos de um levantamento estatístico sobre o assunto.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Brainstorming (Tempestade de Ideias)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Consiste em varias reuniões com as pessoas envolvidas onde elas são estimuladas a darem ideias o tempo todo. Nessa técnica uma pessoa é selecionada para registrar todas as ideias em um quadro ou numa folha de papel para que todas as pessoas possam ver o que foi sugerido, para que no final seja feito um consenso e os requisitos para o desenvolvimento do sistema.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;b&gt;JAD (Joint Application Design)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;JAD é uma técnica baseada em quatro princípios : dinâmica de grupo, uso de técnicas visuais, manutenção do processo organizado e racional (analise top down) e utilização de documentação padrão.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Dos quatro princípios temos duas fases principais que são: o planejamento que tem como objetivo o levantamento de requisitos e o desenvolvimento do sistema. Essas duas fases são subdivididas em três fases: adaptação (preparação da equipe para o projeto, reconhecimento do ambiente), sessão (nesta fase são realizados encontros para efetuar o levantamento dos requisitos) e finalização (definir de forma formal o que foi definido nos encontros).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Nesta técnica temos alguns papéis bem definidos que são: o líder de sessão (é o responsável e o facilitador dos encontros), engenheiro de requisitos (responsável pela produção da documentação), executor (responsável pela construção do sistema), representantes dos usuários (pessoas que irão utilizar o sistema), especialistas (pessoas que possuem conhecimentos específicos em alguns tópicos).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Está é uma técnica que funciona muito bem em projetos pequenos e médios, para projetos grandes deve ser usado varias sessões JAD.&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Investigação&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Em algumas situações teremos dificuldades em obter informações utilizando outras técnicas como entrevista ou questionários, sendo necessário a análise de documentos da empresa e seu histórico para obter dados relevantes para o levantamento de requisitos.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Está é uma técnica, que em algumas situações, pode levar muito tempo, devemos utiliza-la apenas em ultimo caso.&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Referências:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.devmedia.com.br/artigo-engenharia-de-software-2-tecnicas-para-levantamento-de-requisitos/9151&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Artigo Engenharia de Software 2 - Técnicas para levantamento de Requisitos (Artigo da Revista Engenharia de Software edição 2)&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.pedrofcarvalho.com.br/PDF/ENGENHARIA_ANALISE_LEVANTAMENTO_REQUSITOS_2.pdf&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Técnicas de Levantamento de Requisitos (Pedro F. Carvalho e Analista de Sistemas)&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Joint_application_&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Joint application design (Wikipedia)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.ice.edu.br/TNX/storage/webdisco/2011/03/11/outros/7799b4179c3e64b7f8ab3ec4cfdbea22.pdf&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Levantamento de Requisitos (Leandro Cícero da Silva Mello e Prof. Jeanine Ferrazza Meyer)&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/8363203402463442928/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/08/tecnicas-de-levantamento-de-requisitos.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/8363203402463442928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/8363203402463442928'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/08/tecnicas-de-levantamento-de-requisitos.html' title='Técnicas de Levantamento de Requisitos'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-7907411518985230394</id><published>2012-07-23T14:38:00.002-03:00</published><updated>2012-07-23T14:38:57.769-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pesquisas"/><title type='text'>CrowdTest</title><content type='html'>&lt;b id=&quot;internal-source-marker_0.4705388410948217&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CrowdTest é um modelo derivado do Crowdsourcing, neste modelo é feito uso da inteligência e dos conhecimentos de canditatos para testar software’s. &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;O funcionamento é simples, uma empresa tem um software que precisa ser testado, ela contrata uma empresa que oferece o serviço de CrowdTest, a empresa contratada por sua vez convoca as pessoas cadastradas para fazer os testes conforme os requisitos que a empresa criadora do sistema necessita, os candidatos efetuam os testes conforme os requisitos e cada erro encontrado eles reportam para a empresa que os recrutou, a empresa valida os erros e fornece para a empresa contratante os detalhes sobre os erros encontrados. Os testadores geralmente são remunerados por erros encontrados.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Este tipo de serviço pode ser utilizado para todos os tipos de software’s (web, desktop, dispositivos móveis, etc...) é considerado uma mão de obra barata e com um bom retorno, sendo considerada uma boa alternativa para testes mais amplos de um sistema.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Referências:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;http://pt.wikipedia.org/wiki/Crowdsourcing&quot; target=&quot;_blank&quot;&gt;Crowdsourcing&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.base2.com.br/solucoes/servicos/crowd-test/&quot; target=&quot;_blank&quot;&gt;CrowdTest&lt;/a&gt;&lt;/b&gt;&lt;div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;http://blog.crowdtest.me/crowdtest-sobre/como-funciona/&quot; target=&quot;_blank&quot;&gt;CrowdTeste Como Funciona ?&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://engtesteagil.blogspot.com.br/2011/02/como-funciona-o-crowdtest.html&quot; target=&quot;_blank&quot;&gt;Teste de Software e Métodos Ágeis - Como Funciona CrowdTest&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://br.wwwhatsnew.com/2011/08/crowdtest-contrata-internautas-para-testarem-aplicativos-web-moveis-e-desktop/&quot; target=&quot;_blank&quot;&gt;CrowdTest – Contrata internautas para testarem aplicativos web, móveis e desktop&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;http://revistapegn.globo.com/Revista/Common/0,,EMI256852-17180-4,00-NEGOCIOS+DIGITAIS+COM+ALTO+POTENCIAL+DE+CRESCIMENTO.html&quot; target=&quot;_blank&quot;&gt;Negócios digitais com alto potencial de crescimento&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://info.abril.com.br/noticias/internet/crowdsourcing-pode-mudar-forma-de-consumo-18102011-8.shl?3&quot; target=&quot;_blank&quot;&gt;Crowdsourcing pode mudar forma de consumo&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/7907411518985230394/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/07/crowdtest.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7907411518985230394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7907411518985230394'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/07/crowdtest.html' title='CrowdTest'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-7449709967988278910</id><published>2012-06-12T13:32:00.002-03:00</published><updated>2014-11-26T10:14:21.983-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pesquisas"/><title type='text'>Tercerização na Área de TI</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: 19px;&quot;&gt;    &lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;A terceirização, hoje chamada de &lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-style: italic; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Outsourcing&lt;/span&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, é uma ferramenta que está sendo muito &amp;nbsp;utilizada pelas empresas na tentativa de minimizar os seus custos (muitas vezes transformando um custo fixo em variável) e aumentar o seu foco, concentrando esforços na sua atividade fim.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Arial; text-align: -webkit-auto; white-space: pre;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;Quase toda a área de TI pode ser terceirizada(é uma das areás preferida para terceirizar), desde servidores, serviços de impressão e desenvolvimento de sistemas, etc.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: center;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: 19px;&quot;&gt;    &lt;/span&gt; &lt;/span&gt;As vantagens de terceirizar a área de TI inclui &amp;nbsp;além da redução dos custos no geral, aumenta a velocidade na modernização &amp;nbsp;de &amp;nbsp;equipamentos e sistemas, evita problemas &amp;nbsp;com treinamento &amp;nbsp;e atualizações &amp;nbsp;dos profissionais, aumento de produtividade , acesso &lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-style: italic; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;ao &amp;nbsp;know-h&lt;/span&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-style: italic; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;w&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;da empresa contratada, &amp;nbsp;ferramentas para controle de produção, etc.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;A terceirização também traz algumas desvantagem como : dependência excessiva do fornecedor, perda da identidade dos funcionários com a empresa, para empresas que já estão em funcionamento pode-se gerar gastos com demissões de funcionários.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Entre vantagens e desvantagens, a terceirização não é algo unanime entre os profissionais de TI, pois existem casos de sucesso, como também inúmeros casos de fracassos.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;É preciso analisar com cuidado a terceirização, pois é preciso uma mudança cultural na empresa, o gestor que ira cuidar desse processo deve ficar atento, pesquisar bem a empresa que será utilizada no processo, definir bem os níveis de SLA’s para evitar problemas futuros. Nos processos de terceirização de sistemas um dos principais problemas é o controle dos fontes, pois em caso de troca da empresa prestadora de serviço a obtenção dos fontes atualizados é de fundamental importância para a continuidade do sistema.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: xx-small;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;Referências:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: xx-small;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://www.sisnema.com.br/Materias/idmat018276.htm&quot; target=&quot;_blank&quot;&gt;Vantagens da terceirização na área de TI&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: xx-small;&quot;&gt;&lt;a href=&quot;http://idgnow.uol.com.br/mercado/2010/08/17/terceirizacao-de-ti-ira-desaparecer-diz-analista/#&amp;amp;panel2-1&quot; target=&quot;_blank&quot;&gt;Terceirização de TI irá desaparecer, diz analista&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;a href=&quot;http://www.timaster.com.br/revista/artigos/main_artigo.asp?codigo=924&quot; target=&quot;_blank&quot;&gt;Terceirização em TI: Para onde vai ?&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;a href=&quot;http://pt.scribd.com/doc/24502856/Terceirizacao-em-TI&quot; target=&quot;_blank&quot;&gt;Terceirização em TI&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;a href=&quot;http://www.baguete.com.br/artigos/273/miguel-ruiz/15/06/2007/vantagens-da-terceirizacao-da-ti&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Vantagens da terceirização da TI&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.26748541346751153&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;(todos os sites acessados em 08 de fevereiro de 2012)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 19px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;
&lt;b style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 19px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;
&lt;b style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; font-weight: normal; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 19px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b id=&quot;internal-source-marker_0.2318278723396361&quot; style=&quot;font-weight: normal; text-align: -webkit-auto;&quot;&gt;
&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/7449709967988278910/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/06/tercerizacao-na-area-de-ti.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7449709967988278910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7449709967988278910'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/06/tercerizacao-na-area-de-ti.html' title='Tercerização na Área de TI'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-6625208100331045960</id><published>2012-05-21T12:52:00.000-03:00</published><updated>2012-05-22T21:27:48.724-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pesquisas"/><title type='text'>Evolução da Internet: da DARPANET à Internet Atual</title><content type='html'>&lt;b id=&quot;internal-source-marker_0.13832700322382152&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.13832700322382152&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;Neste resumo pretendo colocar os pontos mais importantes, na minha opinião, sobre a evolução da Internet. &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b id=&quot;internal-source-marker_0.13832700322382152&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.13832700322382152&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;O primeiro ponto foi os artigos escrito por J.C.R. Licklider( ou Lick) , foi um dos pioneiros a descrever uma rede de computadores interligadas acessando programas e dados em qualquer lugar. O conceito descrito por ele em 1962 lembra e muito o que é a Internet hoje.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b id=&quot;internal-source-marker_0.13832700322382152&quot;&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.13832700322382152&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;Outro passo que impulsionou a Internet foi a teoria de Leonard Kleinrock sobre a troca de pacotes ao invés da utilização da comutação de circuitos, teoria esta comprovada e colocada em prática em 1965 quando dois computadores se conectaram através de uma linha de baixa velocidade, sendo este experimento a primeira rede de computadores.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b id=&quot;internal-source-marker_0.13832700322382152&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;          &lt;/span&gt;Esses passos deram impulsos para a realização de diversos estudos, pesquisas, desenvolvimentos de novas tecnologias para interligar os computadores, posso mencionar aqui exemplos que são a criação da ARPA em 1968, a DARPA em 1975 organização militar que tinha como um dos objetivos manter os principais e estratégicos pontos em comunicação caso houvesse uma guerra nuclear, com este objetivo fizeram grandes avanços um deles foi o protocolo TCP/IP. &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;O protocolo TCP/IP foi criado em 1973 por Robert Kahn e Vint Cerf, Robert Kahn criou os conceitos de como deveria ser uma rede, esses conceitos foram :&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;ul style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;li style=&quot;font-family: Arial; font-size: 16px; font-style: italic; font-weight: normal; list-style-type: circle; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline; white-space: pre-wrap;&quot;&gt;cada rede distinta deveria ser independente e mudanças internas não deveriam ser requisitadas para conectá-las à Internet;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;font-family: Arial; font-size: 16px; font-style: italic; font-weight: normal; list-style-type: circle; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline; white-space: pre-wrap;&quot;&gt;comunicações seriam na base do melhor esforço. Se um pacote não chegasse à sua destinação final, ele seria retransmitido da fonte;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;font-family: Arial; font-size: 16px; font-style: italic; font-weight: normal; list-style-type: circle; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline; white-space: pre-wrap;&quot;&gt;caixas pretas seriam usadas para conectar as redes. Mais tarde elas seriam chamadas gateways e roteadores. Os gateways não reteriam informações sobre os fluxos de pacotes passantes. Isso assegurou que eles se mantivessem simples, evitando adaptações complicadas e recuperações de erros;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;font-family: Arial; font-size: 16px; font-style: italic; font-weight: normal; list-style-type: circle; vertical-align: baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline; white-space: pre-wrap;&quot;&gt;não haveria controle global no nível operacional.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-style: italic; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;Com estes conceitos ele chamou Vint Cerf e os dois criaram o segundo alicerce da internet, depois da comutação por pacotes.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;Em 1980 as redes de computadores começaram a sua grande escalada e com isso dando inicio a Internet como ela é hoje, nessa década posso destacar a liberação do protocolo TCP/IP em 1983 pela DARPA, o que veio facilitar a integração dessa redes que a principio foram as redes das universidades, depois foram criados backbones, que permitiram a união das redes comerciais em todo o mundo assim formando a Internet.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;Até agora eu mencionei apenas protocolos e hardware, mas o que realmente impulsionou a Internet foram os serviços de rede, podemos destacar dois que eu considero chave o e-mail e o http. &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;           &lt;/span&gt;O e-mail foi criado por Ray Tomlinson em 1971 e é até hoje é o serviço mais utilizado na Internet. Ele é um grande facilitador da vida moderna, diminuindo a distância e aumentando a produtividade.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;O outro serviço, o http, é utilizado para distribuição de conteúdo e teve a sua melhor especificação em 1999 dando origem para o HTTP 1/1, junto com a linguagem HTML permitiu a distribuição de documentos contribuindo para a disseminação de conteúdo.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Hoje o futuro da Internet está nos aplicativos, com a velocidade dos links cada vez mais altas , os computadores cada dia mais potentes e acessíveis, as ferramentas de desenvolvimento cada dia mais sofisticada e fáceis de desenvolver, estamos vivendo uma nova revolução definida por Tim O&#39;Reilly como WEB 2.0 descrita por ele da seguinte maneira:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-style: italic; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;... é a mudança para uma “nova” Internet como plataforma, e o entendimento das regras para obter o sucesso nesse novo ambiente. Uma das regras mais importantes é desenvolver aplicativos que aproveitem os efeitos da grande rede, tornando-os melhores, e à medida que mais pessoas os utilizem, aproveita-se daInteligência Coletiva&quot; &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-style: italic; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Outro ponto são os dispositivos móveis que estão cada dia mais potentes e acessíveis mantendo o usuário conectado a Internet &amp;nbsp;em qualquer lugar a qualquer momento.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Referências:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.aisa.com.br/historia.html&quot; target=&quot;_blank&quot;&gt;AISA - Historia da Internet&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/J._C._R._Licklider&quot; target=&quot;_blank&quot;&gt;Wikipedia J.C.R. Licklider&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://www.lk.cs.ucla.edu/index.html&quot; target=&quot;_blank&quot;&gt;Leonard Kleinrock&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://pt.wikipedia.org/wiki/Defense_Advanced_Research_Projects_Agency&quot; target=&quot;_blank&quot;&gt;DARPA&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pt.wikipedia.org/wiki/Vint_Cerf&quot; target=&quot;_blank&quot;&gt;Vint Cerf&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pt.wikipedia.org/wiki/Robert_Kahn&quot; target=&quot;_blank&quot;&gt;Robert Kahn&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pt.wikipedia.org/wiki/Hypertext_Transfer_Protocol&quot; target=&quot;_blank&quot;&gt;HTTP&lt;/a&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Apostila FUNDAMENTOS de SISTEMAS de INFORMAÇÃO(2007) - Ms. Carlos Valente&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial; font-size: 16px; font-weight: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Apostila METODOLOGIA DA PESQUISA CIENTÍFICA(2011) - Dr. JAIME ROY DOXSEY&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/6625208100331045960/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/05/evolucao-da-internet-da-darpanet.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/6625208100331045960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/6625208100331045960'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/05/evolucao-da-internet-da-darpanet.html' title='Evolução da Internet: da DARPANET à Internet Atual'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-5718205722931346536</id><published>2012-01-25T14:48:00.002-02:00</published><updated>2020-10-10T19:53:05.510-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Manipulando HTML  com a Classe HtmlGenericControl e o Comando FindControl</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; As vezes precisamos manipular o HTML para adicionar novas funções ou alterar o layout criado, neste post pretendo mostrar uma forma de se fazer isto.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; O comando &lt;b&gt;FindControl&lt;/b&gt; é utilizado para localizar um controle, para que este comando funcione em projetos WEB precisamos no ASP.Net definir um &lt;b&gt;ID&lt;/b&gt; e colocar o atributo &lt;b&gt;runat=”server”&lt;/b&gt; conforme os exemplos abaixo:&lt;/div&gt;
&lt;pre&gt;&lt;code&gt; class=&quot;xml&quot;&gt;&amp;lt;!-- runat=&quot;server&quot; em uma div --&amp;gt;
&amp;lt;div class=&quot;menu&quot; id=&quot;divMenu&quot; runat=&quot;server&quot;&amp;gt;

&amp;lt;!-- runat=&quot;server&quot; no body, repare que eu adicionei o atributo ID ao body --&amp;gt;
&amp;lt;body runat=&quot;server&quot; id=&quot;body&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; O atributo &lt;b&gt;runat=”server”&lt;/b&gt; pode ser adicionado em qualquer parte do HTML, este atributo server para informar que o controle (TAG HTML) vai ficar disponível no código do lado do servidor.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Feito isso segue alguns exemplo do uso do comando &lt;b&gt;FindControl&lt;/b&gt; :
&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;// Pegando um controle ul 
HtmlGenericControl ulPrincipal = (HtmlGenericControl)FindControl(&quot;ulPrincipal&quot;);

// Pegando o body da página (o body deve conter o atributo ID e o atributo runat=&quot;server&quot;, conforme mencionado acima) 
HtmlGenericControl pgBody = (HtmlGenericControl)FindControl(&quot;body&quot;);

&lt;/code&gt;&lt;/pre&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Como a proposta deste artigo é a manipulação de controles HTML verifique que eu converti o controle localizado para a classe &lt;b&gt;HtmlGenericControl&lt;/b&gt;, está classe vai nos ajudar a manipular os atributos do controle HTML, abaixo segue alguns exemplos de atributos que podemos manipular:&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;// Adicionando uma classe CSS
liLinhaF.Attributes.Add(&quot;class&quot;, &quot;linha-menu&quot;);

// Adicionando um titulo, o conteúdo e o link de um controle a
aHref.Attributes.Add(&quot;title&quot;, &quot;Titulo&quot;); // Titulo
aHref.Attributes.Add(&quot;href&quot;, &quot;link&quot;); // link
aHref.InnerText = &quot;Conteudo&quot; // Conteúdo 

// Adicionando código HTML ao controle
liLinha.InnerHtml = &quot;&amp;nbsp;&quot;;

// Adicionando o evento onload ao body da página
pgBody.Attributes.Add(&quot;onload&quot;, &quot;javascript:alert(\&#39;teste !\&#39;)&quot;);

// Manipulando o estilo de um controle HTML
lu.Style.Add(&quot;display&quot;, &quot;none&quot;);
lu.Style.Add(&quot;visibility&quot;, &quot;hidden&quot;);
&lt;/code&gt;&lt;/pre&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Além de manipular atributos também podemos adicionar outros controles dentro de outros controles (caso você tenha uma div ou table):&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;HtmlGenericControl ulPrincipal = (HtmlGenericControl)FindControl(&quot;ulPrincipal&quot;);
HtmlGenericControl liLinha = new HtmlGenericControl(&quot;li&quot;);
liLinha.Attributes.Add(&quot;class&quot;, &quot;linha-menu&quot;);
liLinha.InnerHtml = &quot;&amp;lt;B&amp;gt;Teste&amp;lt;/B&amp;gt;&quot;;
ulPrincipal.Controls.Add(liLinha);
&lt;/code&gt;&lt;/pre&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Com o comando &lt;b&gt;FindControl&lt;/b&gt; e a classe &lt;b&gt;HtmlGenericControl&lt;/b&gt; fica muito fácil a manipulação do HTML do lado do servidor.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Referências:&lt;/span&gt; &lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/pt-br/library/486wc64h.aspx&quot; target=&quot;_blank&quot;&gt;Método Control.FindControl (String)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/pt-br/library/system.web.ui.htmlcontrols.htmlgenericcontrol.aspx&quot; target=&quot;_blank&quot;&gt;Classe HtmlGenericControl&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linhadecodigo.com.br/artigoimpressao.aspx?id=2116&quot; target=&quot;_blank&quot;&gt;Curso ASP.NET 3.5 em VB.NET e C# - Controles(Fernando Amaral)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/1763211/apply-css-for-an-html-generic-control-like-ul-and-li-in-asp-net&quot; target=&quot;_blank&quot;&gt;Apply CSS for an HTML generic control like &lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1763211/apply-css-for-an-html-generic-control-like-ul-and-li-in-asp-net&quot; target=&quot;_blank&quot;&gt; and &lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1763211/apply-css-for-an-html-generic-control-like-ul-and-li-in-asp-net&quot; target=&quot;_blank&quot;&gt; in ASP.NET&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/5718205722931346536/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/01/manipulando-html-com-classe.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/5718205722931346536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/5718205722931346536'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/01/manipulando-html-com-classe.html' title='Manipulando HTML  com a Classe HtmlGenericControl e o Comando FindControl'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-4644893787114692781</id><published>2012-01-15T00:30:00.001-02:00</published><updated>2014-11-26T10:04:55.760-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="VS2008"/><title type='text'>Configurando o JQuery no Visual Studio 2008</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; O JQuery, na minha opinião, é uma das melhores bibliotecas em Javascript, facilitando muita a vida do desenvolvedor, neste artigo vou mostrar como fazer a integração do JQuery ao Visual Studio 2008 para que o intelisense funcione, já que tive algumas dificuldades nesta integração.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Primeiro verifique se o seu Visual Studio 2008 está&amp;nbsp; com o SP1 instalado.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Segue o link se você precisar baixar o SP1 do Visual Studio 2008 (a instalação deste pacote é lenta, não estranhe):&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;http://www.microsoft.com/download/en/details.aspx?id=10986&quot; target=&quot;_blank&quot;&gt;Download do SP1 do Visual Studio 2008&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Depois vamos aplicar o hotfix para o Visual Studio interpretar a documentação de bibliotecas escritas em Javascript (-vsdoc.js), o endereço para fazer o download do hotfix é : &lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;http://archive.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736&quot; target=&quot;_blank&quot;&gt;Hotfix para interpretação de arquivos -vsdoc.js&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Baixe os arquivos do JQuery: &lt;b&gt;jquery-1.3.2-vsdoc2.js&lt;/b&gt; e &lt;b&gt;jquery-1.3.2.js&lt;/b&gt; (está é a versão que eu usei neste artigo), no endereço &lt;a href=&quot;http://code.google.com/p/jqueryjs/downloads/list&quot; target=&quot;_blank&quot;&gt;http://code.google.com/p/jqueryjs/downloads/list&lt;/a&gt;. Retire do nome do arquivo de documentação o numero dois ele deve ficar com o seguinte nome &lt;b&gt;jquery-1.3.2-vsdoc.js (é importante renomear este arquivo, porque o Visual Studio só interpreta arquivos de documentação se ele tiver no final do nome a sequencia &quot;-vsdoc.js&quot;).&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Depois de feito o download dos arquivos e aplicado o hotfix, vamos testar o Visual Studio 2008, crie um projeto WEB, depois crie uma pasta chamada scripts (não é obrigatório, mas fica mais organizado), insira neste diretório os dois arquivos do JQuery , arraste ou insira a referência ao arquivo que contem as funções (&lt;b&gt;jquery-1.3.2.js&lt;/b&gt;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Crie uma sessão Javascript e digite &lt;b&gt;$(&lt;/b&gt; e veja o intelisense funcionando !&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Referências:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.macoratti.net/09/04/asp_jqry.htm&quot; target=&quot;_blank&quot;&gt;Macoratti - ASP .NET - Apresentando JQuery - &#39;Escreva menos faça mais&#39;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://jquery.com/&quot; target=&quot;_blank&quot;&gt;JQuery (Site oficial)&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://jberke.blogspot.com/2009/06/jquery-132-intellisense-in-visual.html&quot; target=&quot;_blank&quot;&gt;Berke - Jquery 1.3.2 &amp;amp; Intellisense in Visual Studio 2008 &lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/4644893787114692781/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/01/configurando-o-jquery-no-visual-studio.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/4644893787114692781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/4644893787114692781'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2012/01/configurando-o-jquery-no-visual-studio.html' title='Configurando o JQuery no Visual Studio 2008'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-5864076289305677088</id><published>2011-11-29T16:09:00.002-02:00</published><updated>2020-10-10T19:49:54.895-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Alimentando DataGrid WPF Dinamicamente com C#</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Muitas
vezes precisamos alimentar um &lt;b&gt;DataGrid&lt;/b&gt; dinamicamente, com o &lt;b&gt;&lt;i&gt;WPF&lt;/i&gt;&lt;/b&gt; está tarefa
ficou bem fácil, vamos ao exemplo.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Iremos
criar um programa para exibir o alfabeto em maiúsculo , um contador e o código
ASCII da letra dentro de um &lt;b&gt;DataGrid&lt;/b&gt; assim que o usuário pressionar o botão.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vamos
inserir um botão e um &lt;b&gt;DataGrid&lt;/b&gt;, como o intuito aqui é alimentar dinamicamente o
&lt;b&gt;DataGrid&lt;/b&gt;, vamos alterar a propriedade &lt;b&gt;AutoGenerateColumns&lt;/b&gt;&amp;nbsp; para true dentro do &lt;b&gt;XAML&lt;/b&gt; , assim o &lt;b&gt;DataGrid&lt;/b&gt;
vai gerar as colunas para nós, abaixo segue como o código deve ficar :&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;pre&gt;&lt;code class=&quot;xml&quot;&gt;&amp;lt;my:datagrid autogeneratecolumns=&quot;true&quot; margin=&quot;12,42,12,20&quot; name=&quot;dataGrid1&quot; xmlns:my=&quot;clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit&quot;&amp;gt; &amp;lt;/my:datagrid&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No
código vamos criar uma simples classe apenas com os atributos, segue o código:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class LetraNumero
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int Posicao { get; set; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public char Letra { get; set; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int ASCII { get; set; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Segue o
código do evento &lt;b&gt;Click&lt;/b&gt; do botão :&lt;/div&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void button1_Click(object sender, RoutedEventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Cria lista para os objetos (está lista tem que ser do tipo Generic)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;letranumero&amp;gt; lista = new List&amp;lt;letranumero&amp;gt;();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Rotina para alimentar a lista
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 1; i &amp;lt; 27; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LetraNumero item = new LetraNumero();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item.Posicao = i;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item.Letra = Convert.ToChar(64 + i);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item.ASCII = 64 + i;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lista.Add(item);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Vinculando a lista ao grid
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataGrid1.ItemsSource = lista; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A
propriedade &lt;b&gt;ItemsSource&lt;/b&gt; do &lt;b&gt;DataGrid&lt;/b&gt; aceita uma lista do tipo &lt;b&gt;Generic&lt;/b&gt; e como a
propriedade &lt;b&gt;AutoGenerateColumns&lt;/b&gt; está como true, ele vai criar uma coluna para
cada atributo da classe definida na lista. Abaixo segue o exemplo da tela em
execução:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ9H7Zbqd4OX8PyqEVGJokLSImmP8HG4nW-tNtL7VZWn4zXw959TFGgB4yjKZTEbLivfW0-eVjyrWsyOSJMlyTXBzZWheOe4m2I3cZKeGK4RbXMN9L7QaIRB44QPW5rhmQQrO-FMZYpn-O/s1600/DataGridLista.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ9H7Zbqd4OX8PyqEVGJokLSImmP8HG4nW-tNtL7VZWn4zXw959TFGgB4yjKZTEbLivfW0-eVjyrWsyOSJMlyTXBzZWheOe4m2I3cZKeGK4RbXMN9L7QaIRB44QPW5rhmQQrO-FMZYpn-O/s1600/DataGridLista.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Se for
preciso, podemos alterar o titulo da coluna (pois ele sempre deixa a coluna com
o nome da propriedade da classe) ou mesmo ocultar a coluna. Criei um outro
botão com o mesmo código e inserir essas duas linhas, uma para renomear a
coluna Posicao para Posição e a outra para ocultar a coluna ASCII:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Altera o titulo da coluna 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataGrid1.Columns[0].Header = &quot;Posição&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Deixa a coluna 2 invisivel
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataGrid1.Columns[2].Visibility = Visibility.Hidden;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Executando
o botão, verifique como ficou a tela:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1jx187mWVTcK1lxz8Z5UEm4I9r2jt-Qiz15ZzvHWkHGk1PkbPftEASGxNYyJcIRI2J7vuxBCUHCmi9XHu5uK8xZjkDmVKSv81HDcVhcmxI30TNnagUzBOKVhJSWJSeVNf2mjE7-6hlTGs/s1600/DataGridLista2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1jx187mWVTcK1lxz8Z5UEm4I9r2jt-Qiz15ZzvHWkHGk1PkbPftEASGxNYyJcIRI2J7vuxBCUHCmi9XHu5uK8xZjkDmVKSv81HDcVhcmxI30TNnagUzBOKVhJSWJSeVNf2mjE7-6hlTGs/s1600/DataGridLista2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;Referências:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://www.i-programmer.info/programming/wpf-workings/620-using-the-wpf-net-40-datagrid-.html?start=2&quot; target=&quot;_blank&quot;&gt;Using the WPF .NET 4.0 DataGrid &lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://www.linhadecodigo.com.br/Artigo.aspx?id=2163&amp;amp;pag=1&quot; target=&quot;_blank&quot;&gt;Usando a DataGrid WPF&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.uielement.visibility%28v=vs.95%29.aspx&quot; target=&quot;_blank&quot;&gt;UIElement.Visibility Property &lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/5864076289305677088/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/11/alimentando-datagrid-wpf-dinamicamente.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/5864076289305677088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/5864076289305677088'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/11/alimentando-datagrid-wpf-dinamicamente.html' title='Alimentando DataGrid WPF Dinamicamente com C#'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ9H7Zbqd4OX8PyqEVGJokLSImmP8HG4nW-tNtL7VZWn4zXw959TFGgB4yjKZTEbLivfW0-eVjyrWsyOSJMlyTXBzZWheOe4m2I3cZKeGK4RbXMN9L7QaIRB44QPW5rhmQQrO-FMZYpn-O/s72-c/DataGridLista.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-478651551748020876</id><published>2011-08-17T13:23:00.001-03:00</published><updated>2020-10-10T19:46:05.336-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Redirecionamento com Javascript</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quando trabalhamos com scripts do lado do servidor (como ASP, JSP e PHP) é muito fácil fazer o redirecionamento, mas quando temos apenas &lt;b&gt;HTML&lt;/b&gt; podemos utilizar o &lt;b&gt;Javascript&lt;/b&gt; para fazer o redirecionamento, abaixo segue o exemplo:&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;html&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;head&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;Teste de Redirecionamento&amp;lt;/title&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/head&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;body onload=&#39;javascript:window.location=&quot;http://www.facebook.com/pages/Tudo-que-%C3%A9-interessante/153714048015357&quot;&#39;&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Faço uso do evento onload dentro da tag &lt;b&gt;BODY&lt;/b&gt; (este evento ocorre antes de carregar a pagina), dentro do evento eu desvio para o endereço que eu quero com a função &lt;b&gt;window.location&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/478651551748020876/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/08/redirecionamento-com-javascript.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/478651551748020876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/478651551748020876'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/08/redirecionamento-com-javascript.html' title='Redirecionamento com Javascript'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-5389014335715016698</id><published>2011-06-17T13:52:00.012-03:00</published><updated>2020-10-10T19:44:19.028-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Combo Box no WPF – Propriedades DisplayMemberPath e SelectedValuePath</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Muitas vezes queremos fazer um &lt;i&gt;combo box&lt;/i&gt; onde mostraremos para o usuário um valor, mas internamente queremos utilizar outro. O&lt;i&gt; combo box&lt;/i&gt; do &lt;i&gt;WPF&lt;/i&gt; oferece uma forma muito fácil de fazer isso usando duas propriedades &lt;i&gt;DisplayMemberPath&lt;/i&gt; e o &lt;i&gt;SelectedValuePath&lt;/i&gt;.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Abaixo segue o trecho do &lt;i&gt;XAML&lt;/i&gt; do &lt;i&gt;combo box&lt;/i&gt;, este &lt;i&gt;combo box&lt;/i&gt; vai retornar o nome de alguns fabricantes:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;xml&quot;&gt;
&amp;lt;combobox displaymemberpath=&quot;ds_Fabricante&quot; height=&quot;24&quot; isenabled=&quot;True&quot; itemssource=&quot;{Binding}&quot; margin=&quot;92,0,66,200&quot; name=&quot;cbFabricante&quot; selectedvaluepath=&quot;cd_Id&quot; selectionchanged=&quot;cbFabricante_SelectionChanged_1&quot; verticalalignment=&quot;Bottom&quot;&amp;gt;
&amp;lt;/combobox&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Destaco as propriedades &lt;i&gt;ItemsSource&lt;/i&gt;, onde coloquei o valor &lt;i&gt;{Binding}&lt;/i&gt;, isso para que eu possa colocar dentro do código a chamada para a procedure que vai carregar este &lt;i&gt;combo box&lt;/i&gt;, na propriedade &lt;i&gt;DisplayMemberPath&lt;/i&gt; eu coloco o nome do campo que eu quero que apareça para o usuário(no caso o nome do fabricante do equipamento – ds_Fabricante) e na propriedade &lt;i&gt;SelectedValuePath&lt;/i&gt; eu coloco o nome do campo que eu quero utilizar dentro do meu programa(cd_Id é o código do fabricante na tabela).&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Agora segue o código que coloquei para alimentar o &lt;i&gt;combo box&lt;/i&gt;:&lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;private void Window_Loaded(object sender, RoutedEventArgs e)
{
&amp;nbsp;&amp;nbsp;using (SqlConnection conexao = new SqlConnection(@&quot;String de Conexão com o Banco de dados&quot;))
&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DataSet ds = new DataSet();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SqlCommand cmd = new SqlCommand(&quot;exec pro_getFabricante&quot;, conexao);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SqlDataAdapter sqlDA = new SqlDataAdapter(cmd);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sqlDA.Fill(ds);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cbFabricante.DataContext = ds.Tables[0].DefaultView;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Está procedure está sendo executada no evento &lt;i&gt;Loaded&lt;/i&gt; do formulário, no SqlCommand repare que eu executo uma procedure que está no banco de dados, está procedure pode ser substituída por um select e depois, na ultima linha, preencho o &lt;i&gt;DataContext&lt;/i&gt; do &lt;i&gt;combo box&lt;/i&gt; com o retorno da procedure. Segue a imagem de como fica o &lt;i&gt;combo box&lt;/i&gt;:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidP10ASqsDTrDotoZVGwcEM4JJT9xeKqyxOzvOyoHNJdIINYxHlMronhJhLtdOio5M3GoK8IrpwA99s_sOpHn2KmHd_kNrfgHAND89cMleTwHYgLMLOKlRuB1zke6FupudqQjkf_EGK5g3/s1600/ComboBox.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidP10ASqsDTrDotoZVGwcEM4JJT9xeKqyxOzvOyoHNJdIINYxHlMronhJhLtdOio5M3GoK8IrpwA99s_sOpHn2KmHd_kNrfgHAND89cMleTwHYgLMLOKlRuB1zke6FupudqQjkf_EGK5g3/s1600/ComboBox.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Para pegar o valor selecionado no &lt;i&gt;combo box&lt;/i&gt; segue o código que foi configurado no evento &lt;i&gt;SelectionChanged&lt;/i&gt; (este evento ocorre sempre que o valor do &lt;i&gt;combobox&lt;/i&gt; for alterado) &amp;nbsp;e a imagem do alerta exibido:&lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;private void cbFabricante_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
{
&amp;nbsp;&amp;nbsp;MessageBox.Show(&quot;Código selecionado: &quot; + cbFabricante.SelectedValue); 
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZbe7MUNugIJObL4o4KaYqUgyZlfPu7ILtUMZwQsb9navN5eadan8W0sppK76sUbZct87xD7w746usrAQwcrFmB0HRTGy3PLxveASMqX8Qs4kO0M4O3a3ba1cx-woqBLZ5V6E34WMPlJhX/s1600/Mensagem.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZbe7MUNugIJObL4o4KaYqUgyZlfPu7ILtUMZwQsb9navN5eadan8W0sppK76sUbZct87xD7w746usrAQwcrFmB0HRTGy3PLxveASMqX8Qs4kO0M4O3a3ba1cx-woqBLZ5V6E34WMPlJhX/s1600/Mensagem.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;Referencias:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.controls.combobox.aspx&quot;&gt;Documentação da Microsoft (ComboClass)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://stackoverflow.com/questions/561166/binding-wpf-combobox-to-a-custom-list&quot;&gt;Stackoverflow -Binding WPF ComboBox to a Custom List&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.c-sharpcorner.com/UploadFile/mahesh/WPFComboBox10122009073811AM/WPFComboBox.aspx&quot;&gt;C# Corner - WPF ComboBox&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.macoratti.net/10/03/wpf_cbo1.htm&quot;&gt;Macoratti - WPF - Preenchendo uma Combobox&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/5389014335715016698/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/06/combo-box-no-wpf-propriedades.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/5389014335715016698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/5389014335715016698'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/06/combo-box-no-wpf-propriedades.html' title='Combo Box no WPF – Propriedades DisplayMemberPath e SelectedValuePath'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidP10ASqsDTrDotoZVGwcEM4JJT9xeKqyxOzvOyoHNJdIINYxHlMronhJhLtdOio5M3GoK8IrpwA99s_sOpHn2KmHd_kNrfgHAND89cMleTwHYgLMLOKlRuB1zke6FupudqQjkf_EGK5g3/s72-c/ComboBox.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-2531124876421353166</id><published>2011-03-18T13:58:00.002-03:00</published><updated>2020-10-10T19:40:23.222-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Usando as API&#39;s do Android para Pegar a Latitude e Longitude</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Para acessar o GPS nas API’s do Android precisamos utilizar duas classes :&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;LocationManager;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Location.&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Segue abaixo um exemplo de uso das classes:&lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
if (location != null) {
&amp;nbsp;&amp;nbsp; double lat = location.getLatitude();
&amp;nbsp;&amp;nbsp; double lon = location.getLongitude();
}
else 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Toast.makeText(MainActivity.this, &quot;Sem Latitude e longitude !&quot;, Toast.LENGTH_SHORT).show();
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A latitude e longitude retornada pelos métodos &lt;b&gt;getLongitude()&lt;/b&gt; e &lt;b&gt;getLatitude()&lt;/b&gt; estão em graus decimais, este objeto (&lt;b&gt;location&lt;/b&gt;) tem varios métodos para trazer dados do GPS, como &lt;b&gt;getSpeed()&lt;/b&gt; para trazer a velocidade.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insira no arquivo de configuração do seu aplicativo(AndroidManifest.xml) a autorização para acessar o GPS com a seguinte linha:&lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;xml&quot;&gt;&amp;lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot;&amp;gt;
&amp;lt;/uses-permission&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Referências:&lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/reference/android/location/package-summary.html&quot;&gt;Documentação da classe Location&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://developer.android.com/reference/android/location/LocationManager.html&quot;&gt;Documentação da classe LocationManager&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/2227292/how-to-get-latitude-and-longitude-of-the-mobiledevice-in-android&quot;&gt;Exemplo de  uso dessas classes&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/2531124876421353166/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/03/usando-as-apis-do-android-para-pegar.html#comment-form' title='9 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/2531124876421353166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/2531124876421353166'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/03/usando-as-apis-do-android-para-pegar.html' title='Usando as API&#39;s do Android para Pegar a Latitude e Longitude'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-2721543530569892758</id><published>2011-03-04T13:34:00.001-03:00</published><updated>2020-10-10T19:37:44.022-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Mensagem de Alerta no Android</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; É comum nas API’s de desenvolvimento uma forma de dar alertas para o usuário, com a API de desenvolvimento do Android não é diferente, foi criado a classe &lt;b&gt;Toast&lt;/b&gt;&amp;nbsp; (a tradução seria brinde).&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ela possui um método estático chamado &lt;b&gt;makeTest&lt;/b&gt; onde definimos a mensagem, o contexto onde ela vai aparecer (normalmente a janela que o usuário está) e o tempo que a mensagem vai ficar na tela. Segue a definição da função :&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;public static Toast makeText (Context context, CharSequence text, int duration)
&amp;nbsp;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Para definir o tempo de exibição da janela na tela, a classe Toast tem duas constantes :&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Toast.LENGTH_LONG&lt;/b&gt; – Tempo longo de exibição;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;Toast. LENGTH_SHORT&lt;/b&gt; – Tempo curto de exibição.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Após definir a mensagem é só chamar o método &lt;b&gt;show()&lt;/b&gt;, segue a definição :&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;public void show ()
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Segue um exemplo para chamar a função e a tela exibida :&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;Toast.makeText(MainActivity.this, &quot;É obrigatório o preenchimento da UF !&quot;, Toast.LENGTH_LONG).show();
&amp;nbsp;
&lt;/code&gt;&lt;/pre&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjZu2payqnCLveeKGNfcQaIuaPkIUppvd2xP4eH5OuExvy3eGSKGPNkVjrkoD90wl5fZ48zoiXNFCG-Jx4QkdfGjJOfUIpTv-zzOpD5XD6bAHIcb_CmBp1BQKcRXOG8LBQv8zDOCUOZT1A/s1600/Exemplo+Toast.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjZu2payqnCLveeKGNfcQaIuaPkIUppvd2xP4eH5OuExvy3eGSKGPNkVjrkoD90wl5fZ48zoiXNFCG-Jx4QkdfGjJOfUIpTv-zzOpD5XD6bAHIcb_CmBp1BQKcRXOG8LBQv8zDOCUOZT1A/s320/Exemplo+Toast.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Referência:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/Toast.html%20&quot;&gt;Documentação oficial da classe Toast&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;a href=&quot;http://www.felipesilveira.com.br/desenvolvendo-para-android/&quot;&gt;Tutorial para iniciar o desenvolvimento na plataforma Android&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/2721543530569892758/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/03/mensagem-de-alerta-no-android.html#comment-form' title='5 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/2721543530569892758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/2721543530569892758'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2011/03/mensagem-de-alerta-no-android.html' title='Mensagem de Alerta no Android'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjZu2payqnCLveeKGNfcQaIuaPkIUppvd2xP4eH5OuExvy3eGSKGPNkVjrkoD90wl5fZ48zoiXNFCG-Jx4QkdfGjJOfUIpTv-zzOpD5XD6bAHIcb_CmBp1BQKcRXOG8LBQv8zDOCUOZT1A/s72-c/Exemplo+Toast.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-1030176536929805786</id><published>2010-11-29T13:37:00.032-02:00</published><updated>2020-10-10T19:34:23.773-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Usando RadioGroup no Android</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Neste artigo vou demonstrar como recuperar um valor selecionado, selecionar um valor e algumas propriedades do RadioGroup.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Para demonstrar o uso do RadioGroup vamos usar como exemplo um campo muito comum em aplicações de cadastro, o Estado Civil. Este campo pode ter os seguintes valores solteiro(a), casado(a), separado(a), divorciado(a) e&amp;nbsp; viúvo(a), abaixo segue o exemplo da tela e o bloco do arquivo de layout.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5BYxktWteR3kZC7qqcSUhRy9XXW1gnuUFIZRoEH3_GKsyhyphenhyphenLU-t3-u74jkXvkiw6pMypGEPSuQpFySk5t3QAZJjsfagAE-fLuoE2jkm_iTGkQKwRblkoX4RloKdiC6-Eu5CLoB4Xfnq1v/s1600/radiogroup.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5BYxktWteR3kZC7qqcSUhRy9XXW1gnuUFIZRoEH3_GKsyhyphenhyphenLU-t3-u74jkXvkiw6pMypGEPSuQpFySk5t3QAZJjsfagAE-fLuoE2jkm_iTGkQKwRblkoX4RloKdiC6-Eu5CLoB4Xfnq1v/s320/radiogroup.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;pre&gt;&lt;code class=&quot;xml&quot;&gt;
&amp;lt;radiogroup android:id=&quot;@+id/rgEstadoCivil&quot; android:layout_height=&quot;wrap_content&quot; android:layout_width=&quot;wrap_content&quot; android:orientation=&quot;vertical&quot;&amp;gt;
    &amp;lt;radiobutton android:checked=&quot;true&quot; android:id=&quot;@+id/rbSolteiro&quot; android:layout_height=&quot;wrap_content&quot; android:layout_width=&quot;wrap_content&quot; android:text=&quot;Solteiro(a)&quot;&amp;gt;
    &amp;lt;/radiobutton&amp;gt;
    &amp;lt;radiobutton android:id=&quot;@+id/rbCasado&quot; android:layout_height=&quot;wrap_content&quot; android:layout_width=&quot;wrap_content&quot; android:text=&quot;Casado(a)&quot;&amp;gt;
    &amp;lt;/radiobutton&amp;gt;
    &amp;lt;radiobutton android:id=&quot;@+id/rbSeparado&quot; android:layout_height=&quot;wrap_content&quot; android:layout_width=&quot;wrap_content&quot; android:text=&quot;Separado(a)&quot;&amp;gt;
    &amp;lt;/radiobutton&amp;gt;
    &amp;lt;radiobutton android:id=&quot;@+id/rbDivorciado&quot; android:layout_height=&quot;wrap_content&quot; android:layout_width=&quot;wrap_content&quot; android:text=&quot;Divorciado(a)&quot;&amp;gt;
    &amp;lt;/radiobutton&amp;gt;
    &amp;lt;radiobutton android:id=&quot;@+id/rbViuvo&quot; android:layout_height=&quot;wrap_content&quot; android:layout_width=&quot;wrap_content&quot; android:text=&quot;Viúvo(a)&quot;&amp;gt;
    &amp;lt;/radiobutton&amp;gt;
&amp;lt;/radiogroup&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O que vale destacar aqui são as propriedades do RadioGroup, &lt;span style=&quot;color: red;&quot;&gt;android:id&lt;/span&gt;&lt;span style=&quot;color: #0070c0;&quot;&gt;=&quot;@+id/rgEstadoCivil&quot; &lt;/span&gt;e &lt;span style=&quot;color: red;&quot;&gt;android:orientation&lt;/span&gt;&lt;span style=&quot;color: #0070c0;&quot;&gt;=&quot;vertical&quot;&lt;/span&gt; onde :&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;android:id&lt;/span&gt; : é a identificação do componente dentro do nosso programa, &lt;span style=&quot;color: #0070c0;&quot;&gt;@+id &lt;/span&gt;é a classe que os componentes ficarão agrupados, depois da &lt;span style=&quot;color: #0070c0;&quot;&gt;/(barra) &lt;/span&gt;vem o nome do componente,&lt;span style=&quot;color: #0070c0;&quot;&gt; &lt;/span&gt;&amp;nbsp;que no nosso caso é &lt;span style=&quot;color: #0070c0;&quot;&gt;rgEstadoCivil&lt;/span&gt; (mas abaixo irei mostrar no que este atributo se transforma). É importante lembrar que este nome deve ser único;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;android:orientation&lt;/span&gt;: é a orientação dos radiobuttons, ela pode ter dois valores “&lt;span style=&quot;color: #0070c0;&quot;&gt;vertical&lt;/span&gt;” ou “&lt;span style=&quot;color: #0070c0;&quot;&gt;horizontal&lt;/span&gt;”.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Outro ponto a ser observado é que todos os radiobutton devem estar dentro da tag RadioGroup, isto é fundamental para que dentro do nosso programa possamos identificar quem foi selecionado e para o próprio sistema controlar qual radiobutton vai estar selecionado, ou seja, quando o usuário clicar em um ele desmarca o outro.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dos RadiosButtons vamos destacar as propriedades &lt;span style=&quot;color: red;&quot;&gt;android:id&lt;/span&gt;&lt;span style=&quot;color: #0070c0;&quot;&gt;=&quot;@+id/rbSolteiro&quot;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;android:text&lt;/span&gt;&lt;span style=&quot;color: #0070c0;&quot;&gt;=&quot;Solteiro(a)&quot;&lt;/span&gt; e &lt;span style=&quot;color: red;&quot;&gt;android:checked&lt;/span&gt;&lt;span style=&quot;color: #0070c0;&quot;&gt;=&quot;true&quot;:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #0070c0;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;android:id&lt;/span&gt;: é a mesma coisa do RadioGroup, alias funciona igual para qualquer componente;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;android:text&lt;/span&gt;: é o texto que vai identificar o radiobutton (texto do lado da bolinha);&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;android:checked&lt;/span&gt;: para selecionar o radiobutton, está propriedade somente aceita os valores &lt;span style=&quot;color: #0070c0;&quot;&gt;&quot;true&quot;&lt;/span&gt; e &lt;span style=&quot;color: #0070c0;&quot;&gt;&quot;false&quot;&lt;/span&gt;, lembrando que apenas um radiobutton pode estar como true e o valor default é false (essa propriedade na verdade só precisa ser definida para o radiobutton que vai iniciar selecionado, que neste caso foi o primeiro, solteiro).&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Agora vamos ver como fazer para verificar o radiobutton selecionado, mas antes vamos olhar o trecho gerado no arquivo R.java do nosso radiogroup e dos radiosbuttons :&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;public final class  R {
   //...  
   public static final class id {
       public static final int rbCasado=0x7f05002d;
       public static final int rbDivorciado=0x7f05002f;
       public static final int rbSeparado=0x7f05002e;   
       public static final int rbSolteiro=0x7f05002c;
       public static final int rbViuvo=0x7f050030;
       public static final int rgEstadoCivil=0x7f05002b;
   }
   //...
}
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Repare que foi criado uma classe chamada R e dentro dela outra chamada id (lembre-se da propriedade &lt;span style=&quot;color: red;&quot;&gt;android:id &lt;/span&gt;onde colocamos o &lt;span style=&quot;color: #0070c0;&quot;&gt;@+id&lt;/span&gt;, serve para criar esta classe, não é obrigatório o uso do id, pode ser qualquer nome), dentro dela temos as constantes com os nomes atribuídos no arquivo de layout para o radiogroup e os radiosbuttons com valores em hexa decimal. Este arquivo é gerado para facilitar nosso desenvolvimento, ao invés de usarmos este numero vamos utilizar os componentes através das constantes. Abaixo segue o código para verificar qual é o radiobutton selecionado:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;RadioGroup rgEstadoCivil = (RadioGroup) findViewById(R.id.rgEstadoCivil);
switch (rgEstadoCivil.getCheckedRadioButtonId()) {
    case R.id.rbSolteiro:
        Toast.makeText(MainActivity.this, &quot;Solteiro selecionado !&quot;, Toast.LENGTH_SHORT).show();
        break;
    case R.id.rbCasado:
        Toast.makeText(MainActivity.this, &quot;Casado selecionado !&quot;, Toast.LENGTH_SHORT).show();
        break;
    case R.id.rbSeparado:
        Toast.makeText(MainActivity.this, &quot;Separado selecionado !&quot;, Toast.LENGTH_SHORT).show();
        break;
    case R.id.rbDivorciado:
        Toast.makeText(MainActivity.this, &quot;Divorciado selecionado !&quot;, Toast.LENGTH_SHORT).show();
        break;
    case R.id.rbViuvo:
        Toast.makeText(MainActivity.this, &quot;Viúvo selecionado !&quot;, Toast.LENGTH_SHORT).show();
        break;
}
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A primeira função que vamos destacar é o &lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;findViewById. &lt;/span&gt;Este comando serve para localizar o componente e retornar o objeto que foi atribuído a ele, no nosso caso um checkbox.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Depois usamos o método &lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;getCheckedRadioButtonId(), &lt;/span&gt;este método retorna o id do radiobutton selecionado, onde podemos fazer a comparação com as constantes geradas no arquivo R.java, conforme o exemplo demonstra. Também podemos recuperar o componente radiobutton com a função &lt;span style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;findViewById&lt;/span&gt; (igual fizemos com o radiogroup, se precisar fazer alguma alteração especifica). O objeto Toast&amp;nbsp; e a função makeText serve para dar um alerta para o usuário, farei um artigo a respeito dessa classe em breve.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Agora vamos deixar um radiobutton selecionado abaixo segue o código :&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;java&quot;&gt;rgEstadoCivil.check(R.id.rbSolteiro);
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aqui a única função é a check, onde você passa a identificação do radiobutton, ele vai marcar o que você passou e deixar o restante desmarcado.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Referências:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://pt.wikipedia.org/wiki/Estado_civil&quot;&gt;Estado Civil&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.felipesilveira.com.br/desenvolvendo-para-android/&quot;&gt;Desenvolvendo para Android&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://developer.android.com/reference/android/widget/RadioGroup.html&quot;&gt;Radio Group (Documentação oficial)&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/1030176536929805786/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/11/usando-radiogroup-no-android.html#comment-form' title='5 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/1030176536929805786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/1030176536929805786'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/11/usando-radiogroup-no-android.html' title='Usando RadioGroup no Android'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5BYxktWteR3kZC7qqcSUhRy9XXW1gnuUFIZRoEH3_GKsyhyphenhyphenLU-t3-u74jkXvkiw6pMypGEPSuQpFySk5t3QAZJjsfagAE-fLuoE2jkm_iTGkQKwRblkoX4RloKdiC6-Eu5CLoB4Xfnq1v/s72-c/radiogroup.PNG" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-2663131073589499354</id><published>2010-10-28T13:09:00.002-02:00</published><updated>2020-10-10T19:16:36.411-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Função para Calcular a Distancia entre Duas Coordenadas no SQL Server (Transact-SQL)</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Em sistemas de logística temos sempre que calcular a distancia entre pontos e geralmente temos tabelas com endereço dos pontos ou as coordenadas do endereço, sempre que temos que saber a distancia usamos ferramentas de roteirização para calcular o trajeto e informar a distancia. Esse tipo de solução pode ter um custo alto de processamento, velocidade e financeiro já que algumas ferramentas cobram por acesso a sua base.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Para evitar custos desnecessários podemos fazer este calculo no banco de dados, ao invés de usar a ferramenta de roteirização. A vantagem de usar esta abordagem é que mais rápido, podemos usar o comando order by (sem precisar recorrer a código para ordenar pelo mais próximo ou mais distante) e não tem custo, porem poderemos ter problemas se os pontos estiverem muito próximos já que o calculo será feito em linha reta sem levar em consideração o trajeto.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Primeiro vamos criar a função para calcular a distancia entre dois pares de coordenadas, estes pares devem estar em graus decimais. Esta função é a mesma que eu criei no artigo &lt;span style=&quot;color: red;&quot;&gt;&lt;a href=&quot;http://tudoqueeinteressante.blogspot.com/2010/02/funcao-em-delphi-para-calcular.html#links&quot;&gt;Função em Delphi para Calcular a Distância Entre Dois Pares de Coordenadas (Latitude e Longitude)&lt;/a&gt; &lt;/span&gt;convertida nas funções do Transact-SQL.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Segue o script para criar a função: &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;tsql&quot;&gt;-- =============================================
-- Author:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wagner Carmo da Silva
-- Create date:&amp;nbsp;&amp;nbsp; 20/10/2010 17:24
-- Description:&amp;nbsp;&amp;nbsp; Calcula a distância em quilometros
-- =============================================
CREATE FUNCTION [fun_CalcDistancia] 
(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@latIni float, -- Latitude do ponto inicial
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@lonIni float, -- Longitude do ponto inicial
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@latFim float,-- Latitude do ponto final
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@lonFim float -- Longitude do ponto final
)
RETURNS float
AS
BEGIN
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DECLARE @Result AS FLOAT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DECLARE @arcoA AS FLOAT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DECLARE @arcoB AS FLOAT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DECLARE @arcoC AS FLOAT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DECLARE @auxPI AS FLOAT

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET @auxPi = Pi() / 180
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET @arcoA = (@lonFim - @lonIni) * @auxPi
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET @arcoB = (90 - @latFim) * @auxPi
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET @arcoC = (90 - @latIni) * @auxPi
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET @Result = Cos(@arcoB) * Cos(@arcoC) + Sin(@arcoB) * Sin(@arcoC) * Cos(@arcoA)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET @Result = (40030 * ((180 / Pi()) * Acos(@Result))) /360

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RETURN Round(@Result,2)
END
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Esta função retorna o valor em quilômetros arredondando duas casas, se precisar aumentar a precisão do calculo basta alterar este trecho do código &lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;RETURN&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: magenta;&quot;&gt;Round&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@Result&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;2&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt; , número 2 é a quantidade de casas decimais depois da virgula basta aumentar este número para aumentar as casas, se quiser deixar com precisão total basta remover a função round (&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;RETURN &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;@Result&lt;/span&gt;). &lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Agora vou mostrar um select que mostra uso dessa função :&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;tsql&quot;&gt;SELECT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cd_Empresa,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nr_Latitude,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nr_Longitude,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_CalcDistancia(-23.479483, -46.749340, nr_Latitude, nr_Longitude) AS nr_Distancia
FROM tbl_Empresas
ORDER BY fun_CalcDistancia(-23.479483, -46.749340, nr_Latitude, nr_Latitude)
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: grey; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Repare que eu usei a função até mesmo para ordenar o resultado, neste caso ele traz o mais próximo, para inverter isto basta usar o desc depois do order by.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Importante é não esquecer que o calculo é em linha reta, isso deve ser usado quando os pontos tem uma boa distancia, ou seja, o caminho não vai interferir muito na distancia do ponto.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: red; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Referências:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://tudoqueeinteressante.blogspot.com/2010/02/funcao-em-delphi-para-calcular.html#links&quot;&gt;Função em Delphi para Calcular a Distância Entre Dois Pares de Coordenadas (Latitude e Longitude)&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms189512.aspx&quot;&gt;PI (Transact-SQL)&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms188919.aspx&quot;&gt;COS (Transact-SQL)&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://pgdocptbr.sourceforge.net/pg80/functions-math.html&quot;&gt;Funções e operadores matemáticos (Documentação do PostgreSQL 8.0.0)&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/2663131073589499354/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/10/funcao-para-calcular-distancia-entre.html#comment-form' title='8 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/2663131073589499354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/2663131073589499354'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/10/funcao-para-calcular-distancia-entre.html' title='Função para Calcular a Distancia entre Duas Coordenadas no SQL Server (Transact-SQL)'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-3594453244799224412</id><published>2010-10-19T13:43:00.002-02:00</published><updated>2020-10-10T19:09:00.902-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Função Para Converter Graus Decimais em Graus Minutos e Segundos no Javascript</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quem trabalha com mapas vive precisando fazer conversões de coordenadas, com o crescimento das ferramentas de mapas para Web essas conversões devem ser feitas no Javascript, abaixo segue a função que eu desenvolvi para exibir as coordenadas que a ferramenta de mapa retorna em graus para exibir em graus minutos e segundos: &lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;function showCoordenadasMinutos(gDec, x) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var graus;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var minutos;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var aux;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var segundos;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var milisegundos;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var direcao;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Separa os graus
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;graus = parseInt(gDec);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Pega a fração dos graus e converte em minutos
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aux = (graus - gDec) * 60;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;minutos = parseInt(aux);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Pega a fração dos minutos e converte em segundos
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aux = (aux - minutos) * 60;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;segundos = parseInt(aux);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Pega a fração dos segundos e converte em milisegundos
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;milisegundos = parseInt((aux - segundos) * 60);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Essa parte eu verifico se é o eixo X ou Y para substituir o simbolo de negativo  pelas iniciais de norte ou sul para o eixo Y, leste ou oeste para o eixo X
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (x) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Eixo X
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (graus &amp;lt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;direcao = &quot;O&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;direcao = &quot;L&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Eixo Y
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (graus &amp;lt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;direcao = &quot;S&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;direcao = &quot;N&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Devolvo a string formatada, a função Math.abs é para retornar o valor absoluto // (retirar o valor negativo) já que estou usando a notação norte, sul, leste ou oeste
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return Math.abs(graus) + &quot;° &quot; + minutos + &quot;&#39; &quot; + segundos + &quot;.&quot; + milisegundos + &quot;&#39;&#39; &quot; + direcao;
}
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-indent: 35.4pt;&quot;&gt;Como eu precisava criar uma função para exibir os dados para o usuário eu substitui o valor negativo pelas inicias dos pontos cardeais e coloquei as aspas simples, se quiser deixar no padrão NMEA basta juntar o grau o minuto colocar o ponto e juntar o segundo e o milissegundos.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-indent: 35.4pt;&quot;&gt;Se quiser usar esta função para retornar um valor de ponto flutuante no padrão NMEA substitua o retorno da função pelo debaixo :&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-indent: 35.4pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;return ((graus * 100) + minutos) + (((segundos * 100) + milisegundos) / 10000);
&amp;nbsp;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-indent: 35.4pt;&quot;&gt;E remova o parâmetro x da função e o trecho de código que verifica qual é a direção da coordenada.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/3594453244799224412/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/10/funcao-para-converter-graus-decimais-em.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/3594453244799224412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/3594453244799224412'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/10/funcao-para-converter-graus-decimais-em.html' title='Função Para Converter Graus Decimais em Graus Minutos e Segundos no Javascript'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-424244855227565540</id><published>2010-08-24T13:37:00.004-03:00</published><updated>2020-10-10T19:07:00.308-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Lendo os Dados de uma Planilha do Excel C#</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;style&gt;
&lt;/style&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me deparei com uma situação onde precisava ler  os dados de uma planilha de Excel, e depois de muita pesquisa segue a forma&amp;nbsp;mais  fácil que eu encontrei para fazer isso usando o C#, porem é necessário que o  Excel esteja instalado nas maquinas onde seu programa vai executar.&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; O primeiro passo é adicionar as referências do  Excel ao seu projeto, para isso clique com o botão direito em cima do seu  projeto na Solution Explorer, vá até a opção Add Reference, depois na aba COM,  procure pelo &lt;b&gt;Microsoft Excel (versão) Object Library &lt;/b&gt;e depois  click em OK.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Adicione as seguintes bibliotecas ao seu fonte  :&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;using Excel =  Microsoft.Office.Interop.Excel; //*
using System.Reflection;
&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;i&gt; * Renomeie esta biblioteca para evitar  conflitos de nome e facilitar seu uso dentro do seu programa&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Segue o código comentado para abrir o Excel, &amp;nbsp;a  planilha ler os dados :&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;// Cria uma instancia do Excel
Excel.Application oXL = new Excel.Application();
// Objeto que vai  conter seu arquivo
Excel.Workbook oWB; 
// Caso você queira que o seu programa  mostre a planilha aberta no Excel deixa está opção como true
oXL.Visible = true; 
//Comando para abrir a  planilha, basta substituir o &quot;endereço da planilha&quot;
oWB = oXL.Workbooks.Open(&quot;endereço da planilha&quot;, 0, true,  5, &quot;&quot;, &quot;&quot;, true, Excel.XlPlatform.xlWindows, &quot;\t&quot;, false, false, 0, true, null, null); 
// Pega a planilha ativa, se o Excel não estiver  aberto é a primeira planilha do arquivo
Excel.Worksheet activeSheet = (Excel.Worksheet) oWB.ActiveSheet;
// Pega o  texto da célula A1
string cellA1 = (string) activeSheet.get_Range(&quot;A1&quot;, Missing.Value).Text;
// Exibe uma mensagem com o texto da célula A1
MessageBox.Show(cellA1);
&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Caso você queira pegar uma planilha especifica  do arquivo use o seguinte comando&amp;nbsp;:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;// Substitua o X pelo número da planilha, é  a ordem que aparece as abas
Excel.Worksheet activeSheet = (Excel.Worksheet) oWB.Worksheets.get_Item(X); 
&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Isto é o básico para abrir e ler uma planilha no Excel, mas  saiba que é possível alterar fonte, criar formula adicionar conteúdo e alterar  dados.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;goog_1312976898&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1312976899&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Referências:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://support.microsoft.com/kb/302084&quot;&gt;http://support.microsoft.com/kb/302084&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://csharp.net-informations.com/excel/csharp-excel-tutorial.htm&quot;&gt;http://csharp.net-informations.com/excel/csharp-excel-tutorial.htm&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://sousatiago.blogspot.com/2007/12/importar-dados-do-excel-com-c.html&quot;&gt;http://sousatiago.blogspot.com/2007/12/importar-dados-do-excel-com-c.html&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/424244855227565540/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/08/lendo-os-dados-de-uma-planilha-do-excel.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/424244855227565540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/424244855227565540'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/08/lendo-os-dados-de-uma-planilha-do-excel.html' title='Lendo os Dados de uma Planilha do Excel C#'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-1096989335683203762</id><published>2010-07-23T13:37:00.002-03:00</published><updated>2020-10-10T19:04:27.191-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Função C# para Copiar uma Palavra de uma Frase usando StringBuilder</title><content type='html'>&lt;style&gt;
&lt;/style&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quando temos preocupação com o uso de memória  em nossas aplicações o uso do tipo String não é recomendável, devemos usar a  classe StringBuilder, porem ela não tem tantas funções como tem o a classe  String.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uma função que eu senti falta foi para copiar  uma palavra de uma frase, ou um trecho delimitado por isso criei a função  abaixo:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;// Copia as palavra na posição e seu separador
private StringBuilder Palavra(StringBuilder pacote, char separador, int posicao)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; StringBuilder retorno = new StringBuilder();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0, pos = 1; i &amp;lt; pacote.Length; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; retorno.Append(pacote[i]);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (pacote[i] == separador)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (pos == posicao)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; retorno.Remove(retorno.Length - 1, 1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; retorno.Remove(0, retorno.Length);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pos++;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new StringBuilder().Append(retorno);
}&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;style&gt;
&lt;/style&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Esta  função possui três parâmetros :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; - pacote: é a frase que queremos pegar  uma palavra;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; - separador: caracter utilizado para  separar as palavras;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; - posicao: posição da palavra dentro  da frase.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exemplo&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Temos a seguinte frase:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;StringBuilder&amp;nbsp;aux = new  StringBuilder(&quot;Santos campeão da Copa do Brasil de 2010&quot;);
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: Arial;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Para pegar a palavra &quot;Santos&quot; usaremos  a função da seguinte forma &lt;pre&gt;&lt;code class=&quot;csharp&quot;&gt;Palavra(aux,&#39; &#39;,1);&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/1096989335683203762/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/07/funcao-c-para-copiar-uma-palavra-de-uma.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/1096989335683203762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/1096989335683203762'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/07/funcao-c-para-copiar-uma-palavra-de-uma.html' title='Função C# para Copiar uma Palavra de uma Frase usando StringBuilder'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-7394309397582761522</id><published>2010-06-29T12:24:00.000-03:00</published><updated>2014-11-26T18:09:43.881-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Livros"/><title type='text'>Livro:  Visual C# 2008 do Jonh  Sharp</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;style&gt;
&lt;/style&gt; &lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Terminei de ler o livro Visual C# 2008 do Jonh Sharp (traduzido), é um ótimo  livro para iniciar o aprendizado da plataforma .Net utilizando o  C#.&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; O autor utiliza ótimos exemplos, aborda quase  tudo o que envolve a plataforma .Net, porem nada muito profundo mas o suficiente  para iniciar e ter base para buscar mais sobre os assuntos.&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Geralmente os livros não tem uma tradução  muito boa, porem este livro a tradução é ótima, mantiveram os nomes dos exemplos  sem traduzir para ficar fácil localizar as classes nos exemplos.&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fica ai uma dica para aprender C# e .Net&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/7394309397582761522/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/06/livro-visual-c-2008-do-jonh-sharp.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7394309397582761522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7394309397582761522'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/06/livro-visual-c-2008-do-jonh-sharp.html' title='Livro:  Visual C# 2008 do Jonh  Sharp'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-7578367521272536842</id><published>2010-02-19T17:59:00.003-02:00</published><updated>2020-10-10T18:52:55.889-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Delphi"/><title type='text'>Função em Delphi para Calcular a Distância Entre Dois Pares de Coordenadas (Latitude e Longitude)</title><content type='html'>&lt;style&gt;
&lt;/style&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Segue uma função para calcular a distância de dois  pares de coordenadas em graus decimais, resultado é dado em  quilômetros.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;delphi&quot;&gt;function calcDistancia(LatIni, LonIni, LatFim, LonFim: Extended): Extended;
var
&amp;nbsp;arcoA, arcoB, arcoC : Extended;
&amp;nbsp;auxPI : Extended;
begin
&amp;nbsp;&amp;nbsp; auxPi := Pi / 180;

&amp;nbsp;&amp;nbsp; arcoA := (LonFim - LonIni) * auxPi;
&amp;nbsp;&amp;nbsp; arcoB := (90 - LatFim) * auxPi;
&amp;nbsp;&amp;nbsp; arcoC := (90 - LatIni) * auxPi;

&amp;nbsp;&amp;nbsp; // cos (a) = cos (b) . cos (c)&amp;nbsp; + sen (b) . sen (c) . cos (A)
&amp;nbsp;&amp;nbsp; Result := Cos(arcoB) * Cos(arcoC) + Sin(arcoB) * Sin(arcoC) * Cos(arcoA);
&amp;nbsp;&amp;nbsp; Result := (40030 * ((180 / Pi) * ArcCos(Result))) / 360;
end;
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/7578367521272536842/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/02/funcao-em-delphi-para-calcular.html#comment-form' title='6 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7578367521272536842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/7578367521272536842'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/02/funcao-em-delphi-para-calcular.html' title='Função em Delphi para Calcular a Distância Entre Dois Pares de Coordenadas (Latitude e Longitude)'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-4420405452064247911</id><published>2010-02-19T13:05:00.004-02:00</published><updated>2020-10-10T19:55:32.926-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Como Saber a Quantidade de  Registros Duplicados (SQL SERVER)</title><content type='html'>&lt;style&gt;
&lt;/style&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Uma forma de localizar registros duplicados no SQL  é utilizar a instrução GROUP BY e HEAVING.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Vamos imaginar uma tabela&amp;nbsp;chamada Clientes&amp;nbsp;com o  campo CPF e você queira saber a quantidade de CPF&#39;s duplicados, para isso digite  a seguinte instrução :&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;tsql&quot;&gt;SELECT CPF, COUNT(*) FROM Clientes
GROUP BY CPF
HAVING COUNT(*) &gt; 1
&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Esta instrução ira retorna o CPF e a quantidade de  registro que&amp;nbsp;ele possui, porem ele só vai trazer os CPF que tem mais de uma  ocorrência, isto devido a clausula HAVING COUNT(*) &amp;gt; 1.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/4420405452064247911/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/02/como-saber-quantidade-de-registros.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/4420405452064247911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/4420405452064247911'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/02/como-saber-quantidade-de-registros.html' title='Como Saber a Quantidade de  Registros Duplicados (SQL SERVER)'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-8196405912846346548</id><published>2010-02-09T14:10:00.004-02:00</published><updated>2020-10-10T19:54:02.991-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Como Saber a Posição de uma Substring num Campo de uma Tabela (patindex)</title><content type='html'>&lt;style&gt;
&lt;/style&gt; &lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Na linguagem SQL existe o comando patindex que retorna a posição inicial de uma  substring em um campo, sua sintaxe é &lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;tsql&quot;&gt;patindex(substring,string);&lt;/code&gt;
&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; onde :&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; substring é o texto que você está  procurando, pode ser usado caracter coringa % para definir o inicio da pesquisa,  idêntico ao uso do comando like;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; string é o texto ou nome do campo que você  quer que ele localize a substring.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; O comando vai retornar a posição do primeiro  caracter da substring ou 0 caso não encontre nada.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/8196405912846346548/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/02/como-saber-posicao-de-uma-substring-num.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/8196405912846346548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/8196405912846346548'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/02/como-saber-posicao-de-uma-substring-num.html' title='Como Saber a Posição de uma Substring num Campo de uma Tabela (patindex)'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5961337748639548528.post-6995799460722112604</id><published>2010-01-19T15:08:00.004-02:00</published><updated>2020-10-10T18:31:54.064-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Substituir Todas as Ocorrências de um Texto em uma String no JavaScript</title><content type='html'>&lt;style&gt;
&lt;/style&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Numa requisição ajax não podemos enviar espaços nos  parâmetros, eles devem ser substituídos por %20 para fazer isso no Javascript a  melhor forma que eu encontrei foi utilizar o comando split e join abaixo segue o  exemplo:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;var aux
aux = &quot;palavra1 palavra2 palavra3&quot;;
aux = aux.split(&quot; &quot;).join(&quot;%20&quot;);
alert(aux);  
&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Quando a mensagem aparecer a variável aux ficara com o  conteúdo &quot;palavra1%20palavra2%20palavra3&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Referências:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;a href=&quot;http://rogeriolino.wordpress.com/2007/07/23/javascript-replaceall/&quot;&gt;http://rogeriolino.wordpress.com/2007/07/23/javascript-replaceall/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;a href=&quot;http://www.mspc.eng.br/info/jscriptString.shtml&quot;&gt;http://www.mspc.eng.br/info/jscriptString.shtml&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tudoqueeinteressante.blogspot.com/feeds/6995799460722112604/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/01/substituir-varias-ocorrencias-no.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/6995799460722112604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5961337748639548528/posts/default/6995799460722112604'/><link rel='alternate' type='text/html' href='http://tudoqueeinteressante.blogspot.com/2010/01/substituir-varias-ocorrencias-no.html' title='Substituir Todas as Ocorrências de um Texto em uma String no JavaScript'/><author><name>Wagner</name><uri>http://www.blogger.com/profile/10397950156848350662</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>