Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
public class WebApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
RouteTable.Routes.MapRoute("HttpProxy", "proxy/{*path}", new { controller = "Proxy", action = "Http" }) | |
} | |
} |
Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
rabbitmqctl add_user test test | |
rabbitmqctl set_user_tags test administrator | |
rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
; win + v | |
#v:: | |
SendRaw %clipboard% |
function isValidIsraeliID(id) { | |
var id = String(id).trim(); | |
if (id.length > 9 || id.length < 5 || isNaN(id)) return false; | |
// Pad string with zeros up to 9 digits | |
id = id.length < 9 ? ("00000000" + id).slice(-9) : id; | |
return Array | |
.from(id, Number) | |
.reduce((counter, digit, i) => { |
using System; | |
using System.Linq; | |
namespace Extensions | |
{ | |
/// <summary> | |
/// Allow the up to the first eight elements of an array to take part in C# 7's destructuring syntax. | |
/// </summary> | |
/// <example> | |
/// (int first, _, int middle, _, int[] rest) = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; |
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
public class MyDbContext : DbContext | |
{ | |
private ITenantIdLocator tenantIdLocator; | |
public MyDbContext(ITenantIdLocator tenantIdLocator) | |
{ | |
if (tenantIdLocator == null) throw new ArgumentNullException(nameof(tenantIdLocator)); | |
this.tenantId = tenantIdLocator.GetTenantId(); | |
} | |