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
| SET @search = 'questdev01.wpengine.com'; | |
| SELECT CONCAT( | |
| 'SELECT ''', TABLE_NAME, ''' AS table_name, ''', COLUMN_NAME, ''' AS column_name, ', | |
| 'CAST(', COLUMN_NAME, ' AS CHAR(10000)) AS match_value FROM `', TABLE_NAME, | |
| '` WHERE ', COLUMN_NAME, ' LIKE ''%', @search, '%'';' | |
| ) AS runme | |
| FROM INFORMATION_SCHEMA.COLUMNS | |
| WHERE TABLE_SCHEMA = DATABASE() | |
| AND DATA_TYPE IN ('char','varchar','text','mediumtext','longtext'); |
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
| dotnet new console | |
| dotnet restore | |
| dotnet build // gives the "Hello World" example program when empty | |
| dotnet run |
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
| <rewrite> | |
| <rules> | |
| <rule name="HTTP to HTTPS redirect" stopProcessing="true"> | |
| <match url="(.*)" /> | |
| <conditions> | |
| <add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
| </conditions> | |
| <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" /> | |
| </rule> | |
| </rules> |
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
| <rewrite> | |
| <rules> | |
| <rule name="Block login page" stopProcessing="true"> | |
| <match url="^login(\.aspx)?(/\s*\S*)*$" /> | |
| <conditions logicalGrouping="MatchAll"> | |
| <add input="{REMOTE_ADDR}" pattern="192.168.*.*" negate="true" /> | |
| <add input="{REMOTE_ADDR}" pattern="127.0.0.1" negate="true" /> | |
| </conditions> | |
| <action type="Redirect" url="http://{HTTP_HOST}" /> | |
| </rule> |
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
| // How to generate the new HMAC-SHA1 Has for Authorize.net | |
| // !important - use next line to generate actual timestamp | |
| // String timeStamp = GetTimestamp(DateTime.Now); | |
| using System; | |
| using System.Security; |
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
| // Connection String defined in web.config | |
| // need to have Using System.Configuration too! | |
| using (SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["qConnectionString"].ConnectionString)) |
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 simple example shows how an interface can be used as a callback mechanism. | |
| public interface ICallbackNotificationTest | |
| { | |
| void OnUpdate(string message); | |
| } | |
| class CallBackTest : ICallbackNotificationTest | |
| { | |
| public void OnUpdate(string message) |
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
| // Shows how to return a deep copy clone of an object. | |
| class CloneTest : ICloneable | |
| { | |
| public int SomeProperty { get; set; } | |
| public object Clone() | |
| { | |
| CloneTest clone = new CloneTest(); | |
| clone.SomeProperty = this.SomeProperty; |
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
| // Example adapted from MSDN showing how to use IEnumerable and IEnumerator | |
| public class CollectionTestItem | |
| { | |
| public CollectionTestItem(string Name, double Value) | |
| { | |
| this.Name = Name; | |
| this.Value = Value; | |
| } |
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 is a simple example of IComparable for sorting, using one sort order. | |
| class CompareTest : IComparable | |
| { | |
| public int SomeProperty { get; set; } | |
| public CompareTest() { } | |
| public CompareTest(int Value) | |
| { | |
| SomeProperty = Value; |
NewerOlder