View Code.cpp
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
#include<iostream> | |
using namespace std; | |
double* getL(double** dataValues,int nPoints,double pointOfInterest) { | |
double den = 1, num = 1; | |
double *L = new double[nPoints]; | |
for (int i = 0; i < nPoints; i++) | |
{ | |
for (int j = 0; j < nPoints; j++) | |
{ | |
if (j != i) |
View DInjectQueuerAPC.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
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
namespace DinjectorWithQUserAPC | |
{ | |
public class Program |
View profile.json
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
// This file was initially generated by Windows Terminal 1.3.2651.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
// You can add more global application settings here. |
View ContextConsumer.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
using (var ctx = new SchoolContext()) | |
{ | |
var stud = new Student() | |
{ | |
StudentName = "Bill" | |
}; | |
ctx.Students.Add(stud); | |
ctx.SaveChanges(); | |
} |
View SchoolContext.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
public class SchoolContext: DbContext{ | |
public SchoolContext():base(){} | |
public DbSet<Student> Students; | |
public DbSet<Grade> Grades; | |
} |
View Student.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
public class Student{ | |
public int ID { get; set; } | |
public string Name { get;set;} | |
public Grade Grade { get; set; } | |
} |
View Grade.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
public class Grade{ | |
public int GradeId { get; set; } | |
public string GradeName { get; set; } | |
public ICollection<Student> Students { get; set; } | |
} |
View QueryingList.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
IList<string> stringList = new List<string>() | |
{ | |
"C# Tutorials", | |
"TS Tutorials", | |
"Learn python", | |
"nodejs Tutorials" , | |
"adonisjs" | |
}; // LINQ Query Syntax | |
var result = stringList.Where(s => s.Contains("Tutorials")); |
View RetrieveDataFromBlockingCollection.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
Task t2 = Task.Run(() => | |
{ | |
try | |
{ | |
while (true) | |
Console.WriteLine(bc.Take()); | |
} | |
catch (InvalidOperationException) |
View AddDataInBlockingCollection.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
BlockingCollection<int> data = new BlockingCollection<int>(); | |
Task t1 = Task.Run(() =>{ | |
data .Add(1); | |
data .Add(2); | |
data .Add(3); | |
data .CompleteAdding(); | |
}); |
NewerOlder