www.youtube.com/watch?v=Wet1EHDNSiQ&t=942s
- Galaxy - < #NET >
Welcome to Galaxy Developers, a Telegram channel dedicated to all things related to software and app development! Whether you're a seasoned developer looking to stay updated on the latest trends or a beginner eager to learn the ropes, this channel is the perfect place for you. With a community of passionate developers, Galaxy Developers offers a platform for knowledge sharing, collaboration, and networking. Stay tuned for tips, tutorials, industry news, and job opportunities in the tech world. Join us today and become a part of our growing community! Who is it? Galaxy Developers is a Telegram channel for developers and tech enthusiasts who are interested in software and app development. What is it? It is a platform for sharing knowledge, collaborating, and networking in the tech industry. Meet like-minded individuals, stay updated on the latest trends, and advance your skills in the world of development. Join Galaxy Developers today and take your expertise to the next level!
17 Oct, 16:56
16 Oct, 18:11
const vm = require('vm');
// Code that we want to execute in an isolated context
const code = 'let x = 10; x += 5; x';
// Create a new context
const context = {};
// Execute the code in the new context
vm.createContext(context);
const result = vm.runInContext(code, context);
console.log('Execution result:', result); // 15
console.log('Context after execution:', context); // { x: 15 }
16 Oct, 06:03
15 Oct, 14:47
using System.Text.Json.Nodes;
using Json.Schema;
var schema = @"
{
""$schema"": ""https://json-schema.org/draft/2020-12/schema"",
""$id"": ""https://example.com/product.schema.json"",
""title"": ""Product"",
""description"": ""A product from Acme's catalog"",
""type"": ""object"",
""properties"": {
""productName"": {
""description"": ""Name of the product"",
""type"": ""string""
},
""price"": {
""description"": ""The price of the product"",
""type"": ""number"",
""exclusiveMinimum"": 0
}
},
""required"": [ ""productName"", ""price"" ]
}
";
var json = @"
{
""productName"": ""test"",
""price"": -1
}
";
var jsonSchema = JsonSchema.FromText(schema);
var result = jsonSchema.Evaluate(JsonNode.Parse(json));
if (!result.IsValid)
{
Console.WriteLine("Invalid document");
if (result.HasErrors)
{
foreach (var error in result.Errors)
Console.WriteLine(error.Key + " : " + error.Value);
}
}
15 Oct, 06:48
14 Oct, 18:13