Meteor: Debug on server side

In Meteor 0.5.4 this has become a lot easier: First run the following commands from the terminal: npm install -g node-inspector node-inspector & export NODE_OPTIONS=’–debug-brk’ meteor And then open http://localhost:8080 in your browser to view the node-inspector console. Update Since Meteor 1.0 you can just type meteor debug which is essentially a shortcut for the … Read more

Pulling data from a webpage, parsing it for specific pieces, and displaying it

This small example uses HtmlAgilityPack, and using XPath selectors to get to the desired elements. protected void Page_Load(object sender, EventArgs e) { string url = “http://www.metacritic.com/game/pc/halo-spartan-assault”; var web = new HtmlAgilityPack.HtmlWeb(); HtmlDocument doc = web.Load(url); string metascore = doc.DocumentNode.SelectNodes(“//*[@id=\”main\”]/div[3]/div/div[2]/div[1]/div[1]/div/div/div[2]/a/span[1]”)[0].InnerText; string userscore = doc.DocumentNode.SelectNodes(“//*[@id=\”main\”]/div[3]/div/div[2]/div[1]/div[2]/div[1]/div/div[2]/a/span[1]”)[0].InnerText; string summary = doc.DocumentNode.SelectNodes(“//*[@id=\”main\”]/div[3]/div/div[2]/div[2]/div[1]/ul/li/span[2]/span/span[1]”)[0].InnerText; } An easy way to obtain the XPath … Read more