Skip to main content

Posts

"Unable to load DLL 'Microsoft.ui.xaml.dll'" error while running unpackaged WinUI 3 project

WinUI 3 project created from a template runs fine in packaged mode ("MsixPackage"). However trying to run in unpackaged mode leads to an exception of loading required libraries. The easiest way to solve this is to make it build as self-contained application. To do so, add the following line into the project file in PropertyGroup section: <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>

Solving MSB6003 Error for ASP.NET Core Docker Image Build

Trying to build a Linux Docker image for ASP.NET Core project with Typescript support leads to a build error "MSB6003: The specified task executable "node" could not be run". The reason is Linux. On Windows, Microsoft.TypeScript.MSBuild includes tsc.exe. On non-Windows platforms, such as in a Docker container, Microsoft.TypeScript.MSBuild does not include ts.exe and instead shells out to a Node for the TypeScript compiler. The official dotnet/sdk Docker images I think included Node at one point in the past, but they no longer include Node. You will either need to make or find a Docker image with both the dotnet-sdk and Node, or configure some multi-stage build involving the official Node image [ 1 ]. Ok, if I know the reason then I will solve it in a minute. I thought. It turned out to be a quest to install the actual version of Node. Official Microsoft's image for dotnet is based on Debian (12 at the moment for .NET 8.0). So, the straight forward way would be u...

Navigating Challenges of AI-Generated Content Globally

Introduction: In the age of technological innovation, artificial intelligence (AI) has undeniably reshaped the landscape of content creation. While the emergence of AI-generated content brings forth opportunities for efficiency and scale, it also introduces challenges that warrant careful consideration. This article delves into the impact of AI-generated articles specifically on the professional networking platform LinkedIn. Our focus will revolve around the critical aspects of transparency, ethical considerations, and the indispensable role of human oversight in maintaining the integrity of information. The Rise of AI-Generated Content: Artificial intelligence, exemplified by powerful models like GPT-3, has ushered in a new era of content creation. Its ability to mimic human language and generate contextually relevant text has found applications ranging from marketing strategies to the development of virtual assistants. The Pollution of Informational Space: Lack of Accountability: One...

Executing asynchronous coroutine (asyncio) synchronously in Python

I worked a lot with async functions in languages other than Python. It's usually very straight-forward and easy to find any answers in internet. It was a surprise that solving a very simple question regarding async in Python took me a day. How to execute an async coroutine in a classic synchronous function? Async library author's position and CPython's GIL made execution of async functions synchronously harder than required. Instead of an exact answer dozens of answers on StackOverflow explain why it is not possible or a bad idea (and a handful of not working suggestions). Ok-ok, I just need a solution! I had to understand how asyncio works to solve this. So, this code allows to synchronously wait for execution completion of async coroutine without a hot spin-lock: def sync_exec ( coroutine : Awaitable ) -> Any :     try :         asyncio . get_running_loop ()     except RuntimeError :         loop = asyncio . new_event_l...

Email clients review 2019

After recent Thunderbird update (v60) which screwed HTML composing even more, to unusable state, I decided to review alternative Windows desktop email clients to replace it. Once again. I have an intention to replace Thunderbird for a long time but there are no real competitors. Does something change in 2019 ? Thunderbird https://www.thunderbird.net/en-US/ Let's review Thunderbird itself first to use it as a base for comparison: Pros: + It has everything modern email client has to have + If it doesn't have something you can extend it with numerous add-ons + Embedded calendar add-on with support of external calendars (Google, ical) + Support of external contact books (Google) Cons: - The only major flaw is its HTML editor. It was not ok previously but they made it even worse in version 60. Verdict: Everything is ok but, damn, is it possible to incorporate some decent HTML editor in it? Outlook https://www.office.com/ The obvious choice is Outlook, the mos...

Automated currency conversion in text

I have created a js script to automatically convert currency on page according to the current rate. Lets say I write "$5" and want to show its value in other currencies. I just need to enclose it in a tag with class = "exchange" and voila: $5 . To enable this behavior you need to link jQuery (add <script src="https://code.jquery.com/jquery-2.1.4.min.js" type="text/javascript"></script> to the head of page) and the script itself (add <script src="https://drclnatj7kvk6.cloudfront.net/currency.js" type="text/javascript"></script> to the bottom of the page). Script is based on http://fixer.io/ and http://openexchangerates.github.io/money.js/ . Fiddle is available here:  https://jsfiddle.net/40rr05fb/42/embedded/result/ . Language and displaying currencies can be easily set. Extending the script is also straightforward. If you dont see the magic, its Google Blogger's issue. Go into the arti...

C# Line Numbering Control for RichTextBox

I have spent some free time to port a control from VB.Net to C# and refactor it a little bit. This UI control attaches to RichTextBox and displays line numbers for the text. The control has many settings and re-paints quickly and exactly. You may get it here: https://github.com/antgraf/C--Numbered-Lines-Control-for-RichTextBox--LineNumbersControlForRichTextBox-

Free embedded databases for C# (.Net) performance overview

I have tested several open-source embedded DB engines for .Net to find which one is the best for my purposes. My choice for testing was: FireBird 2.5 .Net Provider with patch applied sqlite-net r.71 with patch applied System.Data.SQLite 1.0.74.0 (3.7.7.1) x86 Test application I wrote does following actions (and measure consumed time): Prepare DB: Recreate DB & tables (3 tables, 2 non-PK indexes) Create DB: Insert ~500 records to the DB Read All: sequentially read 400 records from the only table (no joins) Read Random: read random 400 records from the only table (no joins) Read / Write All: sequentially read & update 400 records from the only table (no joins) Read / Write Random: read & update random 400 records from the only table (no joins) Results you may see here . FireBird is ~30 times slower on read operations than SQLite but 10-20 times faster on write operations. Overall time wins FireBird. It is 7 times faster. As for SQLite .Net adapters System.Data.DQLite is f...

CakePHP: pagination & sorting on deep associated models (for custom behaviors like Linkable or virtual / aggregated fields)

Using in CakePHP custom behavior (like LinkableBehavior ) or aggregated fields (sql count, max, min , etc queries) or virtual fields in model breaks sorting with PaginationHelper . Trying to sort on field that does not explicitly defined in the model or directly associated models leads to loosing all sorting information. To fix this you need to correct Controller->paginate() method. To do so create file app/app_controller.php if it doesn't exist and define AppController class there. Add paginate() method to it and copy it's content from the same method from cake/libs/controller/controller.php file. After that replace $value = $options['order'][$key]; unset($options['order'][$key]); if (isset($object->{$alias}) && $object->{$alias}->hasField($field)) { $options['order'][$alias . '.' . $field] = $value; } elseif ($object->hasField($field)) { $options['order'][$alias . '.' . $field] = $value; } with $v...

Free issue and bug tracking online services review

To fulfill previous post I want to provide my research on free online issue and bug tracking systems available on the Internet. Surprisingly there are very few of them matching my criteria: 5 users minimum, 10000 tickets minimum, closed for public. Here they are: The only totally free & unlimited is defectr.com . It has limited functionality and funny UI but has no users nor projects limitations. My choice #1 for not complex projects. w3spt.com offers 10000 messages/5 users/100Mb-limited complex integrated project tracking system . It has a lot of custom views and reports such as FAQ, Forum, Feedback zone, Knowledge base . I would recommend it for complex but not huge projects. And the last one I want to mention is teamatic.com . It provides simple tracker for 5 persons with 5Mb attachments storage and nice interface . It may be used for small simple projects.

Choose free online software project tools

I spent a lot of time to choose high-quality online software project tools for free . Some of them are not so "free" other ones have a lot of ads or have low quality. Trying different solutions I chose following: Instant public chat : there is an options. You may create IRC channel on efnet.org or maintain public chat with Skype (BTW Skype supports up to 150 chat members now). Collaborative documents authoring : Google Docs have no competitors in this area. FAQ service : personally I prefer bravenet 's one. Mail list / discussion group : again Google Groups is the best one. Project management : unfortunately I was unable to find any wholly satisfactory project management online service. If you know one please let me know.

Configuring TracAdmin for opensvn.csie.org

In previous post I called opensvn.csie.org one of the best free SVN repositories for closed source . Now I want to show how to configure integrated Trac initially. First of all go to "Manage Your Project" tab and login. Go to "trac" tab and click "interface to trac-admin" link. Enter " permission add username TRAC_ADMIN ", where "username" is your login, to text field and press "Execute" button. After that you may visit your Trac (https://opensvn.csie.org/traccgi/username) and configure it using " Admin " web interface.

Free private unlimited SVN reposirories + Trac

For small non-profit or freelance projects I used free assembla SVN repository and admin page before. After it became paid for closed-source projects I spent a lot of time to find the replacement. Here are my best findings: opensvn.csie.org - the best one. One repo, unlimited space, unlimited users, Trac & Trac admin. svn.xp-dev.com/app - another "the best" one. Unlimited repos (5 initially), unlimited space (300 Mb per repo initially), custom tracker (not very comfortable), unlimited users. unfuddle.com - has both free & paid plans. Free one is 200Mb for 2 persons Git or Subversion repositories, tracker. Unfriendly interface. codespaces.com - only 50 Mb for private repo for 2 users, wiki + tracker. Hope this will be helpful.