I will demonstrate a generic factory method which will create object from interface type parameter from an assembly (either current or provided) with the help of reflection
This tip provides a simple implementation for the ICommand interface and enables to write quick code leaving the nuances of fetching the return types and asynchrony
The article is about Matlab - Octave scripts for easy create forms with the most useful controls (texts field, lists, radio buttons, check boxes, sliders, ...)
This tip will introduce a library written in C++ that wraps up a 2d polygon triangulation algorithm with time complexity of O(N*logN), the algorithm works on both self-intersected and non self-intersected polygons.
Use the provided CSS with classed DIVs to build a clean-looking web-based menu that requires no JavaScript, and supports unlimited levels of both horizontal and vertical menus.
A C# snippet that converts Spanish text into a phonetic representation of how to pronounce it (in Mexican Spanish, not Spaniard Spanish) for speakers of American English
This tip/trick introduces the basic ideas on how to avoid memory mismatched allocation/deallocation issues detected by Intel® Inspector XE for Visual Studio 2015
Consider possibility of alternative syntax usage to refer and access to last anonymous objective variables in C# instead of using construction in code.
This is a tutorial for accessing sqlite databases in Android in a thread safe manner. If you download the library code, please bookmark, comment on, or rate the article - it helps out tremendously.
This is a simple class/demo application that shows how to check whether the account that is being used to run the application has administrative rights.
This article describes how to implement row drag and drop inside ASP.NET Gridview using Jquery TableDnD plugin and how to pass reordered sequence back to server
Property is a simple idea, but like many others can be misused. This tip describes asymmetric property anti-pattern and shows why properties should be symmetric to be maintainable and intuitive.
Creating a Web User Control containing an AutoCompleteExtender for data through WCF (JSON) allowing to store the entity selected through EntityFramework. Entity object serialization from the server to the client and the client to the server.
This paper attempts to pass all the steps to create an automated backup for a MongoDB Server on a Linux Server where all backups are sent to Amazon AWS S3 service scheduled through crontab.
Batching is a nice technique that allows you to handle big amounts of data gracefully. Directory.EnumerateFiles is the API that allows you to organize batch processing for the directory with a large number of files.
This article explains how you can identify any compatability issues for a legacy code written in VB, or any other language that produces TLB (Type Library) files for its interfaces.
This tip will explain step by step Bootstrap basic development for beginners. Attached is small application having three pages using Bootstrap CSS, Components and JS.
Load data to temporary table, make any additional update if required, create necessary indices, finally DROP live table and RENAME temporary table to production table.
Using FindWindow() and WindowFromPoint() to identify window, and SetWindowText(), MoveWindow(), SetForegroundWindow(), EnableWindow() to interact with it
I recently posted an article on how to place the data in an XML into an SQL table with a bulk Insert; this is an alternative way to do it by breaking up the XML before placing it into the Table.
C# doesn't allow for binary literals (e.g. int bits = 0b00010101). With the helper class presented here, you can do something like that, as close as possible.
Cascading Asynchronous Function Execution (CAFÉ) is a design pattern for easily managing the execution sequence of asynchronous requests and callbacks within a medium to large JavaScript framework.
How to colour the individual cells of a DataGridView according to their content. For example, negative values can be Red, positive values Green to show "Up"s and "Down"s more easily.
There is a problem with accessing Excel files via OleDb which contain more than 255 columns: they are truncated and need to be fetched using ranges. But what do you do with DataTables after that?
It is to be noted, .NET has lately introducedResponse.RedirectParmanent() after a long await. The main motive of this is tohave permanent response redirection to the Search Engines.Response.RedirectParmanent() is an extension function introduced in .NET 4.0.Themain motive of it is to indicate
It is a very common issue to handle automatic postbacks to controls. Here I am going to explain how we can handle autopostback of a button click using Javascript Event. Suppose you have a button : Now you want to occationally c
The two functions convert/parse number strings with prefix multipliers (Milli, Kilo, Mega, Giga, etc). The code includes try/catch blocks for tolerating writing styles.
If you have an SQL column which contains a comma separated list of names, you may have wondered how to return it as individual rows in a SELECT statement. It's not too bad, really!
TrackBar that can work with time values, has a nice spotlight for the current value, and won't allow its value to change when the user moves their mousewheel.
A method for duplicating a web page (including all scripts and styles) to run as if it originated from your own server, then modify server-side and client-side functionality afterwards.
Sometimes we need to share JavaScript, CSS or images files amongst several web applications. This post shows how to do this using Visual Studio's linked files feature, combined with a simple MSBuild target to ensure the shared content files can be found by the browser.
This tip shows three alternatives (an intuitive and less efficient, a more efficient one and a third more efficient one) to count all rows of all tables in a database.
Avoid generating strings as templates. Avoid the complicated FrameworkElementFactory. Create templates that use a delegate to create new instances, so you can use normal code to do the job.
Upload PDF, save file name to database, save pdf to a folder, create a thumbnail image of pdf and save it to a folder, and also save the image to database
Deriving VirtualizingPanel and OrientedVirtualizingPanel is not possible in WinRT but using some calculation strategies, an efficient emulation is possible
A suggested solution to create serializable Partition based ConcurrentDictionary (reducing chances of OOM errors, reduced memory consumption and adding capability to hold bigger KVP set in Dictionary).
The ConcurrentDictionary type resides in System.Collections.Concurrent, introduced in .NET 4.0. It makes adding, removing and updating values in a lookup table on multiple threads easier.
The Blink Feature in Netscape browsers is really a cool one. Here we would bring in the Blink feature for Microsoft Internet Explorer using a simple JavaScript trick.
This tip will help beginners to implement CRUD operations in ASP.NET MVC 5 using WebAPI 2 with scripting language as AngularJS and Database as MS SQL 2008R2.
This tip explains how to create custom helpers in ASP.NET MVC4 step by step clearly. It will be very helpful for those who want to learn ASP.NET MVC as beginners.
Custom Treeview control useful when multilevel hierarchical data need to be displayed and setting default can go at any level and providing access to each level then this can be the right choice.
Recently I faced a problem of storing sorting information for later use. Sorting is easy if you already have a collection to sort. Just use LINQ extension methods. But what if you don't have the collection yet? What if you'll get the collection later, but you need to store sorting rules now?
You have too many icons on your desktop? Well, this will solve your problem. With this program, you can organize your desktop, create categories and add programs/documents to category.
Using a WebBrowser control and a DataGridView control, open CSV files that contain address information, and display the selected address in a Google Map from the grid in the browser control
Album Example - 5.68 MBIntroductionI often have the need to show pictures with captions as seen above.My objective is to be able to do so dynamically, so that all I need to do is to create a folder on my PC whose name equals the title of the page ("Sample Pictures" in the image...
Service virtualization undeniably benefits the development process, but it can be both a blessing & a curse for developers. Learn how to minimize the burden on development to achieve maximum acceleration of delivery cycles.
For IIS7.5, an alternate method to enable compression is to run the following commands in a terminal:To enable compression for both dynamic and static content:C:\Windows\System32\Inetsrv\Appcmd.exe set config -section:urlCompression -doStaticCompression:true -doDynamicCompression:true...
This article will teach users how to create a dedicated IPython + Notebook environment on cloud (SuperVessel cloud), in the most easy and free way. Users could try it at once !!
Simple and clean-cut label that user can edit text of during run-time (by double-clicking) which I wrote because the examples I found were either obsolete or added clutter to the interface.
If you need to change values of db table primary keys during ordinary operations, you probably have a design flaw in your software. In extraordinary situations, it may however be necessary. This tip helps you do so.
This tip provides code for an enhanced version of the JTabbedPane which allows the developer to add toolbar buttons to the beginning or end of the tab set.
In which the esteemed and humble author selflessly - indeed quasi-heroically! - presents a grab bag of snippets to use when utilizing the open-source EPPlus library to create spreadsheet files
This tip describes step by step implementation of executing stored procedure having user-defined table type as a parameter in entity framework using EntityFrameworkExtras package.
This is a control that is like a Expander Control but there is both Expanded and not Expanded Content. It demonstrates some concepts on how to easily create controls whose functionality can be mostly implemented in the XAML with the code behind being mostly DependencyProperty definitions.