Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια

 

Αρχική σελίδα Ιστολόγια Συζητήσεις Εκθέσεις Φωτογραφιών Αρχειοθήκες

Πρόσφατες Δημοσιεύσεις

  • Suggestion: on Duck Typing and C#/.NET

    My comment at: http://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/4272089-support-implicit-interfaces-for-code-reuse It would be nice indeed if one could define at the client object’s side a static interface that is a subset of the methods of a server (or serving if you prefer) object (it is only the view of the server that the client has gained knowledge of) that has been […]...
    16-11-2015, 15:32 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , ,
  • Suggestion: Add support for constants in C# (and VB.net etc.) interfaces

    It is rather unfortunate that C# doesn’t support constants in interfaces, whereas Java does. If IL (intermediate language) that C# usually compiles to (when not using AOT that is like in .NET Native or Xamarin iOS) doesn’t support this, then the compiler could create a special sealed class to carry the constants. Then, wherever they’re […]...
    16-11-2015, 12:52 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , ,
  • Visual Studio 2015 Extensions I use

    This is the complete list of Visual Studio 2015 Extensions I’m using currently: Tagged: Extensions, Visual Studio...
    13-11-2015, 22:34 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , ,
  • Suggestion: Introduce .= operator for C#

    It would be nice if one could write in C# (and maybe in other .NET languages too): s = s.SomeMethodOfS(…)… as s .= SomeMethodOfS(…)… that is to have a .= operator, similar to += and other shorthand experession operators see screenshot for an example usecase from the opensource project FoscamController     Ideally, usage of […]...
    11-11-2015, 17:45 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , ,
  • Suggestion: Define once and reuse result type of method inside its body

    It would be nice if one could rewrite this C# snippet: public SortedDictionary<string, UObject> GetObjects() { SortedDictionary<string, UObject> result = new SortedDictionary<string, UObject>(); using (ReadTransaction xact = namingSchema.ReadTransaction()) foreach (ObjectName.RowType row in ObjectName.object_name_(xact)) result.Add(row.name_, row.object_); return result; }   in a more concise form like:   public T GetObjects() where T=SortedDictionary<string, UObject> { T result […]...
    10-11-2015, 23:58 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , , , ,
  • Using MongoDB with ASP.Net MVC

    In this post I am going to demonstrate with a hands-on example how to use the popular NoSQL database MongoDB to store and retrieve data using Visual Studio 2015and ASP.Net MVC. When creating an application, any type of application (web, windows, distributed) all the data is stored and retrieved from a database. The most popular kind of databases that we are using to store and retrieve data are called Relational Databases and I have been using SQL Server as the RDBMS of choice for many years now. Data grows fast nowadays. We are having more applications than ever and databases grow rapidly. That fact alone has some serious implications. There is more demand for scale and speed. When you design a web application, a commercial web application e.g an ecommerce store, you know that the speed and scale of the e-shop will mean more customer conversions for your client. It is the demand for scale, speed, and fast application development that has brought on a new breed of databases, namely NoSQL databases. MongoDB is the...
    07-11-2015, 21:41 από Nikolaos Kantzelis ASP.Net Blog στο Dot Net Rules
    Δημοσίευση στην κατηγορία: , , ,
  • Deferred execution on LINQ to Entities

    Many people use entity framework but are not aware of what deferred execution is and how it may affect their projects. In this article, we are going to have a little talk about it and see how things work.   LINQ to entities and deferred execution   We take into account that we all have some understanding of entity and LINQ or lambda expressions.   To go through this post we created a table called Videogames containing four columns (ID, Name, MainCharacterName and Publisher) and filled it with some popular vintage videogames. Let's start with the following piece of code.     string   videogameNames =   "" ; var   MarioVideogames = db.Videogames.Where(v => v.MainCharacterName ==   "Mario" );   foreach   ( var   videogame   in   MarioVideogames)   videogameNames += videogame.Name +   "<br/>" ;     Let's say our table contained only two Videogames having Mario MainCharacterName:  Super...
    07-11-2015, 18:28 από το μέλος k badas στο .NET Hints
  • DuffDevice in C# for fun

    Duff Device on Wikipedia using System ; using System.Collections.Generic ; using System.Linq ; using System.Text ; namespace DuffDeviceFun { class Program { static void DuffDevice ( byte [] src, byte [] dest, int count) { unsafe { fixed ( byte * fromp = src, top = dest) { byte * from = fromp; byte * to = top; int n = (count + 7 ) / 8 ; switch (count % 8 ) { case 0 : goto LBL0; case 7 : goto LBL7; case 6 : goto LBL6; case 5 : goto LBL5; case 4 : goto LBL4; case 3 : goto LBL3; case 2 : goto LBL2; case 1 : goto LBL1; } LBL0: *to++ = * from ++; LBL7: *to++ = * from ++; LBL6: *to++ = * from ++; LBL5: *to++ = * from ++; LBL4: *to++ = * from ++; LBL3: *to++ = * from ++; LBL2: *to++ = * from ++; LBL1: *to++ = * from ++; if (--n > 0 ) goto LBL0; } } } static void Main ( string [] args) { string msg = "Demo Message!" ; var len = msg.Length * sizeof ( char ); byte [] from = new byte [len]; Buffer.BlockCopy(msg.ToCharArray(), 0 , from , 0 , len); byte [] to = new byte [ from .Length * sizeof ( char )]; DuffDevice(...
    27-10-2015, 14:43 από Iraklis Blog στο Iraklis Blog
    Δημοσίευση στην κατηγορία: , , ,
  • Get All tables row count without using Count(*) function

    Η δύναμη της συνήθειας είναι το μεγαλύτερο ναρκωτικό του μυαλού και δεν το αφήνει να σκεφτεί αποδοτικά. Αλήθεια πόσες φορές κάνουμε μηχανικά κάποια πράγματα επειδή τα έχουμε συνηθίσει στα τόσα χρόνια που κάνουμε αυτή την δουλειά ; http://www.sqlschool.gr/blog/get-all-tables-row-count-without-using-count-function-1058.aspx...
    25-10-2015, 23:33 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • HowTo: Upgrade Kinect Audio Positioning code from older Beta SDK

    Exploring the Kinect SDK v1.8 Developer Toolkit Browser application, I noticed some audio positioning visualizations at various samples (specifically at Audio Basics, Audio Explorer and Kinect Explorer samples), but I kept on looking for some simpler/cleaner sample code to return audio positioning info that would be easier to reuse. So I can across http://kinectaudioposition.codeplex.com that […]...
    24-10-2015, 21:02 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , , , ,
  • Using Asynchronous Operations in Entity Framework 6.0 and ASP.Net MVC

    In this post I am going to provide you with a hands-on example on how to take advantage of asynchronous execution using Entity Framework. EF 6 has the ability to execute a query and command asynchronously using DbContext. Entity Framework is an object-relational mapping (ORM) framework for the .NET Framework.EF addresses the problem of Object-relational impedance mismatch. I will not be talking about that mismatch because it is well documented in many sites on the Internet. Through that framework we can program against a conceptual application model instead of programming directly against a relational schema-model. By doing so we can decrease the amount of code we do write to access a data storage and thus decrease maintenance time. You can find many posts regarding Entity Framework in this blog. Before I go on with my hands-on example I would like to talk about asynchronous programming. Asynchronous programing is everywhere these days. It doesn't matter if you're on the client or the server. On the client, you...
    17-10-2015, 01:31 από Nikolaos Kantzelis ASP.Net Blog στο Dot Net Rules
    Δημοσίευση στην κατηγορία: , , ,
  • SQL Server 2016 New features - The sys.dm_exec_function_stats DMV

    Τα User Defined Functions (UDF) είναι γνωστά στους περισσότερους. Η χρήση τους είναι μεγάλη αλλά αρκετές φορές χρησιμοποιούνται λάθος κυρίως λόγο της άγνοιας που υπάρχει γύρω από την εκτέλεση ενός UDF και ιδιαίτερα όταν αυτό εμπλέκεται μέσα σε ένα query. Οι περισσότεροι συγκρίνοντας το execution plan ενός query χωρίς UDF και με UDF βλέπουν ότι το query cost είναι μικρότερο σε αυτό που χρησιμοποιεί το UDF και αμέσως θεωρούν ότι αυτό είναι και το καλύτερο. Για ακόμα μια φορά θα τονίσω ότι δεν υπάρχει έτσι απλά καλό ή καλύτερο όλα είναι εξάρτηση από πολλούς παράγοντες όπως την ποσότητα και ποιότητα των δεδομένων των indexes κλπ http://www.sqlschool.gr/blog/sql-server-2016-new-features-the-sys-dm_exec_function_stats-dmv-1057.aspx...
    16-10-2015, 00:10 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • Azure SQL Database Query performance insight

    Managing and tuning the performance of relational databases is a challenging task that requires significant Read more...
    15-10-2015, 11:07 από ksharp στο K#
    Δημοσίευση στην κατηγορία:
  • SQL Server 2016 New features - The sys.dm_exec_session_wait_stats DMV

    Καθημερινά ένας DBA ή DB developer έχει να αντιμετωπίσει αρκετούς αστάθμητους τις περισσότερες φορές παράγοντες που επηρεάζουν το performance. Πιστέψτε με ότι αυτό είναι μια δουλεία που απαιτεί σχολαστικότητα γνώση της αρχιτεκτονικής τόσο του SQL Server όσο και της database. Για να κάνεις αυτή την δουλεία θα πρέπει να έχει μελετήσει αρκετά και να έχεις κάνει αρκετή πρακτική εξάσκηση για την απόκτηση εμπειρίας. Ακόμα και ένας τέτοιος άνθρωπος πάντα επιζητά τρόπους να κάνει λιγότερο δύσκολη την δουλεία του και η χαρά του είναι μεγάλη όταν ανακαλύπτει ότι το αγαπημένο του εργαλείο έκδοση με την έκδοση του δίνει περισσότερες δυνατότητες για αυτό το task. Από τα βασικά εργαλεία μας στον SQL Server είναι τα Dynamic Management Views (DMV). Αρκετά από αυτά είναι κυρίαρχα εργαλεία στο performance troubleshooting. http://www.sqlschool.gr/blog/sql-server-2016-new-features-the-sys-dm_exec_session_wait_stats-dmv-1056.aspx...
    14-10-2015, 00:54 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
    Δημοσίευση στην κατηγορία:
  • Entity Framework Performance optimization patterns-part II

    This is the second post in a series of posts where I talk about good coding practices when it comes to using Entity Framework as our data access layer when building our applications. You can read the first post of the series here . The main things to take away from that first post is to use projection whenever possible (do not query sql server for data that you do not want on the client) and to filter on the server (meaning SQL Server) which has a powerful engine to do that and not on the client. In this post I am going to provide you with a hands-on example on how to avoid writing your LINQ to Entities queries in a way that will hinder performance of your application. The aim of this post (hopefully a series of posts on performance and Entity Framework) is to highlight bad coding practices when architecting an applications that uses EF as the ORM to fetch and manipulate data from the data store. I am going to point out some practises and patterns that very often developers use and cause EF to create poor-performing...
    12-10-2015, 01:44 από Nikolaos Kantzelis ASP.Net Blog στο Dot Net Rules
    Δημοσίευση στην κατηγορία: , , ,
  • Fix: VSIX installer error – SignatureDescription could not be created

    This is my answer at: http://stackoverflow.com/questions/31552082/vsix-installer-signaturedescription-could-not-be-created-for-the-signature-algo/ to the question on why some extensions fail to install at RC (Release Candidate) versions of Visual Studio 2015, showing error “SignatureDescription could not be created for the signature algorithm supplied”. Not sure if Microsoft fixed this on purpose or by accident, but this is very useful for people […]...
    10-10-2015, 14:13 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , , ,
  • Entity Framework Performance optimization patterns

    In this post I am going to provide you with a hands-on example on how to avoid writing your LINQ to Entities queries in a way that will hinder performance of your application. The aim of this post (hopefully a series of posts on performance and Entity Framework) is to highlight bad coding practices when architecting an applications that uses EF as the ORM to fetch and manipulate data from the data store. I am going to point out some practises and patterns that very often developers use and cause EF to create poor-performing T-SQL statements. Entity Framework will always create T-SQL, the thing to keep in mind is that we have to make sure that this T-SQL code (that we cannot write ourselves since it is abstracted by EF) if it is poor then when passed to the SQL Server engine (through the optimiser and the creation of the execution plan) will cause our applications to perform poorly especially under heavy load. Let me talk a bit about query optimisation and T-SQL. T-SQL is declarative by nature. When we write T-SQL...
    03-10-2015, 21:57 από Nikolaos Kantzelis ASP.Net Blog στο Dot Net Rules
    Δημοσίευση στην κατηγορία: , , , , , ,
  • A Look At Akka.NET

    Nice article about Akka.Net http://www.codeproject.com/Articles/1007161/A-Look-At-Akka-NET...
    29-09-2015, 13:49 από count zero στο count zero
    Δημοσίευση στην κατηγορία:
  • Create a secure socket layer WCF service

    We have already seen how to create a WCF service. This time we are going to see how to combine a WCF service with SSL security, which will be a trickier thing to do.   To reach our goal, we need to take three steps. Step one is to create a WCF Service. Step two is to install a certificate for authentication. Step three is to bring the two first steps together. Since creating a secure socket layer for a website takes more than just a few words. I am planning on writing some future article about that. In order to apply the following methods, a reader should either already have a secure website or, if unable to wait, find a proper article since there are quite a lot out there.   Concerning WCF services     This is the article   where we created a WCF service. However since this task is more complex, we will start by repeating a few things.   To create a WCF service, we create a service (svc) file. This is where we place the code to execute when the service is requested.   The svc...
    27-09-2015, 12:26 από το μέλος k badas στο .NET Hints
  • Monitor Connection Pooling as SQL Server DBA

    Το connection pooling είναι μια cache από database connections που σκοπό έχει αυτά που είναι ελεύθερα στην cache αυτή να μπορούν να επαναχρησιμοποιηθούν κάθε φορά που κάποιος ζητάει να κάνει connect στην database. Η χρησιμότητα του connection pooling είναι αρκετά σημαντική στην εκτέλεση διαδικασιών πάνω στην database από το application καθώς με αυτό τον τρόπο γίνεται αφενός γρηγορότερη επικοινωνία αφετέρου καταναλώνονται λιγότεροι πόροι. http://www.sqlschool.gr/blog/monitor-connection-pooling-as-sql-server-dba-1050.aspx...
    15-09-2015, 22:46 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • Suggestion: Allow local nested methods inside any code block

    It would be nice if one could define methods inside other methods so that they are only accessible in the context of the parent method. In Pascal one could define them at the start of the parent method, before any other commands, but after local variables block, so they could also access the variables of […]...
    05-09-2015, 21:44 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , ,
  • Suggestion: Define scoped variable at C# switch conditional statement

    Trying to reuse the conditional value of a switch statment in C# at the fallback “default” code block of it, and looking up if that was supported in C#, I found the a related discussion at: http://stackoverflow.com/questions/29628507/c-sharp-get-switch-value-if-in-default-case I added a comment there and also elaborated it a bit more at a suggestion (PLEASE VOTE IT […]...
    01-09-2015, 20:47 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , ,
  • HowTo: List all known color names and find name of given color at WPF

    This is my answer at http://stackoverflow.com/questions/4475391/wpf-silverlight-find-the-name-of-a-color Modified answer from Thomas Levesque to populate the Dictionary only when 1st needed, instead of taking the cost at startup (going to use at speech recognition-driven turtle graphics, so that user can pronounce known color names to change the turtle’s pen color) //Project: SpeechTurtle (http://SpeechTurtle.codeplex.com) //Filename: ColorUtils.cs //Version: 20150901 […]...
    01-09-2015, 18:11 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , , , , , , ,
  • HowTo: Insert new line and spacing at content of WPF TextBlock control

    While adding more voice commands at SpeechTurtle, I had to update the active legend where the available commands are displayed and their text is highlighted as the respective commands are recognized by the speech recognition engine (using .NET’s managed Speech API). A problem I faced was how to add a newline and prefixing the 2nd […]...
    28-08-2015, 16:34 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , , , , ,
  • Suggestion: property and event setting block attached to C# type instance

    Instead of having to write in C#       speechRecognizer = CreateSpeechRecognizer();       if (speechRecognizer != null)       {         speechRecognizer.SomeProperty = someValue;         speechRecognizer.SomeOtherProperty = someOtherValue;         speechRecognizer.SpeechRecognized += SpeechRecognized;         speechRecognizer.SpeechHypothesized += SpeechHypothesized;         speechRecognizer.SpeechRecognitionRejected += SpeechRecognitionRejected;       } I’d prefer to write:       speechRecognizer = CreateSpeechRecognizer() {         SomeProperty = someValue,         SomeOtherProperty […]...
    25-08-2015, 15:31 από George Birbilis @zoomicon στο George Birbilis' blog
    Δημοσίευση στην κατηγορία: , , , , , ,
Περισσότερες Δημοσιεύσεις « Προηγούμενη - Επόμενη »
Με χρήση του Community Server (Commercial Edition), από την Telligent Systems