Posts

Showing posts from 2018

TRIM Unwanted Characters from String in SQL (Quick Tip)

Small thing. Useful thing. I didn’t know that TRIM in SQL can remove specific characters — not only spaces. Example TRIM ( '.,! ' FROM '# test .' ) What It Does This removes any of the following characters from both sides of the string: Dot . Comma , Exclamation mark ! Space The result: '# test' Why It’s Useful Cleaning imported data Sanitizing user input Preparing text before comparison Normalizing values for indexing Short. Simple. Powerful.

Error Starting SQL Server 2017 Service – Error Code 3417 (Code Page 65001 Fix)

This was already the third time I had to uninstall and reinstall SQL Server 2017 Developer Edition on my local machine. Everything worked fine for a few days. Then suddenly the service refused to start with: Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online. Error Code 3417 – The Symptom I tried everything: Checking permissions on master.mdf Security changes Service account verification Full uninstall and reinstall Nothing worked. Then I checked the SQL Server error log more carefully and noticed this line appearing before the main failure: Error: 2775, Severity: 17, State: 12. The code page 65001 is not supported by the server The Plot Twist I went to Google and found this article . The author basically talked with himself — logs, screenshots, assumptions, theories — debugging in public. ...

Please welcome our new application - ArtPlayBox!

Image
Hi all, Please welcome our first Android application ArtPlayBox ! It's designed for tablets but supports smartphones as well.  Reviews, stars and post shares will be very appreciated! :-) Thank you in advance!

Company Site Update

I make some changes in my site. The most of them is a prototype of universal content localization engine that can be applyed on web content without changes in DB or server-side code. It's a good start for Language Medium platform that is going to be easy and useful. NOTE: not all text content is localized to Russian right now - only menu, first section and few first Projects. It's becasue the engine is without BackOffice right now and all translations I'm adding  directly in DB:-) But don't worry - it will be soon B-) Also there are links to projects pages and some of them are real :-)

Remove Items From One List That Exist in Another List by ID in C#

Sometimes you need to remove elements from one collection if they already exist in another collection. The comparison is usually based on an identifier (ID). After testing several approaches, this turned out to be the cleanest and most readable solution using LINQ: lst1.RemoveAll(itemFromLst1 => lst2.Any(itemFromLst2 => itemFromLst2.ID == itemFromLst1.ID)); What This Code Does The logic can be read as: For each item in lst1 Check if any item in lst2 has the same ID If yes — remove it from lst1 In other words, this removes all elements from lst1 whose IDs already exist in lst2 . Why This Approach Works Well Concise and expressive No manual loops required No temporary collections needed Uses built-in List<T>.RemoveAll method The method RemoveAll modifies the list in place, which is often exactly what you want in filtering scenarios. Performance Consideration This solution uses Any() inside RemoveAll() , which means it performs a nest...

Pluralizing Words in C# (.NET) Using PluralizationService

Today I needed to generate a dynamic page title based on a category name. For example: My Playlists My Libraries My Categories The page receives a categoryID parameter, retrieves the corresponding category object, and then dynamically pluralizes the category name. Using PluralizationService in .NET .NET provides a built-in service for pluralization via System.Data.Entity.Design.PluralizationServices . using System.Data.Entity.Design.PluralizationServices; .... Category category = Category.GetByID(categoryID); PluralizationService ps = PluralizationService.CreateService( new System.Globalization.CultureInfo( "en-GB" )); Page.Title = $"My { ps.Pluralize( category .Name) }" ; ..... Important Note You must add a reference to System.Data.Entity.Design in your project. When to Use This This approach is useful when: Generating dynamic titles Building admin dashboards Creating REST endpoints with plural resource names Displaying catego...

MongoDB Atlas Cloud Cluster Test – Connecting to .NET Successfully

Today I performed an initial test of MongoDB Atlas , the managed MongoDB Cloud Cluster that can run on different cloud providers. The full setup — from cluster creation to a working connection — took roughly one hour. For a managed distributed database platform, that timing is impressive. Environment Setup The goal was simple: Create a MongoDB Atlas cluster Configure network access Create a database user Connect from a .NET application The cluster provisioning itself was straightforward. The UI is clear, and the workflow is linear: project → cluster → security → connection. Connecting MongoDB Atlas to a .NET Application I successfully connected the cluster to a .NET application using the official MongoDB driver. This was particularly satisfying because about half a year ago, in a previous company, we failed to make it work. At the time, the issue seemed complex. Now I know the root cause. It was only an incorrect connection string. No networking issue. No fir...

Information and methods to handle it

Image

Low Disk Space on Recovery Drive Windows 10 — The Saga (And the Real Fix)

Image
A few months after a major Windows 10 update, I started getting the most annoying notification ever: The message appeared randomly. No pattern. No clear cause. Just constant irritation. The Situation My system looked like this: Disk D: is removable. C: and E: live on the same HDD. Siblings. So my logical plan was simple: shrink C:, extend E:, silence the warning. Disk Management Reality I opened Disk Management and saw this: E: did not have the same options as other partitions. No “Extend Volume…” available. The “Smart” Attempt I shrank C: by 2GB using “Shrink Volume…”. Unallocated space appeared between C: and E:. Then began the classic “dance with tambourine around the campfire”: Move partition Merge attempt Allocate space Retry Nothing worked. Third-Party Tools Trial Search results pointed to third-party partition managers. I tested multiple vendors, including Paragon Hard Disk Manager and Macrium Reflect. None of th...

SQLite to MS SQL – Import Script Using Linked Server

This post continues the previous article about connecting SQLite to SQL Server using an ODBC driver and a Linked Server. The script below retrieves table metadata from the SQLite linked server into a table variable and prepares a cursor over the table names. This can be used as a base for further automation or dynamic import logic. Retrieve Table Metadata declare @temp table ( col1 varchar(255), col2 varchar(255), [name] varchar(255), [type] varchar(255), col3 varchar(255) ) insert @temp exec sp_tables_ex 'Your_LinkedServer_Name' select * from @temp Create a Cursor Over Table Names DECLARE lstTables CURSOR FOR select [name] from @temp Important Notes The Linked Server must already be configured using the MSDASQL provider. The ODBC DSN must be created as a System DSN , not a User DSN. Make sure the DSN name matches the one used when creating the Linked Server. Do not use spaces in the DSN name to avoid query issues in SQL Server. Summ...

How to Import SQLite Database into MS SQL Server Using ODBC (Step-by-Step Guide)

Image
This guide explains how to connect a SQLite database file to Microsoft SQL Server using an ODBC driver and Linked Server configuration. The same ODBC DSN can also be used to open the database in MS Access. Overview The core requirement is creating a System DSN using a SQLite ODBC driver. Once configured, SQL Server can access the SQLite file through a Linked Server. Step 1 — Install SQLite ODBC Driver Download and install the appropriate version (match SQL Server bitness): http://www.ch-werner.de/sqliteodbc/ Step 2 — Create a System DSN Open ODBC Data Source Administrator: 64-bit: C:\Windows\System32\odbcad32.exe 32-bit: C:\Windows\SysWOW64\odbcad32.exe Create a System DSN and select “SQLite3 ODBC Driver”. Important: Do NOT use spaces in the DSN name. SQL queries against Linked Servers may fail if spaces are used. Step 3 — Create a Linked Server in SQL Server Run the following in SQL Server Management Studio: EXEC sp_addlinkedserver @server = 'SQ...

AliExpress Extention

Image
This is a first finished and published project today! :-) AliExpress Order Extractor

FB page created!

Company branded page was created today. Take a look! https://www.facebook.com/OxymoronTech

The blog embedded to the site

Today I did insertion of blog feed into the company site. That's how it looks: http://oxymoron-tech.oxy.co.il/Blog.aspx

Workspace of profi

Image
This is Workspace 😎

New office

Image
This is my new office (Phase 1) 😎 The process: