Galaxy developers @galaxy_deve Channel on Telegram

Galaxy developers

@galaxy_deve


Hi , A!! I'm ayhan:) @ayhan_Dev @lux_books

Galaxy Developers (English)

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!

Galaxy developers

17 Oct, 16:56


One of the cases where using async/await does not improve performance. This is an issue in EF Core that has been open for about four years now. Saeed explains it beautifully, clearly, and simply in this video (overall, Saeed is a pride for us .NET developers, and he has a very deep knowledge; I personally have learned a lot from him).

www.youtube.com/watch?v=Wet1EHDNSiQ&t=942s


- Galaxy - < #NET >

Galaxy developers

16 Oct, 18:11


🌿 How does the vm module work for creating isolated contexts in Node.js?

The vm module in Node.js allows you to create isolated execution contexts for JavaScript code. This is useful when you need to safely execute third-party code, ensuring it runs in a sandbox without access to the main application.

- In this example, we use the vm module to execute third-party code in an isolated context:

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 }


- Using vm is useful for executing unfamiliar or potentially dangerous code, as it isolates the code execution from the rest of the application.

@Galaxy_Deve - #JS

Galaxy developers

16 Oct, 06:03


لیک یه قسمت دیتابیس نخبگان استان فارس و دانشگاه علوم پزشکی چندتاه دیگه هم هست فعلا بفرما تستر
partial database leak farse provinces elite institute and Farse provinces university of medical for science , just a little tease
محتوا: شناسنامه ، کارت ملی ، عکس شخصی ، مدارک تحصیلی، مدارک حکومتی
Content: national identification, passport, governmental credential , academic credentials

#Data

Galaxy developers

15 Oct, 14:47


Checking Json Schema in .NET

It is often useful to validate JSON documents against a schema. A JSON schema is a dictionary that can be used for annotating and validating JSON documents. For example, you can validate a JSON document received from a REST API or a user-written configuration file. Today let's see how to validate JSON data against a schema in .NET.

💡 In PowerShell, you can use the Test-Json cmdlet to validate JSON data against a JSON schema.

.NET does not natively support JSON schema validation. However, there are several third-party libraries that can be used for validating JSON data against a schema. Here we use the JsonSchema.Net library at https://www.nuget.org/packages/JsonSchema.Net.

Let's create a project:
dotnet new console
dotnet add package JsonSchema.Net

The following code demonstrates how to validate JSON data against a schema:

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);
}
}


- Galaxy - < #NET >

Galaxy developers

15 Oct, 06:48


Podinfo 🌿

A Go microservice template for Kubernetes. This is a small Go-based application that demonstrates best practices for running microservices in Kubernetes, including health checks, graceful shutdown, and more.

github.com/stefanprodan/podinfo


@Galaxy_Deve - #DevOps

Galaxy developers

14 Oct, 18:13


List of channel contents:

Podcast: #padcast
Database: #Data

Group JavaScript: #JS
Group Go: #GO
Group DevOps: #DevOps
Group C#: #NET - #CS

Galaxy developers

13 Feb, 08:12


Channel created