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
//Refereces | |
// 1. https://www.geeksforgeeks.org/expression-evaluation/ | |
// 2. https://en.wikipedia.org/wiki/Shunting-yard_algorithm | |
/* | |
* Usage : var x = new ExpEvaluator().evaluate('100 * ( 2 + 12 )') : 1400 | |
*/ | |
class ExpEvaluator{ | |
determineOperatorPrec(x,y){ |
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
<?php | |
final class PhabricatorStandardCustomFieldSelect | |
extends PhabricatorStandardCustomField { | |
//***************// | |
//Existing Code here | |
//**************// | |
/* |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Text; | |
namespace TowersOfHanoi | |
{ | |
public class Program | |
{ |
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
I have been reading through the sample for [Cookie][1] based auth implementation by the ASP .NET core team. When I implemented a similar startup.cs file and tried to login I get a runtime exception | |
`InvalidOperationException: No authentication handler is configured to handle the scheme: Cookies` | |
How am I supposed to configure an application handler to validate my cookies? | |
Here's my code for reference. | |
**Configure method from Startup.cs** |
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
// Creating object with frozen properties that cannot be modified once initialized | |
// Useful for singleton and for implementing private properties that can be protected from malicious | |
// or unintended modifications | |
sessionStorage.setItem('doNotChangeValue') = 123; | |
const propProvider = (function(){ | |
let A = -1; | |
let B = 'someValue'; | |
let C = sessionStorage.getItem('doNotChangeValue'); | |
return{ | |
getPropA : function(){ |
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
using System; | |
namespace IntegerMultiplication | |
{ | |
class Karatsuba | |
{ | |
static void Main(string[] args) | |
{ | |
Console.Write(new Karatsuba().multiply(args[0], args[1])); | |
Console.Read(); |