This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AcidentesComCat | |
{ | |
public int trajeto { get; set; } | |
public int doenca { get; set; } | |
public int tipicos { get; set; } | |
} | |
public class Quantidade | |
{ | |
public AcidentesComCat acidentes_com_cat { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
namespace OpenMVC.Helpers | |
{ | |
public class Builder | |
{ | |
public static T Download_And_Serialize_Data<T>(string url) where T : new() | |
{ | |
using (var w = new WebClient()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Index() | |
{ | |
var retornoOpenData = Helpers.Builder.Download_And_Serialize_Data<RootObject>("http://api.dataprev.gov.br/previdencia/anuario/2009/acidentes-do-trabalho.json"); | |
var lista = retornoOpenData.acidentes_de_trabalho.Take(15); | |
return View(lista); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model IEnumerable<OpenMVC.Models.AcidentesDeTrabalho> | |
@{ | |
ViewBag.Title = "Index"; | |
} | |
<table> | |
<tr class="editor-label"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RODBC) | |
cn<-odbcConnect('NW',uid='renato',pwd='senha') | |
sql <- "select top 30 ShipName from dbo.Orders" | |
myresult<- (sqlQuery(cn, sql)) | |
odbcClose(cn) | |
print(myresult) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("ROAuth") | |
library("twitteR") | |
options(RCurlOptions = list(capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE)) | |
reqURL <- "https://api.twitter.com/oauth/request_token" | |
accessURL <- "https://api.twitter.com/oauth/access_token" | |
authURL <- "https://api.twitter.com/oauth/authorize" | |
consumerKey <- "SEU CONSUMER KEY" | |
consumerSecret <- "SEU CONSUMER SECRET" | |
twitCred <- OAuthFactory$new(consumerKey=consumerKey, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("ROAuth") | |
library("twitteR") | |
library("wordcloud") | |
library("tm") | |
options(RCurlOptions = list(capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE)) | |
reqURL <- "https://api.twitter.com/oauth/request_token" | |
accessURL <- "https://api.twitter.com/oauth/access_token" | |
authURL <- "https://api.twitter.com/oauth/authorize" | |
consumerKey <- "Seu Consumer KEY" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RODBC) | |
cn<-odbcConnect('NW',uid='Usuario',pwd='Senha') | |
sql <- "select top 30 ShipName from dbo.Orders" | |
myresult<- (sqlQuery(cn, sql)) | |
odbcClose(cn) | |
print(myresult) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int led = 13; // Numero da porta onde o Led esta conectado | |
void setup() { | |
pinMode(led, OUTPUT); // porta , e modo de visualização. | |
} | |
void loop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.*; | |
import java.io.*; | |
import processing.serial.*; //Cria o canal de comunicação com o Arduino | |
import cc.arduino.*; //Libs Arduino | |
Arduino arduino; | |
int ledPin; | |
void setup() |