This file contains 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
function resolveAfter2Seconds() { | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
resolve('resolved'); | |
}, 2000); | |
}); | |
} | |
async function asyncCall() { | |
console.log('calling'); |
This file contains 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
IEnumerable object GetData() { | |
string sql = "SELECT * FROM Person WHERE FirstName = @FirstName And LastName = @LastName | |
And Company = @Company And Title = @Tile And Email = @Email"; | |
var parameter = new DynamicParameters(); | |
parameter.Add("@Id",con.Id,dbType: DbType.Int32,direction:ParameterDirection.InputOutput); | |
parameter.Add("@FirstName", con.FirstName); | |
parameter.Add("@LastName", con.LastName); | |
parameter.Add("@Company", con.Company); |
This file contains 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
// Abstract class | |
abstract class Animal | |
{ | |
// Abstract method (does not have a body) | |
public abstract void animalSound(); | |
// Regular method | |
public void sleep() | |
{ | |
Console.WriteLine("Zzz"); | |
} |
This file contains 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 virtual void MakeSound() | |
{ | |
Console.WriteLine("The animal makes a sound"); | |
} | |
public override void MakeSound() | |
{ | |
Console.WriteLine("The cat meows"); | |
} |
This file contains 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
--WebForm | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
/* Popup container - can be anything you want */ | |
.popup { | |
position: relative; | |
display: inline-block; |
This file contains 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, int) FindInsertProc(int upcId, int store, DateTime endDate) | |
{ | |
var globalDB = new GlobalDBUtilities(); | |
var parameters = new List<OracleParameter> | |
{ | |
globalDB.OracleParameterWithValue(":Vupc_id", OracleDbType.Int32, upcId), | |
globalDB.OracleParameterWithValue(":Vstore", OracleDbType.Int32, store), | |
globalDB.OracleParameterWithValue(":Beg_date", OracleDbType.Date, DateTime.Now), | |
globalDB.OracleParameterWithValue(":End_date", OracleDbType.Date, endDate), | |
globalDB.OracleParameterWithValue(":Data_source", OracleDbType.Varchar2, "SHELFMAN"), |
This file contains 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
/* Formatted on 2/1/2024 10:10:51 AM (QP5 v5.381) */ | |
DELETE FROM IMPROD.SM_SYS_MENU_STORES | |
WHERE 1 = 1; | |
DECLARE | |
CURSOR stores IS | |
SELECT STORE | |
FROM improd.store a | |
WHERE store_status = 0 | |
AND pos_close_Date IS NULL |
This file contains 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
/// <summary> | |
/// Associate (link/bind) an ESL to an item | |
/// </summary> | |
/// <param name="store">Store Number</param> | |
/// <param name="itemID">Item Identifier</param> | |
/// <param name="eslID">ESL Identifier</param> | |
/// <returns>Link response</returns> | |
public HanshowIntegrationResponse Pair(int store, string itemID, string eslID, string useFamilyDescription, string userId) | |
{ | |
try |
This file contains 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
if (HttpContext.Current.Cache.Get("ef_results") == null) | |
{ | |
var results = null; // todo: get results from EF | |
HttpContext.Current.Cache.Add("ef_results", // cache key | |
results, // cache value | |
null, // dependencies | |
System.Web.Caching.Cache.NoAbsoluteExpiration, // absolute expiration | |
TimeSpan.FromMinutes(30)); // sliding expiration | |
} |
This file contains 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
/* Formatted on 2/1/2024 10:10:51 AM (QP5 v5.381) */ | |
DELETE FROM IMPROD.SM_SYS_MENU_STORES | |
WHERE 1 = 1; | |
DECLARE | |
CURSOR stores IS | |
SELECT STORE | |
FROM improd.store a | |
WHERE store_status = 0 | |
AND pos_close_Date IS NULL |
NewerOlder