c# – How to create a modular system of multiple .NET Core applications extending a single application?

So first of all let me explain what I want to achieve:

I want to create a basic .NET Core console application which is responsible for loading external extensions (more on this later on), listening for events, connection handling etc.

Let’s assume this application is a Discord bot or Amazon’s Alexa. It is responsible for starting, shutting down, connecting and so on.

But you want to provide a system to extend this basic application with a plug n play system. So instead of extending the core repository you would create another repository with a .NET Core library which provides a new feature/command/skill.

At the end you would have a core application in one repository and multiple repositories extending the core application.

How to develop this?

Let’s assume

  • Developer A creates the core application in a repository myApp.core
  • Developer B wants to create a “Hello World” command in a separate repository myApp.extensions.hello-world
  • Developer C wants to create a “Ping” command in a separate repository myApp.extensions.ping

Developer A could work on the application it’s easy to test locally.

Developers B and C create libraries for their features. To get their libraries loaded into the application Developer A loads all DLL files from a specific directory “Extensions” during startup.

But how could Developers B and C test their new features if they want to debug the libraries in their IDEs? They can’t run that library so they have to test that library by running the core application.

Things might get tricky if developer A is an employee and developer B and C are just customers creating their own commands but don’t have access to the core application.

So how would developers B and C debug their libraries locally then? Are there any better approaches for this? Maybe Docker helps out?

SMO, Random forest and Bayes net algorithms: why does Random forest perform better?

I analyzed a dataset using those 3 different algorithms.
As I can see, Random forest performs better in most cases.
My dataset is composed of 4000 instances of two classes (class A 2000 elements, class B 2000 elements).
I use 207 metrics to classify the instances, but I also use the first 20 or 10 best metrics for InformationGain.
My question is: why sometimes an algorithm performs better than another one (in this case I’m only comparing this 3).
I read about them but I would like to have a complete scenario of why in some case RF is better than Bayes net and why sometimes is the opposite. And why SMO is always worst than the other two, in my experiences. Thank you so much!

algorithms – Readers writers petri net

Suppose the readers writers problem had a third process where they can both read and write. So we have readers that can only read, writers that can only write, and rw that can both read and write. What would a petri net look like that modelled this?

Does anyone know of a source that would show this?

anyway i can stop getting .net core 5.0 packages in nuget package update for my .net core 3.1 applications

is there anyway i can stop getting .net core 5.0 packages in nuget package update for my .net core 3.1 application.
I have some .net core console application (which runs as windows service in windows while systemd service in linux) and some web api application of runtime 3.1
In package manager update i am keep getting
following is sample update for my console application

enter image description here

magisk – How to install EdXposed on Android 11? What about safety net?

Like I mentioned in the question, a major problem with EdXposed is lack of documentation. There is an (OFFICIAL) EdXposed – The successor of Xposed (Oreo/Pie/Q/R, 2020/07/19) thread opened by Mlgmxyysd, one of EdXposed main developers but, sadly doesn’t provide any useful information.

EdXposed canary version supports Android 11 for the last couple of months. With the latest canary version released a couple of days ago, major bugs have been fixed and I consider it usable and hence this post.

Information is valid as of writing. Things will change and if you want to improve the answer by editing or posting a new answer, please do.

This is NOT a support thread. I am not frequenting SE,and therefore cannot answer your questions.


Pre-requisites (need to be updated from sources or as prompted by EdXPosed manager).

  • Magisk v21 + , with Magisk Manager from official Magisk thread. Note that some devices play well with certain versions of Magisk so it’s better to search device threads in XDA for appropriate Magisk version for your device.

  • Riru-core latest release from Magisk modules or from GitHub.

  • EdXposed canary drivers YAHFA/Sandhook from EdXposed manager v4.5.7. And the EdXposed manager

This being a canary version, installation is unconventional

  • Obviously you have a rooted device running Android 11, with Magisk installed.

  • Install EdXposed Manager v4.5.7.

  • From the canary tab download the YAHFA/ Sandhook drivers (zip) . Note that downloaded version may have a different name from the file name in canary tab, in my case
    EdXposed-YAHFA-v0.5.0.6-android_r (4565) release.zip (note that it is marked as release for Android R, so one can soon expect official support)

  • Install Riru-core module first from Magisk Repo. Don’t reboot.

  • Install downloaded YAHFA or Sandhook using install from storage option of Magisk.

  • Reboot and profit!

YAHFA or Sandhook drivers?.

YAHFA is relatively slower but stable by most accounts compared to Sandhook. You would need to check XDA for what works best for your device/Android version. For me, it has been YAHFA on my earlier and current device. In addition, you may be better off installing YAHFA , if root detection is a concern. As Mlgmxyysd says in her tweet

SandHook has faster boot speed, but leaves pre-compiled files in the cache, which can be detected by some apps

Modules

  • Xposed module development isn’t what it used to be so there are only a few Android 11 ready Xposed modules. The ones I care for are:

  • If you reading this, it’s likely you may be tempted to try other modules too. If they work, please update here. But if they don’t work and create freezes, reboots , system lags (pretty common symptoms), you need to disable those modules without a nuclear factory-reset. Earlier, one needed other modules or getting into custom recovery to get rid of the offending modules. Thankfully, it’s become easier since Magisk V21.0(see changelog). Now, it’s as simple as getting into safe-mode and rebooting! Magisk FAQ says

Q: I installed a module and it bootlooped my device. Help!

If you have USB debugging enabled in developer options, connect your phone to the PC. If your device is detected (check by adb devices), enter ADB shell and run the command magisk --remove-modules. This will remove all your modules and automatically reboot the device.

If unfortunately you do not have USB debugging enabled, reboot into Safe Mode. Most modern Android devices support pressing a special key combo at boot to enter Safe Mode as an emergency option. Magisk will detect Safe Mode being activated, and all modules will be disabled. Then reboot back to normal mode (the module disable state persists) and manage your modules through Magisk Manager.

Not recommended

VirtualXposed has all the apps running under its supervision share the same android uid, defeating most Android sandboxing guarantees.
In short, it’s considered very insecure, by orders of magnitude more than the regular Xposed/EdXposed.

tl:dr; Very unlikely, be ready to forego passing safety net

  • For starters, even unlocking bootloader trips safety net on Pixel 4a, as reported and checked by me on my device . Unlocking bootloader also renders device uncertified. Thankfully apps can be downloaded. Workarounds exist for this problem but one isn’t sure how long it would work.

  • My other device OnePlus7 on Android 10, used to pass safety net but not anymore.

  • If you do overcome this first hurdle (may be older device), you have the next problem – how is Google checking? Is it Basic integrity check or Hardware attestation? ( For details see my answer here Magisk will fail Safety-Net hereafter. Why?). If you are lucky enough to have basic check , you may pass (not always, my OnePlus 7 has basic check and still fails, despite flashing full factory ROM and no changes made to /system, never even mounted it rw)

  • Third obstacle is whether EdXposed Framework or installed modules trip safety net? Results awaited from those who cross the first two obstacles. I am yet to come across anybody who has reported safety net pass on Android 11 with Edxposed installed.

As always, happy Xposing 🙂

.net – Quando usar record ou class no C#?

Uma das novidades do C# 9 são os record types, vi que uma das maiores diferenças entre eles e as classes são os métodos .ToString() e .Equals() que tem um comportamento diferente. Porém quero saber se eu deveria levar em consideração outros pontos além desses métodos quando for escolher entre usar um ou outro, ou fazer essa comparação entre eles não está correta?

Resumindo: Quando eu deveria escolher entre usar class ou record?

C# .NET packet handle and edit

I’m trying to edit something in mmorpg bot. Issue is editting an packet.

it’s a packet handler and I want to dont send an packet and send my packet.Here the codes.

case 51966:
              {
                  
                  string packhwıd = ("30005E514A434C4D5755405B4" + RandomString(19) + "71736473222D224A" + RandomString(14) + "550E4042413020243B4508410E");
                  string packetohwıd = ToHexString(packhwıd);
                  
                  Packet packethwıd = new Packet((ushort)51966, false, enumDestination.Server);
                  packethwıd.data.AddSTRING(packetohwıd, enumStringType.ASCII);
                  Globals.ServerPC.SendPacket((object)packethwıd);
                  MessageBox.Show(packhwıd);
                 
              }
            break;

and here the add sting codes

public void AddSTRING(string value, enumStringType type)
  {
    this._len += 2;
    Array.Resize<byte>(ref this._data, this._len);
    Array.ConstrainedCopy((Array) BitConverter.GetBytes(value.Length), 0, (Array) this._data, this._len - 2, 2);
    if (type == enumStringType.ASCII)
    {
      this._len += value.Length;
      Array.Resize<byte>(ref this._data, this._len);
      Array.ConstrainedCopy((Array) Encoding.ASCII.GetBytes(value), 0, (Array) this._data, this._len - value.Length, value.Length);
    }
    else if (type == enumStringType.UNICODE)
    {
      this._len += value.Length;
      Array.Resize<byte>(ref this._data, this._len);
      Array.ConstrainedCopy((Array) Encoding.Default.GetBytes(value), 0, (Array) this._data, this._len - value.Length, value.Length);
    }
    else
    {
      this._len += value.Length * 2;
      Array.Resize<byte>(ref this._data, this._len);
      Array.ConstrainedCopy((Array) Encoding.Unicode.GetBytes(value), 0, (Array) this._data, this._len - value.Length * 2, value.Length * 2);
    }
  }

**ı want to send this code with 50 **

this is my packet

**But program send this **

program send

.net – ¿Cómo realizar group en pipeline usando el driver C# de mongodb?

lo que estoy tratando de realizar es implementar el siguiente query de mongo usando solamente la sintaxis del driver mongo para c#.

db.afectaciones.aggregate((
   { $match:{
  $and:
    (
     {"fechaApertura._value": { $gte: ISODate("2020-07-04T21:00:00.123Z") }},
     {"fechaApertura._value": { $lte: ISODate("2020-07-04T21:50:00.123Z") }},
     {"fechaCierre._value": { $gte: ISODate("2020-07-04T22:00:00.123Z") }},
     {"fechaCierre._value": { $lte: ISODate("2020-07-04T22:50:00.123Z") }},
     {"idEmpresa": 1}
    )
}},
{"$unwind":"$fechaApertura"},
{"$unwind":"$fechaCierre"},
{"$sort":{"fechaApertura._created_at":-1,"fechaCierre._created_at":-1 }} ,
{"$group": {_id: "$_id","fechaApertura": { "$first": "$fechaApertura" },
"fechaCierre": { "$first": "$fechaCierre" }}},
{ "$match":{
  "$and":(
     {"fechaApertura._value": { $gte: ISODate("2020-07-04T21:00:00.123Z") }},
     {"fechaApertura._value": { $lte: ISODate("2020-07-04T21:50:00.123Z") }},
     {"fechaCierre._value": { $gte: ISODate("2020-07-04T22:00:00.123Z") }},
     {"fechaCierre._value": { $lte: ISODate("2020-07-04T22:50:00.123Z") }}
    )
}} ))

Quiero usar la sintaxis del driver c# porque me parece mas legible, lo que llevo hasta el momento es:

 DateTime fechaOperacion = new DateTime(2020, 7, 4, 0, 0, 0);
            DateTime fechaDeInicioDelDiaDeOperacion = fechaOperacion.Date;
            DateTime fechaDeFinDelDiaDeOperacion = fechaOperacion.Date.AddHours(23).AddMinutes(59).AddSeconds(59);
            DateTime fechaDeFinDelReporteCierre = fechaDeInicioDelDiaDeOperacion.AddDays(1).AddHours(limiteHorasReporteCierreLac);

            FilterDefinition<Afectacion> filtros = Builders<Afectacion>.Filter.Gte("fechaApertura._value", fechaDeInicioDelDiaDeOperacion)
                & Builders<Afectacion>.Filter.Lte("fechaApertura._value", fechaDeFinDelDiaDeOperacion)
                & Builders<Afectacion>.Filter.Gte("fechaCierre._value", fechaDeInicioDelDiaDeOperacion)
                & Builders<Afectacion>.Filter.Lte("fechaCierre._value", fechaDeFinDelReporteCierre)
                & Builders<Afectacion>.Filter.Eq("idEmpresa", empresa);

            var st0 = PipelineStageDefinitionBuilder.Match<Afectacion>(filtros);
            var st1 = PipelineStageDefinitionBuilder.Unwind<Afectacion, Afectacion>(x => x.FechasAperturas);
            var st2 = PipelineStageDefinitionBuilder.Unwind<Afectacion, Afectacion>(x => x.FechasCierres);
            var sort = Builders<Afectacion>.Sort.Descending("fechaApertura._created_at").Descending("fechaCierre._created_at");
            var st3 = PipelineStageDefinitionBuilder.Sort<Afectacion>(sort);

     
//Falta group 


            var pipeline = PipelineDefinition<Afectacion, Afectacion>.Create(
                new IPipelineStageDefinition() { st0, st1, st2, st3 });

            var resultado = await collection.AggregateAsync(pipeline).Result.ToListAsync();

No he podido realizar el group para el pipeline, he intentado realizar esta consulta usando linq pero tampoco lo he logrado.

Remarkable Abcourt Gross Profit of $1,940,767 & A Net Profit $358,856 for annual 2020 – Other Money Making Opportunities

“ABCOURT IS PLEASED TO REPORT A GROSS PROFIT OF $1,940,767 AND A NET PROFIT OF $358,856 FOR ANNUAL 2020”. Here are the amazing highlights which needs your attention if you are the real Mining Student or Professional. Along with the highlights here are few exciting recent developments successfully done by Abcourt Mines Inc.

Highlights:

  • Revenues of $24 057 233 for fiscal 2020.
  • Gross profit of $ 1 940 767. Net profit of $358,856
  • Adjusted net profit of $4,259,151
  • Costs of sales reduced by $3,1M or 12.4 %
  • Gold inventory of $2,544,974, that is 1,400 ounces
  • Cash cost of $1,636 Can/oz, $US 1,228 /oz of gold
  • Ounces produced 12,180, sold 11,640
  • All-inclusive cost of $1,950 /oz
  • Net profit of fourth quarter $ 431 498
  • 6 000 Tonnes of broken muck in stopes with an investment value of about $800,000.
  • The Company has no long-term debt. It finances itself with its operating revenues.

Recent developments:

  • Drifting on 4Th, 10Th and 11Th levels at Elder mine to open new ore zones.
  • Rehabilitation work being done in shafts and drifts at Sleeping Giant mine to develop new or zones on upper levels.
  • $448,815 raised by the exercise of the 2019 warrants.
  • Two explosive permits received for our Sleeping Giant project

About Abcourt Mines Inc.

Abcourt Mines Inc. is a gold producer and a Canadian exploration company with strategically located properties in northwestern Quebec, Canada. The Elder property has gold resources (2018). Abcourt is currently focusing on the exploitation of the Elder mine. In 2016, Abcourt acquired the Sleeping Giant mine and mill, located half-way between Amos and Matagami, in Abitibi, Province of Quebec. The mill has a capacity of 700 to 750 tonnes per day. To read more about the Abcourt Mines Inc. you can gather information from this amazing Canadian blog http://abcourt.com/. This is not just blog or a company profile but also it is best news platform about Abcourt. 

The adjusted net profit is a measure of performance that members of the direction use to evaluate the performance of activities by the Company. Without taking into account the accounting policies, laws and the structure of capital as these elements may potentially give a wrong representation of the capacity of the Company to generate cash with its operation. The adjusted net profit excludes interest expenses, taxes and amortization.

The cash costs and all-in sustaining costs are common performance measures in the gold mining industry. The Company reports cash cost per ounce based on ounces produced. Cash cost include operating mining costs and royalties but is exclusive of amortization and depletion and sustaining capital expenditures. The all-in sustaining costs include costs of sales and sustaining capital expenditures and administrative costs but exclude amortization and depletion and accretion
expenses. The Company believes that the all-in sustaining costs present a complete picture of the Company’s operating performance or its ability to generate free cash flows from its operation. From this https://abcourt.com/wp-content/uploads/2020/11/PR30-10-2020.pdf, you can easily get the comprehensive detail about the same.

[Vn5socks.net] Auto update 24/7 – Good socks 12h00 PM


LIVE ~ 24.249.199.14:57335 | 0.304 | Unknown | Unknown | Unknown | United States | Checked at vn5socks.net
LIVE ~ 37.46.150.169:5566 | 0.346 | Unknown | Unknown | Unknown | Russian Federation | Checked at vn5socks.net
LIVE ~ 47.49.12.165:51861 | 0.27 | Ottawa | ON | k1y4h7 | Canada | Checked at vn5socks.net
LIVE ~ 39.105.192.77:9999 | 0.303 | Unknown | Unknown | Unknown | Hong Kong | Checked at vn5socks.net
LIVE ~ 95.179.177.235:6688 | 0.254 | Unknown | Unknown | Unknown | Greece | Checked at vn5socks.net
LIVE ~ 47.49.12.168:31261 | 0.258 | Ottawa | ON | k1y4h7 | Canada | Checked at vn5socks.net
LIVE ~ 82.165.137.115:7061 | 0.287 | Unknown | Unknown | Unknown | Germany | Checked at vn5socks.net
LIVE ~ 124.156.217.41:1089 | 0.075 | Shenzhen | 30 | Unknown | China | Checked at vn5socks.net
LIVE ~ 172.104.47.242:9052 | 0.046 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
LIVE ~ 108.61.75.207:9000 | 0.258 | Piscataway | NJ | 08854 | United States | Checked at vn5socks.net
LIVE ~ 157.245.231.94:9090 | 0.18 | Eugene | OR | 97402 | United States | Checked at vn5socks.net
LIVE ~ 158.69.243.148:9999 | 0.268 | Lake Forest | CA | 92630 | United States | Checked at vn5socks.net
LIVE ~ 41.78.24.126:9999 | 0.407 | Unknown | Unknown | Unknown | Kenya | Checked at vn5socks.net
LIVE ~ 159.89.237.201:40001 | 0.25 | Vancouver | BC | v7y1j7 | Canada | Checked at vn5socks.net
LIVE ~ 185.14.31.113:443 | 0.273 | Unknown | Unknown | Unknown | Europe | Checked at vn5socks.net
LIVE ~ 202.62.45.53:55087 | 0.067 | East Kew | 07 | Unknown | Australia | Checked at vn5socks.net
LIVE ~ 209.126.13.138:42958 | 0.223 | Saint Louis | MO | 63146 | United States | Checked at vn5socks.net
LIVE ~ 220.248.188.75:17211 | 0.497 | Unknown | Unknown | Unknown | China | Checked at vn5socks.net


FireHeaven
Reviewed by FireHeaven on
.
[Vn5socks.net] Auto update 24/7 – Good socks 12h00 PM
LIVE ~ 24.249.199.14:57335 | 0.304 | Unknown | Unknown | Unknown | United States | Checked at vn5socks.net
LIVE ~ 37.46.150.169:5566 | 0.346 | Unknown | Unknown | Unknown | Russian Federation | Checked at vn5socks.net
LIVE ~ 47.49.12.165:51861 | 0.27 | Ottawa | ON | k1y4h7 | Canada | Checked at vn5socks.net
LIVE ~ 39.105.192.77:9999 | 0.303 | Unknown | Unknown | Unknown | Hong Kong | Checked at vn5socks.net
LIVE ~ 95.179.177.235:6688 | 0.254 | Unknown | Unknown |

Rating: 5



.