The team said that “most of their effort to improve the .NET Core Docker experience in the last year has been focused on .NET Core 3.0.” “This is the first release in which we’ve made substantive runtime changes to make CoreCLR much more efficient, honor Docker resource limits better by default, and offer more configuration for you to tweak”.
اجرای PHP بر روی NET Core.
استفاده از Full Text Search بر روی اسناد XML
نحوهی استفاده از Full Text Search بر روی ستونهای XML ایی
برای آزمایش، ابتدا یک جدول جدید را که حاوی ستونی XML ایی است، ایجاد کرده و سپس چند سند XML را که حاوی متونی نسبتا طولانی هستند، در آن ثبت میکنیم. ذکر CONSTRAINT در اینجا جهت دستور ایجاد ایندکس Full Text Search ضروری است.
CREATE TABLE ftsXML( id INT IDENTITY PRIMARY KEY, doc XML NULL CONSTRAINT UQ_FTS_Id UNIQUE(id) ) GO INSERT ftsXML VALUES(' <book> <title>Sample book title 1</title> <author>Vahid</author> <chapter ID="1"> <title>Chapter 1</title> <content> "The quick brown fox jumps over the lazy dog" is an English-language pangram—a phrase that contains all of the letters of the English alphabet. It has been used to test typewriters and computer keyboards, and in other applications involving all of the letters in the English alphabet. Owing to its brevity and coherence, it has become widely known. </content> </chapter> <chapter ID="2"> <title>Chapter 2</title> <content> In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the graphic elements of a document or visual presentation. By replacing the distraction of meaningful content with filler text of scrambled Latin it allows viewers to focus on graphical elements such as font, typography, and layout. </content> </chapter> </book> ') INSERT ftsXML VALUES(' <book> <title>Sample book title 2</title> <author>Farid</author> <chapter ID="1"> <title>Chapter 1</title> <content> The original passage began: Neque porro quisquam est qui dolorem ipsum quia dolor sit amet consectetur adipisci velit </content> </chapter> <chapter ID="2"> <title>Chapter 2</title> <content> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </content> </chapter> </book> ') GO
CREATE FULLTEXT CATALOG FT_CATALOG GO CREATE FULLTEXT INDEX ON ftsXML([doc]) KEY INDEX UQ_FTS_Id ON ([FT_CATALOG], FILEGROUP [PRIMARY]) GO
راه اندازی سرویس Full Text Search
البته پیش از ادامهی بحث به کنسول سرویسهای ویندوز مراجعه کرده و مطمئن شوید که سرویس SQL Full-text Filter Daemon Launcher MSSQLSERVER در حال اجرا است. در غیراینصورت با خطای ذیل مواجه خواهید شد:
SQL Server encountered error 0x80070422 while communicating with full-text filter daemon host (FDHost) process.
sp_fulltext_service 'restart_all_fdhosts' go
استفاده از متد Contains
در ادامه، نحوهی ترکیب امکانات Full text search و XQuery را ملاحظه میکنید:
-- استفاده از ایکس کوئری برای جستجو در نتایج حاصل SELECT T.doc.value('(/book/title)[1]', 'varchar(100)') AS title FROM -- استفاده از اف تی اس برای جستجو (SELECT * FROM ftsXML WHERE CONTAINS(doc, '"Quick Brown Fox "')) AS T
خروجی کوئری فوق، Sample book title 1 است.
Full text search امکانات پیشرفتهتری را نیز ارائه میدهد. برای مثال در ردیفهای ثبت شده داریم fox jumps، اما در متن ورودی عبارت جستجو، jumped را وارد کرده و به دنبال نزدیکترین رکورد به آن خواهیم گشت:
SELECT T.doc.value('(/book/title)[1]', 'varchar(100)') AS title FROM (SELECT * FROM ftsXML WHERE CONTAINS(doc, 'FORMSOF (INFLECTIONAL ,"Quick Brown Fox jumped")')) AS T
و یا دو کلمهی نزدیک به هم را میتوان جستجو کرد:
SELECT T.doc.value('(/book/title)[1]', 'varchar(100)') AS title FROM (SELECT * FROM ftsXML WHERE CONTAINS(doc, 'quick NEAR fox')) AS T
نکتهای در مورد متد Contains
هم Full text search و هم XQuery، هر دو دارای متدی به نام Contains هستند اما یکی نمیباشند.
SELECT doc.value('(/book/title)[1]', 'varchar(100)') AS title FROM ftsXML WHERE doc.exist('/book/chapter/content[contains(., "Quick Brown Fox")]') = 1
بنابراین متد contains مرتبط با XQuery یک جستجوی case sensitive را انجام میدهد.
Last year a team of six researchers in Portugal from three different universities decided to investigate this question, ultimately releasing a paper titled “Energy Efficiency Across Programming Languages.”
سفر به Angular بخش اول
In the eighteen years that I’ve been doing Web development, a lot has changed. We started out creating HTML pages to present static information to our users. We then used classic ASP to get database data and incorporate that into our pages. To use both of these technologies, we had to know a lot about HTML, CSS, and JavaScript. Along came .NET and we started rendering everything on the server-side. We forgot a lot about HTML, CSS, and JavaScript as Web Forms wrapped up a lot of that for us. Web Forms’ architecture closely mimicked the way developers created desktop applications. This was great for helping developers move to the Web, but unfortunately hid a lot of the power of the Web, and also tended to be a little slow.
DotNet 5 چیست؟
Kotlin goes WebAssembly!
Kotlin 1.8.20 introduces the newest multiplatform compilation target for Kotlin – WebAssembly! This opens up new possibilities for Kotlin developers, ranging from writing web apps, to blazing fast server-side development with Node.js and standalone WebAssembly runtimes, and even bringing your Compose Multiplatform apps to the browser!
This lets you do things that you can’t do in WebAPI’s default binder, specifically:
- ModelBinds everything, including the body. Assumes the body is FormUrl encoded
- This means you can do MVC scenarios where a complex type is bound with one field from the query string and one field from the form data in the body.
- Allows multiple parameters to be bound from the body.