By ronen ariely on
14/06/2022 00:36
Following my lecture at the .Net conference, about how to develop extensions to SQL Server Management studio, you can download the code and compiled package here. This is small add-in for SSMS in order to work with JSON and actually be able to read the JSON code. It has a "pretty JSON" functionality amount other tools.
|
By ronen ariely on
15/04/2016 12:45
background
At the beginning of the month I lectured at the SQLSaturday # 481 event about the new support of JSON in SQL Server 2016. During the demonstration I showed queries that returns JSON text. SQL Server returns the JSON text formatted as compact text / dense format (one line, no extra space), which is good for most cases that we want to store the text or pass it between machines for example. But, by using a compact format the structure of the JSON document is not readable.
In NoSQL servers, which based on JSON, we usually have a built-in method to format the JSON document into a format that is easier for humans to read (for example in mongoDB it named "pretty"). This feature must be added to the SSMS or to the SQL Server, in my opinion. In the mean time, for the sake of the lecture, I created simple app that do the job. it is basically a "one line app" using the nuget package Json.NET (Newtonsoft.Json).
After I uploaded the lecture materials (code and presentation), I got requests to upload the application as well. Since I do not like the idea that people execute code without understanding it, and since this is very simple and short code, and most DBA does not develop dot.net application, therefore I decided to post the code, as a step-by-step tutorial for beginners.
|
By ronen ariely on
31/12/2015 20:29
Simple CLR code for SQL Server
|
By ronen ariely on
29/03/2014 23:09
Case study: We need to develop small application, which can be executed in variety ways, on variety interfaces. For example we need to be able to execute the application using: (1) command line (with or without parameters), or by (2) double click the exe file, or (3) from command shell / PowerShell. Moreover, we need our application to return information, using variety of Graphical user interfaces (GUI), according the execution option that we used. For eample, if we executed the application using GUI (option 3), then we need to let the user choose which GUI to use according to the parameter he passed to the executing command. If he didn't use any parameter (default), or if he used 'gui' as the parameter's value (option 1, 2), then we open a 'windows form', as our GUI. If the user pass the parameter 'console' and he using a shell interface, than the result will be seen on current shell without opening new GUI (option 2).
|
By ronen ariely on
22/02/2014 21:34
Any common operating system include a Text-based command interface, which provides the environment in which the user can move commands, launch applications and run services. by default the windows command shell aloud use to use English, but what if we want to use Hebrew or any other local language? what if we want to develop a console application which use local language?
In this blog I will explain step by step, how to configure the command (CMD) console shell, to use local language [Hebrew for example]. This will also affect Powershell.
|
By ronen ariely on
09/01/2014 00:30
AlphaVSS is a .NET class library providing a managed API for the Volume Shadow Copy Service (VSS). AlphaVSS is written in C# and C++/CLI and released under the MIT license. AlphaVSS duplicates the original VSS API (quite closely) and act as a wrapper to the VSS API for the use of Dot.Net developing.
* You can get additional information on the VSS in English at the following link, or in Hebrew in this link.
In this blog I will show and explain the basic use of AlphaVSS, using several examples, ordered from the simple to the more complex ones. Please review the code thoroughly from the first code to last. Explanations and clarifications in the code and mast be reading from the first example.
|
By ronen ariely on
25/11/2013 18:56
SQL Random String using CLR
|
By ronen ariely on
05/10/2013 11:25
הרעיון של שימוש בסוג מסויים של פרויקט המוגדר בתוכנת ה visual studio, מתבסס על כך שפרויקטים אלו מבוססים על תבניות מוכנות השמורות בתוכנה. כל פרויקט אפשר לפתח מאפס בלי להיעזר בתבנית מוכנה, אבל זו דרך יעילה ונוחה לזרז עניינים. לפעמים שוכחים זאת ו/או לא מודעים לקוד שמייצרת עבורנו תוכנת ה VS מאחורי הקלעים, בזמן יצירת פרויקט חדש לפי תבנית מוכנה. במאמר קצר זה נדון בפיתוח בטכנולוגיית winform, וניגע בנקודה הקשורה בתבנית של פרויקט מסוג זה והקוד שמגיע איתה "מאחורי הקלעים".
בברירת המחדל הטופס הראשוני שנוצר לנו מהווה חלק מנקודת ההתחלה של התוכנית. סגירת הטופס הראשי, גוררת יציאה וסגירה של התוכנית. כיצד אם כן נוכל לפתוח טופס חדש ולסגור את הטופס הראשי ללא סגירת האפליקציה?
|
By ronen ariely on
27/05/2012 17:28
במדריך זה נציג שימוש בפרופיילר של חברת StackExchange לניטור מערכות asp.net. נראה כיצד ניתן לנטר את השאילתות שנוצרות לנו בעבודה עם ה ORM של Entity Framework Code First ובכלל בעבודה בטכנולוגיית MVC או WebForm.
|
By ronen ariely on
23/03/2012 19:58
במדריך זה נעבור מעט על נושא קונפיגורציה של אפליקציה אינטרנטית תוך עבודה עם קובץ הקונפיגורציה web.config. נדבר בחלק הראשון על שיטות שונות בהגדרת configuration Section (בלוק הגדרות) המוגדר מראש (appSettings), ונמשיך לדון בקצרה בהגדרה דינאמית של קונפיגורציה בזמן ריצה.
נדון בנושאים הבאים ועוד:
- הוספת רשימת מפתחות חדשים לקובץ ההגדרות (Predefined configuration Section).
- הגדרת בלוק קונפיגורציה מותאם (User-Defined configuration sections).
- הגדרה וקריאה של מפתחות מקובץ הקונפיגורציה (WebConfigurationManager/ ConfigurationManager).
- ביטול/הורדה והוספה של מפתחות מההגדרות שלנו בצורה דינאמית (בקוד חיצוני).
- ההגדרה ושימוש בקבצי הגדרות שלנו (קבצים חיצוניים) בכל שם שנבחר.
- כמה נקודות למחשבה כלליות כמו בעיות שיכולים להיתקל בהם ועוד.
קריאה מהנה
|
By ronen ariely on
20/03/2012 19:31
מדוע עבודה במסד הנתונים עם "מכלול הנתונים"* מהירה יותר מעבודה עם רשומות? * במדריך זה אני משתמש במושג "מכלול הנתונים" ברמת מסד הנתונים כשהכוונה להתייחסות לכל הנתונים כאלמנט אחד (למשל שימוש ב bulk insert או select into) בניגוד לעבודה עם הנתונים כאוסף של רשומות (insert into והכנסה של נתונים בזה אחר זה או אפילו כולם ביחד) נעבור על כמה נקודות כלליות הקשורות למסד הנתונים ונסביר את ההתנהגות השונה ברמת מסד הנתונים, וכן נעבור על דרכי המימוש בפיתוח בטכנולוגיית Dot.Net ועבודה עם Entity Framework בפרט.
|
By ronen ariely on
15/03/2012 10:33
הפתרון המובנה ב MVC מגרסה 2 לעבודה עם SSL הוא באמצעות המאפיין RequireHttps. מאפיין זה קובע שרק פניות בפרוטוקול HTTPS יועברו אל הבלוק עליו הוא הוגדר.
ישנם מספר שאלות/בעיות שעולות עם השימוש במאפיין שבחלקן ננסה לדון כאן תוך הצגת פתרון סביר.
|
By ronen ariely on
22/02/2012 23:21
ישנם דרכים שונות למימוש התאמת תרבות (Culture) עבור המשתמש. נציג במשפט כמה אפשרויות ונרחיב על השיטה של שימוש בראוטר של טכנולוגיית MVC על מנת להגדיר את התרבות של העמוד.
נראה קוד מלא כיצד נוכל לנווט או להציג תוכן מותאם לתרבות עבור כל משתמש על ידי שימוש בנתון המופיע ב URL מהצורה הבאה:
http://localhost:56795/en-US/Home/Index
|
By ronen ariely on
14/02/2012 10:43
יש לי רשימה גנרית המכילה אלמנטים מסוג Object. כל איבר ברשימה יכול להיות מסוג אחר במקור. כיצד נוכל למצוא את סוג האיבר שלנו?
|
By ronen ariely on
26/08/2011 14:39
קידוד תווים הנו התאמה בין קבוצת תווים לקבוצה אחרת. דוגמה פשוטה ומוכרת לקידוד תווים הוא קוד ASCII, המקודד אותיות, ספרות וסימנים אחרים למספרים בינאריים. קוד ASCII מייצג את האלפבית הלטיני הפשוט, מספרים וסימני פיסוק אבל מביא לנו גם ייצוג להוראות שאינן תווים קריאים.
מדריך זה ידון בתו הראשון שיש לנו בקידוד ASCII, תו אפס או בשמו Null character המוכר גם בשם null terminator.
|
By ronen ariely on
31/03/2011 14:55
נציג קוד קצר לעבודה עם דטא בינארי. הסבה מטקסט לבינארי והפוך
|
By ronen ariely on
13/01/2011 13:00
מושגים, רקע ודוגמאות
Queue
אוסף עם ייחודיות וסדר קבוע...
Thread
משימת עיבוד הקטנה ביותר הניתנת לתזמון על ידי מערכת ההפעלה...
ThreadPool
מצבור Threads המאורגנים בתוך ... Queue
|