Topics Search

Adding a new measure in C#

Adding a new measure in C#
Views: 2
This article describes how to add a measure to a Tabular model already deployed on Analysis Services by using C# or PowerShell. This can be useful to deploy user-defined metrics without deploying the entire database. I worked in several Analysis Services projects where certain metrics were developed outside of the regular database modeling development process. There are many examples for that:
Sponsored Links:

Similar posts...

 

Fast integer to string conversion

Fast integer to string conversion Icon
In this post I compare the performance of several methods of integer to string conversion in C++... To measure the performance I used a benchmark from Boost Karma. This benchmark generates 10,000,000 random integers and converts them to strings using different methods measuring conversion time. I’ve replaced nonportable itoa with sprintf and added std::to_string, boost::lexical_cast, fmt::Writer and fmt::format methods.
 

What are Arrays and how to use ?

What are Arrays and how to use ? Icon
An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
 

Pointer Arithmetic; Adding, Subtracting and Comparing Pointers

Pointer Arithmetic; Adding, Subtracting and Comparing Pointers Icon
Pointers can be added and subtracted, which sounds useless but is actually sometimes very useful. We can use pointer arithmetic to accomplish some rather deft manipulations of data that wouldn’t otherwise be possible.
 

IO.Stream Read/Write Native Types

IO.Stream Read/Write Native Types Icon
This is a simple static class to add some functionality to the IO.Stream class. It avoids the need for BinaryReader and BinaryWriter, while adding functionality to simplify writing types not directly supported by BinaryReader and BinaryWriter, such as Decimal, DateTime, and Guid. It also adds an interface for reading and writing user classes: the IBinaryIO interface.
 

Benefits and Proper Usage of Extension Methods

Benefits and Proper Usage of Extension Methods Icon
Extension methods allow for adding methods to existing classes -- sort of. However, they have some limitations that regular methods do not have and some nice benefits beyond what a regular method is capable of. This tip examines those differences as well as when you should and should not use an extension method. The purpose of this tip is not to explain extension methods at an introductory level, but as a quick summary.
 

Arrays Tutorial

Arrays Tutorial Icon
An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
That means that, for example, we can store 5 values of type int in an array without having to declare 5 different variables, each one with a different identifier. Instead of that, using an array we can store 5 different values of the same type, int for example, with a unique identifier.
 

Validation attributes in Code First

Validation attributes in Code First Icon
DataAnnotations are really helpful when creating a model in Entity Framework Code-First. They are a simple way of instructing EF how you want the model to be structured and how it should translate the model into a relational database. You can also use validation rules to specify what values are allowed in your parameters. When using MVC and scaffolding these validation rules are also used when creating the user interface for you. You get a lot for free by simply adding the right DataAnnotations to your model. It’s really something worth looking into if you haven’t done it so far.
 

C# : Displaying Collections of Items on Windows Phone

C# : Displaying Collections of Items on Windows Phone Icon
Mobile apps often need to display long lists of items to users. These could contain images, text or other custom components. Every mobile platform has it’s unique set of components and concepts for displaying such lists and Windows Phone is no exception. In this tutorial I will show you how to make your own customized list of items, changing order of these lists, display options and adding items programmatically.
 

OperationResult Class in Support of Multiple Return Values from a Method

OperationResult Class in Support of Multiple Return Values from a Method Icon
As I was watching an interesting Pluralsight class by Deborah Kurata, titled "C# Best Practices: Improving on the Basics", I reminded myself of a recent development team I had a privilege to work with. Few long time team members insisted on adding a never ending number of parameters passed by reference or relying on the out contextual keyword. It was rather a sisyphic job to try to convince them how many SOLID principles and best practices were being violated, how brittle and tightly coupled the code was becoming. I hope some of them will find this tip and realize how much more convenient this approach could have been.
 

Adding Support for Windows 7 Jump Lists & Taskbar Tabs

Adding Support for Windows 7 Jump Lists & Taskbar Tabs Icon
The Hilo Browser and Annotator support Windows 7 Jump Lists and taskbar tabs. Jump Lists provide the user with easy access to recent files and provide a mechanism to launch key tasks. Taskbar tabs provide a preview image and access to additional actions within the Windows taskbar. In this Chapter we will see how the Hilo Browser and Annotator applications implement support for Windows 7 Jump Lists and taskbar tabs.