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 String GetHttpResponse(string url) | |
{ | |
HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create("http://" + url); | |
//webRequest.AllowAutoRedirect = false; | |
HttpWebResponse response = (HttpWebResponse) webRequest.GetResponse(); | |
response.Close(); | |
return response.StatusCode.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.Linq; | |
using System.Text; | |
using System.IO; | |
namespace CONSOLE | |
{ | |
class MainLoader | |
{ |
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
// This will throw a 'System.IO.FileNotFoundException' | |
public class ProcessFile | |
{ | |
public static void Main() | |
{ | |
try | |
{ | |
StreamReader sr = File.OpenText("data.txt"); | |
Console.WriteLine("The first line of this file is {0}", sr.ReadLine()); | |
sr.Close(); |
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
--Updating values - simple | |
-- SET is the column name(s), and the new values | |
-- Include where statement to target a specific row | |
--1. simple update of values | |
Update dbo.dealers | |
SET latitude='34.000854', longitude='-81.099379' | |
WHERE dealer_code = '39054' | |
*** |
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 * FROM seo_templates | |
WHERE main_copy LIKE '20%' | |
OR page_title LIKE '20%' | |
*** |
NewerOlder