|
Mirrored Weblogs
-
Here are some suggestions I’ve sent via Windows Insider feedback app for Windows 10: 1) Add the Fullscreen button to titlebar of ALL windows, not just the ones of Windows 8.1 Store apps. UWP (Universal Windows Platform) apps don’t seem to show zoom button on their titlebar (to make it and any borders autodisappear and […]...
|
-
Sometimes when you catch an exception in .NET, the message it prints out isn’t very informative, since it is wrapping another exception that had been thrown a bit inner in the code. That exception is in that case accessible via InnerException of the Exception instance. That inner exception is also an Exception, so one would […]...
|
-
it would be nice if C# supported syntax like: public static DependencyProperty Register(static DependencyProperty x, string name, Type propertyType, Type ownerType, FrameworkPropertyMetadata typeMetadata) that is static extension methods for classes, that can be invoked without a class instance (just with the class type), apart from normal extension methods that can be invoked on a class […]...
|
-
At SpeechTurtle application, I’ve just added speech feedback (voicing of a command) when an available command is executed using a mouse click on its name. That could also help the user learn the expected pronunciation in English in case the speech recognition engine doesn’t understand some of the commands as voiced by the user. One […]...
|
-
Based on others answers at http://stackoverflow.com/questions/3123870/find-the-location-of-my-applications-executable-in-wpf-c-or-vb-net here’s an example that shows how to remove the executable name from the path and combine the result with some subfolder and filename: At my updated version of Hotspotizer (http://github.com/birbilis/Hotspotizer), I’ve just added support for loading a Gesture Collection file at startup, if found at Library\Default.hsjson, by using the […]...
|
-
When you launch a web project in Visual Studio, by default is uses the 32-bit version of IIS Express. To change that you can enable the 64-bit version through Options. So, head to:...
|
-
I’ve just updated an older answer of mine at: https://social.msdn.microsoft.com/Forums/vstudio/en-US/716ef041-0a59-4c1d-9519-e14db4de7e75/localizability-vs-localizable-attributes-in-control-dev?forum=wpf In case you’re wondering too what’s the difference between Localizable and Localizability attributes in .NET, maybe this helps a bit: https://msdn.microsoft.com/en-us/library/ms753944(v=vs.100).aspx LocalizableAttribute – Specifies whether a property should be localized LocalizabilityAttribute – Specifies the localization attributes for a binary XAML (BAML) class or class member […]...
|
-
I type-in new PropertyMetadata(OnCenterXPropertyChanged) but since I haven’t yet implemented On…, I get a suggestion by the IDE to implement it but it suggests to add field, property or read-only field, not to implement the callback for me with the given name. It can find the method signature needed from the delegate that PropertyMetadata (one […]...
|
-
When using http://github.com/zoomicon/ZUI I would like to write: FloatingWindow window = new FloatingWindow() { Content = display, Title = IconText = title }; but I have to write: FloatingWindow window = new FloatingWindow() { Content = display, Title = title, IconText = title }; instead. For consistency, I’d prefer that […]...
|
-
Useful to know: If you set the Width and Height on the UserControl though, you have set a fixed size and thus even if its parent tool window changes size, the UserControl never will. You should not set Width and Height on the UserControl if you want that event to be raised as the parent […]...
|
-
For some time now, I was getting very annoyed while copy-pasting content from other software into Microsoft Word 2010. I would press CTRL+C at some other software and then would press ALT+TAB to go into an open Word document and press CTRL+V to paste, but it would not. So I had to move my fingers […]...
|
-
One of the coolest experiments from Codrops to simulate rain using WebGL....
|
-
At http://www.askvg.com/fix-windows-10-insider-preview-build-10240-not-appearing-on-windows-update/ it writes: NOTE: If you previously had a new Windows 10 build installed in your computer and then reverted back to an older build, you’ll lose access to the new build and it’ll no longer be offered as an upgrade option. Deleting the number for that build from the list at HKEY_LOCAL_MACHINE\SOFTWARE\ […]...
|
-
I recently posted a list of the VS2015 extensions I use on my main machine at: https://zoomicon.wordpress.com/2015/11/13/visual-studio-2015-extensions-i-use/ From that list of extensions I use the Productivity Power Tools one, it has a "Power Commands > Remove and Sort Usings" action that one can right click and run on the whole solution. Much easier than opening […]...
|
-
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 […]...
|
-
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 […]...
|
-
This is the complete list of Visual Studio 2015 Extensions I’m using currently: Tagged: Extensions, Visual Studio...
|
-
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 […]...
|
-
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 […]...
|
-
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...
|
-
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(...
|
-
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 […]...
|
-
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...
|
-
Managing and tuning the performance of relational databases is a challenging task that requires significant Read more...
|
-
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...
|
|
|
|