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; | |
| class Program | |
| { | |
| static Hashtable GetHashtable() | |
| { | |
| Hashtable hashtable = new Hashtable(); | |
| hashtable.Add(300, "Carrot"); |
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
| // ---------------------------------------------------------------------------------------------- | |
| // Database Fetch for Jquery | |
| //--------------------------------------------------------------------------------------------- | |
| // in this sample, and as described in the article, | |
| // this is a simple method that will connect to the database, | |
| // execute an SQL command and return data in form of a DataTable | |
| public DataTable GetDataTable() | |
| { | |
| DataTable dataTable = new DataTable(); |
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
| 'Syntax for VB | |
| '<System.Web.Script.Services.ScriptMethod()> | |
| '<System.Web.Services.WebMethod()> | |
| [WebMethod] | |
| [ScriptMethod(UseHttpGet=true)] | |
| public string MyNiftyMethod(int myint) | |
| { | |
| // ... code here | |
| } |
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.Data.SqlTypes; | |
| using Microsoft.SqlServer.Server; | |
| public partial class UserDefinedFunctions | |
| { | |
| public const double SALES_TAX = .086; | |
| [SqlFunction()] | |
| public static SqlDouble addTax(SqlDouble originalAmount) | |
| { |
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
| Private _UserCount as Int32 | |
| Public Property UserCount() as Int32 | |
| Get | |
| If ViewState("UserCount") Is Nothing Then | |
| Return 0 | |
| Else | |
| Return Convert.ToInt32(ViewState("UserCount")) | |
| End If | |
| End Get | |
| Set (ByVal value as Int32) |
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
| Imports BusinessLayer | |
| Imports GlobalVBNet | |
| Imports Infragistics.WebUI.UltraWebGrid | |
| Imports Telerik.Web.UI | |
| '**************** user leveling **************** | |
| 'none | |
| '************************************************* | |
| 'for all of the buttons on the top of the division page, we need to make sure that the information can be viewed and NOT edited for a completed division (new 2/11/09) TSP 11/16/09 |
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
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| // uwg is a grid ID. | |
| // always use closest when selecting a specific row | |
| $('[id$=uwgAssignedQualifyingEvents]').delegate("tr", "click", function(e) { | |
| var lostEligibility = $(this).closest('tr').find('td:eq(6)').text(); | |
| if (lostEligibility.length > 1) { | |
| //alert(lostEligibility); | |
| $('[id$=btnAddToTournament]').prop("disabled", true); | |
| $('[id$=btnReQualifyToTournament]').prop("disabled", true); |
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
| // Subtract every number in an array | |
| for(int i=0;i<arrayName.count;i++) | |
| { | |
| arrayName[i]=arrayName[i]-1; | |
| } | |
| // determine if elements are the same in an array | |
| var l = arrayName.SelectMany(_ => _); | |
| bool areSame = l.All(_ => l.FirstOrDefault() == _); |
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
| <?php | |
| /* | |
| WordPress Force Upgrade Script | |
| Copyright (C) 2006 Mark Jaquith | |
| This program is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2 | |
| of the License, or (at your option) any later version. |
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
| OpenQA.Selenium; | |
| OpenQA.Selenium.FireFox; | |
| OpenQA.Selenium.Support.UI; | |
| [TestMethod] | |
| public void TestMethod() { | |
| IWebDriver driver = new FireFoxDriver(); | |
| driver.Navigate().GoToUrl("http://localhost:8080/webpage"); | |
| IwebElement username = driver.FindElement(By.Id("username"); |