Ich habe ein Video für den Karaoketag von Vito C. erstellt, was von J.B.O. auf ihrer Fanseite und Facebookseite veröffentlicht wurde 😀 …
Visual Studio 2013 : Show folders with *.cs files in the solution explorer after they suddenly disappeared / hidden
Problem
Sometimes it happens, that you have created folders in Visual Studio for your application and had put some *.cs C# Source Code files that suddenly disappeard in the solution explorer.
Analysis
I.e. that can happen when you have forgotten to save your Visual Studio application project, berfore you have closed the IDE.
Solution
Use the file explorer and navigate to your Visual Studio solution (alternatively you can right-click a source code file in your folder and select „Open contained folder“ from the context menu).
Open the .csproj file in your solution in a text editor of your choice:

Go to the section where the <ItemGroup /> tags are declared and add a new section with the folders and source code files you want to show in your solution like in the screenshot below

You can add all cs-files with a wildcard star like it is shown in the screenshot above.
Bei Popmusik ist es nicht die Musik selber, mit der wir ein positives Empfinden / Identifikation aufbauen. Die Geschichte und das Image der Band / des Musikers beeinflussen maßgeblich die Musikbewertung.
Intention
Es gibt heute sehr viel richtig gute und anspruchsvolle Musik, die professionell und mit viel Herzblut produziert wird und dennoch wird vielen Titeln niemals Gehör geschenkt. Warum ist das so? Nachdem ich nun einige Studien und Artikel über Musik-Image gelesen habe, möchte ich in diesem Blog-Eintrag meine persönlichen Gedanken und Interpretation niederschreiben.
Analyse
Warum gibt es anspruchsvolle, perfekt aufgenommene und abgemischte Musik, die niemals gehört wird und weitere primitive Werke, welche die deutschen Charts stürmen?
Um dies zu beleuchten kann man sich vor Augen führen, dass unkomplizierte, weniger anspruchsvolle Musik für das untrainierte Gehör eingängiger ist, als komplexe und durchdachte Harmonie-Strukturen. Man könnte nun meinen, dass ein ausgebildeter Musiker einem 3 bis 4 Akkordschema Folge leisten muss um eingängige Songs zu schreiben. Ist es wirklich so einfach?
Die Antwort ist: „Nein!“ – wieso erleben wir zur Zeit eine Gangster-Rap/Gangster-Hip Hop Herrschaft in den deutschen Charts wenn es wirklich um Harmonien ginge? Könnte man sich nicht einfach eine Loopstation kaufen und fette gesamplete Beats in einen Lautheits-maximierenden Limiter drücken, während man ein bisschen rappt und die Sprachmelodie mit einer Autotune-gefütterte Schlangenbeschwörermusik (oder orientalischem Gedudel) belegt, so wie es in den deutschen Charts z.Zt. Gang und gebe ist?
Die Antwort ist: Nein!“. Es ist nicht alleine die Fähigkeit des guten Musikers, sich für niedere Zwecke zu prostituieren, es ist viel mehr die Art wie er seine Geschichte vermarktet. Über die Geschichte des Musikers baut das Publikum eine Identifikation zu ihm auf. Wenn man über die eigenen Idole nachdenkt, so hatte jedes dieser Idole eine ganz besondere Geschichte die den Zuhörer fasziniert hat und zu der er eine Bindung aufgebaut hat.
Denken wir mal über einige 80er/90er Klassiker nach …
- Bob Marly
- Jimi Hendrix
- Queen
- …. oder wie wärs mit Böhse Onkelz…?
Jeder der oben genannten Chart-Stars verkörpert eine ganz spezielle Geschichte die das Publikum angesprochen hat. Bei den modernen Gangstar-Rap/Hip Hop-Stars ist das ähnlich …
- Capital Bra
- Bushido
- Kollegah …
Die jüngeren Künstler sind Personen, die dem älteren Publikum nichts sagen. Sie haben in der Regel keinerlei instrumentelle Kenntnisse sondern beherrschen lediglich ihre Rap-Betonung und den Rythmus (über „gute“ Texte mag man streiten).
Hauptaufgabe von Musiker-Images
Viele der nachfolgend genannten Hauptaufgaben beziehen sich hauptsächlich auf Jugendliche, da bei diesen die Musik maßgeblich zur Identitätsfindung beiträgt. Menschen ab einem Alter von 31 Jahren hingegen versperren sich oftmals neuer Musik.
- Soziale Identität / Identitätsbildung
- Die Musik hilft die eigene Identität auszudrücken
- Selbstkategorisierung / Abgrenzung
- Individualität zeigen
- Gruppenprozesse
- Abgrenzung zu anderen Gruppen
- Gruppenzugehörigkeit
- Gruppennorm
- Gruppenzwang
Fazit
Wie wir damals eine Bindung zu unseren Idolen aufgebaut haben, bauen vielen Menschen auch nur eine Bindung zu Musik auf, indem sie durch die Geschichte des Musikers oder das Musiker-Image beeinflusst werden. Ein Pop-Musiker ohne Geschichte wird in den seltensten Fällen Erfolg haben, weil er seinem Publikum nicht die Möglichkeit zum Aufbau einer Identifikation oder Bindung ermöglicht.
Visual Studio 2013 .NET WPF : Where do i get / can i find the WPF Ribbon Control?
Problem
According to the .NET documentation the Ribbon Control should be available since WPF 4.5, what means is available since .NET Framework 4.5 . But you can not find it? Are you even thinking about the download of the Ribbon control for older versions? Not necessary, please see the following points…
Approach
We have to find out the right moment when it is generally possible to use the Ribbon control.
The following table shows, that the first version of WPF (3.0) was released with the .NET Framework 3.0. As you can see the version number of WPF is maintained synchron with the version number of the .NET framework.
| WPF Version | Release (YYYY-MM) | .NET Version | Visual Studio Version | Major Features |
|---|---|---|---|---|
| 3.0 | 2006-11 | 3.0 | N/A | Initial Release. WPF development can be done with VS 2005 (released in Nov 2005) too with few additions as described here. |
| 3.5 | 2007-11 | 3.5 | VS 2008 | Changes and improvements in: Application model, data binding, controls, documents, annotations, and 3-D UI elements. |
| 3.5 SP1 | 2008-08 | 3.5 SP1 | N/A | Native splash screen support, New WebBrowser control, DirectX pixel shader support. Faster startup time and improved performance for Bitmap effects. |
| 4.0 | 2010-04 | 4.0 | VS 2010 | New controls: Calendar, DataGrid, and DatePicker. Multi-Touch and Manipulation |
| 4.5 | 2012-08 | 4.5 | VS 2012 | New Ribbon control New INotifyDataErrorInfo interface |
| 4.5.1 | 2013-10 | 4.5.1 | VS 2013 | No Major Change |
| 4.5.2 | 2014-05 | 4.5.2 | N/A | No Major Change |
| 4.6 | 2015-07 | 4.6 | VS 2015 | Transparent child window support HDPI and Touch improvements |
Solution
When you have installed at least .NET Framework 4.5 you can Add the Reference „System.Windows.Control.Ribbon“ as follows:
1.) Expand the tree in in your Solution Explorer of you WPF application
2.) Right-click the „Add References“ entry and choose „Add Reference“

3.) In the following dialog search for „Ribbon“ in the search field on the upper right

4.) After that you should be able to add the reference by using the checkbox
5.) In your XAML Code you are now able to use the <Ribbon/> Tag
Optional: 6.) If you want to use a RibbonWindow instead of a WPF Window which allows you to have the Quick Access Controls at the top of the window, you have to do the declaration in the head of MainWindow.xaml as follows:
<ribbon:RibbonWindow x:Class="WPFTutorial.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
Title="WPF Layoutmanager" Height="399" Width="763">
<DockPanel LastChildFill="True">
<Ribbon DockPanel.Dock="Top" >
</Ribbon>
<!-- Put the last Child here -->
</DockPanel>
</ribbon:RibbonWindow>
Additionally you have to change the base class name in the code behind window and add the using System.Windows.Controls.Ribbon :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WPFTutorial
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : RibbonWindow
{
public MainWindow()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Test");
}
}
}
.NET WPF : XAML locations to place and change WPF Styles
Intention
Like in HTML/CSS there are different source code locations where it is possible to apply appearance styles to WPF controls. In this article i want to make a really short summary of those points.
Approach
The following examples are showing the declaration places for styles in the order from local control styles to global application styles
Location examples
App.xaml (global application wide styles)
<Application x:Class="WPFTutorial.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#ff0000" />
<Setter Property="FontSize" Value="24" />
</Style>
</Application.Resources>
</Application>
MainWindow.xaml (local hierarchical inheritance from the WPF DOM)
<Window x:Class="WPFTutorial.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WPF Layoutmanager" Height="322" Width="528">
<Window.Resources>
<Style TargetType="TextBlock">
<!-- This sets all TextBlock FontSize Styles within the Grid -->
<Setter Property="FontSize" Value="15" />
<Setter Property="Foreground" Value="red" />
</Style>
<Style TargetType="TabControl">
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
</Style>
</Window.Resources>
<DockPanel>
<TextBlock DockPanel.Dock="Top" VerticalAlignment="Center" Text="Ein Dockpanel.Dock=Top ist das hier und TabControl als LastChild gestretcht" />
<TabControl>
<TabItem Header="Grid">
<Grid>
<Grid.Resources>
<Style TargetType="TextBlock">
<!-- This sets all TextBlock FontSize Styles within the Grid -->
<Setter Property="FontSize" Value="15" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Button Width="140" Height="50" Click="Button_Click">
<StackPanel Orientation="Horizontal">
<Image Margin="10" Source="Images/haken.png" Stretch="UniformToFill"/>
<TextBlock VerticalAlignment="Center" Text="Play Sound" />
</StackPanel>
</Button>
<Button Grid.Column="1" Grid.Row="2" Width="140" Height="50" Click="Button_Click">
<StackPanel Orientation="Horizontal">
<Image Margin="10" Source="Images/haken.png" Stretch="UniformToFill"/>
<TextBlock VerticalAlignment="Center" Text="Play Sound" />
</StackPanel>
</Button>
<Button Grid.Column="2" Grid.Row="1" Width="140" Height="50" Click="Button_Click">
<StackPanel Orientation="Horizontal">
<Image Margin="10" Source="Images/haken.png" Stretch="UniformToFill"/>
<TextBlock VerticalAlignment="Center" Text="Play Sound" >
<TextBlock.Style>
<!-- Dieser Style gilt nur für den Textblock local und überschreibt den GRID Style -->
<Style>
<Setter Property="TextBlock.FontSize" Value="10" />
<Setter Property="TextBlock.FontWeight" Value="Bold" />
<Setter Property="TextBlock.Foreground" Value="#ff00ff" />
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</Button>
</Grid>
</TabItem>
<TabItem Header="StackPanel">
<StackPanel Orientation="Vertical">
<TextBlock Text="Dummfug ersetzt Irrsinn"/>
<TextBlock Text="Irrsinn ersetzt Dummfug" />
<TextBlock Text="Das letzte Child ist im Gegensatz zum Dockpanel nicht gestretcht" >
<TextBlock.Style>
<Style>
<Setter Property="TextBlock.Foreground" Value="#ff00ff" />
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</TabItem>
</TabControl>
</DockPanel>
</Window>

C# .NET : Collections im .NET Framework
Intention
Eines der wichtigsten .NET Elemente zum Verwalten vom Datenbeständen im Speicher sind Collections (Auflistungen). Im Vergleich zu normalen Array-Typen bieten diese die Möglichkeit zur Laufzeit Objekte hinzuzufügen, ohne vorher die Größe/die Anzahl der Objekte in der Collection zu kennen. Collections bieten Funktionen zum Hinzufügen, Entfernen und Suchen/Finden von Objekten. Ist ein Objekt in einer Auflistung erstmal gefunden, kann dieses über die Objektreferenz auch direkt in der Auflistung geändert werden.
Auflistungen implementieren das Interface „IEnumerable“, um das Iterieren durch die Objekte in der Liste zu ermöglichen. Die foreach-Schleife nutzt beispielsweise dieses Interface um durch alle Objekte einer Collection zu iterieren.
Über die Abfragesprache LINQ (Language Integrated Query) lassen sich SQL-ähnliche Abfragen auf Collections durchführen,
Namespaces / Namensräume
Der Namensraum für .NET Framework Collections liegt unter System.Collections.*, wobei weitere Sub-Namensräume existieren.
- System.Collections.Concurrent (mehrere Threads / Tasks können parallel auf diesen Collections im Speicher operieren)
- System.Collections.Immutable (man arbeitet hierbei nur auf Kopien / die ursprünglichen Daten werden nicht geändert – muss zusätzlich über NuGet-Paket installiert werden)
- System.Collections.Generic
Dynamische Strukturen/Collections allokieren immer 2^n Speicher-Plätze
Die Property „Capacity“, welche an jeder Collection anhängt, zeigt die Anzahl der Speicherplätze, die die Collection intern als Array alloziert hat. Bei 1025 Elementen werden intern 2048 Plätze vorbereitet. Bei 2049 Elementen werden intern 4096 Plätze vorbereitet.
IBM Doors DXL: Simple String DIFF Comparation in Layout DXL
Problem
Two strings shall be compared with the DIFF function of Doors
Approach
Assign the string to a buffer using the += operator
Solution
void compareStrings(string string1, string string2)
{
Buffer string1Buff = create;
Buffer string2Buff = create;
Buffer result = create;
string1Buff+=string1;
string2Buff+=string2;
diff(result, string1Buff, string2Buff);
displayRichWithColor(stringOf(result));
delete string1Buff;
delete string2Buff;
delete result;
}

IBM Doors DXL: Simple Incoming Links / In-Links / Input Links Layout DXL
string linkModuleString="/Product Lifecycle Management/10 Administration/Accords";
Link lnk;
LinkRef lnkRef;
ModName_ otherMod = null;
Item linkModItem = itemFromID(uniqueID(item(linkModuleString)));
linkModName = fullName(linkModItem);
for lnkRef in all(obj<-linkModName) do
{
otherMod = module (sourceVersion lnkRef);
if (!null otherMod)
{
if ((!isDeleted otherMod) && (null data(sourceVersion lnkRef)))
{
load((sourceVersion lnkRef),false);
}
}
}
for lnk in all(obj<-linkModName) do
{
Object src = source lnk;
if ( isDeleted(src) || null(src) ) continue;
display src."Object Text" "";
}
Atlassian JIRA: The scariest thing about COVID-19 is, that it looks like a JIRA ticket
One thing that makes me very scary every time i hear about it is, that COVID-19 looks like a JIRA ticket. To demonstrate what i mean i just made a new project with COVID project prefix.


Microsoft SQL Server: How-to realize a SQL Statement that only returns the maximum or the minimum rows of a group (similar to an non-existing aggregate function for the GROUP BY clause)
Actual situation
A change request (field „pcr“) only can have one unique assigned user that shall be informed about the assignment every night.
The assigned user (field „created_by“) of a change requests (field „pcr“) is changing several times a day. Every time the user (field „created_by“) changes to another user, a table entry with the actual time stamp (field „created_on“) is inserted to a SQL table.
At the end of the day, the system shall report via email the users that have been assigned to a PCR (only one user per change request).
The following table contains entries with people wo shall be informed every evening.
| id | pcr | created_on | created_by |
|---|---|---|---|
| 1 | PCR-1 | 2020-02-26 09:20:52.977 | user1 |
| 2 | PCR-1 | 2020-02-26 09:20:54.667 | user1 |
| 3 | PCR-2 | 2020-02-26 09:20:57.137 | user1 |
| 4 | PCR-2 | 2020-02-26 09:20:59.003 | user1 |
| 5 | PCR-2 | 2020-02-26 09:21:07.540 | user3 |
| 6 | PCR-3 | 2020-02-26 09:21:09.850 | user3 |
| 7 | PCR-4 | 2020-02-26 09:21:12.850 | user3 |
| 8 | PCR-4 | 2020-02-26 09:21:15.100 | user3 |
| 9 | PCR-5 | 2020-02-26 09:21:55.323 | user3 |
| 10 | PCR-2 | 2020-02-26 09:22:06.037 | user2 |
| 11 | PCR-5 | 2020-02-26 09:22:07.037 | user2 |
| 12 | PCR-7 | 2020-02-26 09:22:08.760 | user2 |
| 13 | PCR-7 | 2020-02-26 10:20:07.233 | user2 |
| 14 | PCR-8 | 2020-02-26 10:20:08.967 | user2 |
| 15 | PCR-8 | 2020-02-26 10:20:13.393 | user1 |
| 16 | PCR-9 | 2020-02-26 10:20:15.020 | user1 |
| 17 | PCR-7 | 2020-02-26 10:20:19.497 | user3 |
| 18 | PCR-9 | 2020-02-26 10:20:20.163 | user3 |
A nightly executed batch job (at 23:59h every evening) shall provide the possibility to inform user1, user2 or user3 about their assigned PCR’s. Only the latest entry per PCR, that can be recognized by the timestamp (field „created_on“) represent the user assigned user at the end of the day
Problem
The SQL Statement shall output the latest entry per assigned user of each PCR. With a standard aggregate function this is not possible because the whole row entry has to be retrieved.
Approach
The Microsoft SQL Server has a proprietary function RANK(), that prints out the ranking of the PCR entry in connection with PARTITION BY and ORDER BY. The ORDER BY has to be used DESC, so that the latest entry always is on rank 1.
Because this methods only can be used within the SELECT statements fields and not withing WHERE, we need a second parent query to select everything with rank 1.
Solution
SELECT *
FROM (
SELECT id,
pcr,
created_on,
created_by,
RANK () OVER (
PARTITION BY pcr
ORDER BY created_on DESC
) as biggestHasRangOne
FROM nightly_email
)tab
WHERE biggestHasRangOne=1
AND CONVERT(date, GETDATE())=CONVERT (date, created_on)

To get the smallest one (minimum) in for that day you have to use
ORDER BY created_on ASC
In the RANK() – Partition by -Syntax.