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 DomainSearch | |
{ | |
/// <summary> | |
/// Check whether a given domain name is available or not | |
/// </summary> | |
/// <param name="domainName">domain name to be verified</param> | |
/// <returns></returns> | |
public static bool IsDomainNameAvailable(string domainName) | |
{ | |
string whoisData = Whois.Lookup(domainName); |
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
SELECT SUBSTRING(T.Email,(CHARINDEX('@',T.Email)+1),LEN(T.Email) - (CHARINDEX('@',T.Email))) as DomainName FROM EmailTable T |
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 ConditionalPerformance | |
{ | |
//If block | |
public long WithOnlyIf(int myFlag) | |
{ | |
Stopwatch myTimer = new Stopwatch(); | |
string someString = ""; | |
myTimer.Start(); | |
for (int i = 0; i < 1000000; i++) | |
{ |
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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace DomainTools | |
{ |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace DomainTools | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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.Text; | |
using System.Collections.Generic; | |
namespace TwitterAPI | |
{ | |
public class Tweets | |
{ | |
#region Class-Level-Declarations |
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
oAuthTwitter oauth = new oAuthTwitter(); | |
//Replace the vlues with the one's provided by twitter | |
oauth.ConsumerKey = "Your-twitter-oauth-consumerkey"; | |
oauth.ConsumerSecret = "Your-twitter-oauth-consumersecret"; | |
//Launches your default browser for requesting //authentication | |
System.Diagnostics.Process.Start(oauth.AuthorizationLinkGet()); | |
//Copy the pin provided after you authenticating and save to a string | |
//I am assuming you store it in a string twitterpin | |
//Now the real authentication takes place | |
//you will exchange the authtoken and pin for Access token |
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
//Replace the term search_keyword with a term you want to search | |
//rpp=100 in the url means results per page is 100, and lang=en means | |
//Language is english | |
string result = oauth.oAuthWebRequest(oAuthTwitter.Method.GET, "http://search.twitter.com/search.json", "q=" + search_keyword + "&rpp=100&lang=en"); |
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
//The following code is a straight copy from jamiedigi.com | |
HashTable jsonHash = (Hashtable)JSON.JsonDecode(jsonCode); | |
ArrayList jsonResults = (ArrayList)jsonHash["results"]; | |
foreach (object objResult in jsonResults) | |
{ | |
Hashtable jsonResult = (Hashtable)objResult; | |
System.Diagnostics.Debug.WriteLine("User ID: " | |
+ jsonResult["from_user_id"].ToString()); | |
System.Diagnostics.Debug.WriteLine("Tweet text: " | |
+ jsonResult["text"].ToString()); |
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.Collections.Generic; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
namespace Coderbuddy | |
{ | |
public class CheckInternetConnection | |
{ |
OlderNewer