Enter your name:
+ + Private Alt As Boolean Public Function CandyStripe(ByVal NewRow As Boolean, ByVal OddColor as String, ByVal EvenColor as String) As String '------------------------------------------------------------------------------------------------ ' Purpose: To candy stripe the detail rows of a report ' Example: BackgroundColor = Code.CandyStripe() ' Note: The first column needs a parameter of "True" passed in example: Code.CandyStripe(True) '------------------------------------------------------------------------------------------------ If NewRow Then Alt = Not Alt End If If Alt Then Return OddColor Else Return EvenColor End If End Function Private Alt As Boolean Public Function CandyStripe(ByVal NewRow As Boolean, ByVal OddColor as String, ByVal EvenColor as String) As String '------------------------------------------------------------------------------------------------ ' Purpose: To candy stripe the detail rows of a report ' Example: BackgroundColor = Code.CandyStripe() ' Note: The first column needs a parameter of "True" passed in example: Code.CandyStripe(True) '------------------------------------------------------------------------------------------------ If NewRow Then Alt = Not Alt End If If Alt Then Return OddColor Else Return EvenColor End If End Function Private Alt As Boolean Public Function CandyStripe(ByVal NewRow As Boolean, ByVal OddColor as String, ByVal EvenColor as String) As String '------------------------------------------------------------------------------------------------ ' Purpose: To candy stripe the detail rows of a report ' Example: BackgroundColor = Code.CandyStripe() ' Note: The first column needs a parameter of "True" passed in example: Code.CandyStripe(True) '------------------------------------------------------------------------------------------------ If NewRow Then Alt = Not Alt End If If Alt Then Return OddColor Else Return EvenColor End If End Function Private Alt As Boolean Public Function CandyStripe(ByVal NewRow As Boolean, ByVal OddColor as String, ByVal EvenColor as String) As String '------------------------------------------------------------------------------------------------ ' Purpose: To candy stripe the detail rows of a report ' Example: BackgroundColor = Code.CandyStripe() ' Note: The first column needs a parameter of "True" passed in example: Code.CandyStripe(True) '------------------------------------------------------------------------------------------------ If NewRow Then Alt = Not Alt End If If Alt Then Return OddColor Else Return EvenColor End If End Function
+ Private Alt As Boolean Public Function CandyStripe(ByVal NewRow As Boolean, ByVal OddColor as String, ByVal EvenColor as String) As String '------------------------------------------------------------------------------------------------ ' Purpose: To candy stripe the detail rows of a report ' Example: BackgroundColor = Code.CandyStripe() ' Note: The first column needs a parameter of "True" passed in example: Code.CandyStripe(True) '------------------------------------------------------------------------------------------------ If NewRow Then Alt = Not Alt End If If Alt Then Return OddColor Else Return EvenColor End If End Function
- /// [CanBeNull] public object Test() { return null; }
- /// public void UseTest() {
- /// var p = Test();
- /// var s = p.ToString(); // Warning: Possible 'System.NullReferenceException'
- /// }
- ///
- /// [NotNull] public object Foo() {
- /// return null; // Warning: Possible 'null' assignment
- /// }
- ///
- /// [StringFormatMethod("message")]
- /// public void ShowError(string message, params object[] args) { /* do something */ }
- /// public void Foo() {
- /// ShowError("Failed: {0}"); // Warning: Non-existing argument in format string
- /// }
- ///
- /// public void Foo(string param) {
- /// if (param == null)
- /// throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol
- /// }
- ///
- /// public class Foo : INotifyPropertyChanged {
- /// public event PropertyChangedEventHandler PropertyChanged;
- /// [NotifyPropertyChangedInvocator]
- /// protected virtual void NotifyChanged(string propertyName) { ... }
- ///
- /// private string _name;
- /// public string Name {
- /// get { return _name; }
- /// set { _name = value; NotifyChanged("LastName"); /* Warning */ }
- /// }
- /// }
- ///
- /// Examples of generated notifications:
- /// Function Definition Table syntax:
- ///
- /// [ContractAnnotation("=> halt")]
- /// public void TerminationMethod()
- ///
- /// [ContractAnnotation("halt <= condition: false")]
- /// public void Assert(bool condition, string text) // regular assertion method
- ///
- /// [ContractAnnotation("s:null => true")]
- /// public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty()
- ///
- /// // A method that returns null if the parameter is null, and not null if the parameter is not null
- /// [ContractAnnotation("null => null; notnull => notnull")]
- /// public object Transform(object data)
- ///
- /// [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")]
- /// public bool TryParse(string s, out Person result)
- ///
- /// [LocalizationRequiredAttribute(true)]
- /// public class Foo {
- /// private string str = "my string"; // Warning: Localizable string
- /// }
- ///
- /// [CannotApplyEqualityOperator]
- /// class NoEquality { }
- /// class UsesNoEquality {
- /// public void Test() {
- /// var ca1 = new NoEquality();
- /// var ca2 = new NoEquality();
- /// if (ca1 != null) { // OK
- /// bool condition = ca1 == ca2; // Warning
- /// }
- /// }
- /// }
- ///
- /// [BaseTypeRequired(typeof(IComponent)] // Specify requirement
- /// public class ComponentAttribute : Attribute { }
- /// [Component] // ComponentAttribute requires implementing IComponent interface
- /// public class MyComponent : IComponent { }
- ///
- /// [Pure] private int Multiply(int x, int y) { return x * y; }
- /// public void Foo() {
- /// const int a = 2, b = 2;
- /// Multiply(a, b); // Waring: Return value of pure method is not used
- /// }
- ///
- /// [ActionName("Foo")]
- /// public ActionResult Login(string returnUrl) {
- /// ViewBag.ReturnUrl = Url.Action("Foo"); // OK
- /// return RedirectToAction("Bar"); // Error: Cannot resolve action
- /// }
- /// Email Someone!
+(not as sophisticated as it sounds...)
+Email:
+Subject:
+Body:
+ + + diff --git a/Misc/ChromeExtensionSample/03 Popup - Send Email/script.js b/Misc/ChromeExtensionSample/03 Popup - Send Email/script.js new file mode 100644 index 0000000..4bbb18f --- /dev/null +++ b/Misc/ChromeExtensionSample/03 Popup - Send Email/script.js @@ -0,0 +1,8 @@ +window.addEventListener('load', function load(event) { + document.getElementById('send').onclick = function() { + var email = document.getElementById('emailAddress').value; + var subject = document.getElementById('emailSubject').value; + var body = encodeURIComponent(document.getElementById('emailBody').value); + window.open(`mailto:${email}?subject=${subject}&body=${body}`); + }; +}); diff --git a/Misc/ChromeExtensionSample/04 Popup - Buttons/manifest.json b/Misc/ChromeExtensionSample/04 Popup - Buttons/manifest.json new file mode 100644 index 0000000..1df1463 --- /dev/null +++ b/Misc/ChromeExtensionSample/04 Popup - Buttons/manifest.json @@ -0,0 +1,13 @@ +{ + "name": "Button it up!", + "version": "1.0", + "manifest_version": 2, + + "browser_action": { + "default_popup": "popup.html" + }, + + "permissions": [ + "activeTab" + ] +} diff --git a/Misc/ChromeExtensionSample/04 Popup - Buttons/popup.html b/Misc/ChromeExtensionSample/04 Popup - Buttons/popup.html new file mode 100644 index 0000000..5831f38 --- /dev/null +++ b/Misc/ChromeExtensionSample/04 Popup - Buttons/popup.html @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Misc/ChromeExtensionSample/04 Popup - Buttons/script.js b/Misc/ChromeExtensionSample/04 Popup - Buttons/script.js new file mode 100644 index 0000000..c400816 --- /dev/null +++ b/Misc/ChromeExtensionSample/04 Popup - Buttons/script.js @@ -0,0 +1,9 @@ +window.addEventListener('load', function load(event) { + ['khaki','lightblue','palegreen'].forEach(function(color) { + document.getElementById(color).onclick = function() { + chrome.tabs.query({"active":true, "lastFocusedWindow":true}, function(tabs) { + chrome.tabs.insertCSS(tabs[0].id, {'code':`html,body,div,p{background:${color}!important}`}) + }); + }; + }); +}); diff --git a/Misc/ChromeExtensionSample/05 Options/manifest.json b/Misc/ChromeExtensionSample/05 Options/manifest.json new file mode 100644 index 0000000..04070d0 --- /dev/null +++ b/Misc/ChromeExtensionSample/05 Options/manifest.json @@ -0,0 +1,11 @@ +{ + "name": "Options Please", + "version": "1.0", + "manifest_version": 2, + + "options_page": "options.html", + + "permissions": [ + "storage" + ] +} diff --git a/Misc/ChromeExtensionSample/05 Options/options.html b/Misc/ChromeExtensionSample/05 Options/options.html new file mode 100644 index 0000000..c35e907 --- /dev/null +++ b/Misc/ChromeExtensionSample/05 Options/options.html @@ -0,0 +1,5 @@ + +Enter your name:
+ ++ + + + + +Source: https://web.archive.org/web/20000815215258/http://javascript.internet.com/games/maze.html \ No newline at end of file diff --git a/Languages/JavaScript/LegacyJSMaze/js maze 2 - copilot.htm b/Languages/JavaScript/LegacyJSMaze/js maze 2 - copilot.htm new file mode 100644 index 0000000..d698e52 --- /dev/null +++ b/Languages/JavaScript/LegacyJSMaze/js maze 2 - copilot.htm @@ -0,0 +1,357 @@ +
+ + + + + +