public class EventArgs<T> :EventArgs {
public EventArgs(T value)
{
m_value = value;
}
private T m_value;
public T Value
{
get { return m_value; }
}
}
Software Developer Scratchpad
Monday, November 24, 2014
Sunday, November 23, 2014
Tuesday, November 4, 2014
Parsing google JSON suggestions in C# .NET (suggestqueries.google.com)
private static ArrayList GetSuggestions(string searchQuery)
{
string query = "http://suggestqueries.google.com/complete/search?output=firefox&hl=pl-PL&q=" + searchQuery.Replace(" ", "+");
var client = new WebClient();
var content = client.DownloadString(query);
Console.WriteLine(content);
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(content));
var serializer = new JavaScriptSerializer();
ArrayList deserializedArrayList = serializer.Deserialize<ArrayList>(content);
var suggestions = deserializedArrayList[1] as ArrayList;
return suggestions;
}
{
string query = "http://suggestqueries.google.com/complete/search?output=firefox&hl=pl-PL&q=" + searchQuery.Replace(" ", "+");
var client = new WebClient();
var content = client.DownloadString(query);
Console.WriteLine(content);
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(content));
var serializer = new JavaScriptSerializer();
ArrayList deserializedArrayList = serializer.Deserialize<ArrayList>(content);
var suggestions = deserializedArrayList[1] as ArrayList;
return suggestions;
}
Sunday, November 2, 2014
Tuesday, July 22, 2014
Saturday, July 19, 2014
Free book: Apprenticeship Patterns - Guidance for the Aspiring Software Craftsman
http://chimera.labs.oreilly.com/books/1234000001813/index.html
Subscribe to:
Posts (Atom)