Problem
Der Microsoft IIS Server meldet 404 beim runterladen eines Webfonts
Ansatz – Approach
Unter MIME Type lässt sich der Typ application/font-woff konfigurireren.
Sie wissen nicht wie Sie per Handy ihr (vorhandenes) Geld auf dem BWIN-Konto zurück per Paypal bekommen?
You do not know where to find the option in the mobile version to get back your money on bwin.com (bet and win) ?
Öffnen Sie bwin.com auf ihrem Mobiltelefon und loggen sie sich ein
In der oberen linken Ecke klicken sie auf das Menü-Symbol
In dem erscheinenden Menü wählen sie die Option „Cashier“
Die gewünschte Option heißt „Withdrawal“, welche Sie nun per Klick auswählen
Nun können sie ihre bevorzugte Geld-zurück-Weise wählen (z.B. Paypal)
Geben Sie den Betrag ein, den Sie zurückbuchen möchten
Geben Sie weitere Daten, die für ihre gewählte Zahlungsweise nötig sind, an.
Open bwin.com on your mobile phone and log-in
Click the upper left corner (menu button) on the mobile version of the website.
In the appearing menu select „Cashier“
Click the „Withdrawal“ Option
You can select VISA / Neteller / PayPal / Fast Bank Transfer / Skrill
Choose the amount you want to get back from you bwin-account
Enter additional data according to your payment method
The Images of a specific diagram in the data structure of the Sparx Systems Enterprise Architect should be read by diagram name.
Usage of MDB Plus and Data Mining
This is SQL for the Access / .eap-File – it should be rewritten for other SQL Servers (i.e. the brackets can be removed and Functions like InStr/Mid shall be replaced)
SELECT dia.Name As Diagram,
IIF(Trim(objstart.[Name]) = 'Text', 'Text', objstart.stereotype) As stereotype,
diaobj.RectLeft As x,
diaobj.RectTop As y,
diaobj.RectRight-diaobj.RectLeft As Width,
Abs(diaobj.RectBottom-diaobj.RectTop) As Height,
objstart.Object_ID,
IIF(Trim(objstart.[Name]) = 'Text', 'Text-'& objstart.Object_ID ,objstart.Alias) As [key],
IIF(objstart.[Name] = 'Text', objstart.Note, objstart.[Name]) As phaseName,
objstart.[ea_guid] As [guid],
diaobj.ObjectStyle,
IIF(
InStr(diaobj.ObjectStyle, "ImageID")>0,
Mid(diaobj.ObjectStyle, InStr(diaobj.ObjectStyle, "ImageID")+8 , Len(diaobj.ObjectStyle)- (InStr( diaobj.ObjectStyle, "ImageID")+8) ),
''
) As ImageId
FROM
((
[t_diagram] dia LEFT JOIN (Select Diagram_ID, Object_ID, RectLeft, RectTop, RectRight, RectBottom, ObjectStyle from [t_diagramobjects]) diaobj ON dia.[Diagram_ID]=diaobj.[Diagram_ID])
LEFT JOIN [t_object] objstart ON objstart.[Object_ID]=diaobj.[Object_ID])
WHERE objstart.Object_Type IN ('Text','Boundary') AND IIF(InStr(diaobj.ObjectStyle, "ImageID")>0,
Mid(diaobj.ObjectStyle, InStr(diaobj.ObjectStyle, "ImageID")+8 ,
Len(diaobj.ObjectStyle)- (InStr( diaobj.ObjectStyle, "ImageID")+8) ),
'') <> ''
AND dia.Name='0'
ORDER BY 12 DESC,1,2,3,4,5,6,7,8,9
All Images of an Diagram (the ImageIds) shall be determined, so that can be read out from the table t_image (see previous article about BLOB and EA).
Usage of the tables
– t_diagram
– t_diagramobjects
– t_object
SELECT dia.Name As Diagram,
IIF(Trim(objstart.[Name]) = 'Text', 'Text', objstart.stereotype) As stereotype,
diaobj.RectLeft As x,
diaobj.RectTop As y,
diaobj.RectRight-diaobj.RectLeft As Width,
Abs(diaobj.RectBottom-diaobj.RectTop) As Height,
objstart.Object_ID,
IIF(Trim(objstart.[Name]) = 'Text', 'Text-'& objstart.Object_ID ,objstart.Alias) As [key],
IIF(objstart.[Name] = 'Text', objstart.Note, objstart.[Name]) As phaseName,
objstart.[ea_guid] As [guid],
diaobj.ObjectStyle,
IIF(
InStr(diaobj.ObjectStyle, "ImageID")>0,
Mid(diaobj.ObjectStyle, InStr(diaobj.ObjectStyle, "ImageID")+8 , Len(diaobj.ObjectStyle)- (InStr( diaobj.ObjectStyle, "ImageID")+8) ),
''
) As ImageId
FROM
((
[t_diagram] dia LEFT JOIN (Select Diagram_ID, Object_ID, RectLeft, RectTop, RectRight, RectBottom, ObjectStyle from [t_diagramobjects]) diaobj ON dia.[Diagram_ID]=diaobj.[Diagram_ID])
LEFT JOIN [t_object] objstart ON objstart.[Object_ID]=diaobj.[Object_ID])
WHERE objstart.Object_Type IN ('Text','Boundary') AND IIF(InStr(diaobj.ObjectStyle, "ImageID")>0,
Mid(diaobj.ObjectStyle, InStr(diaobj.ObjectStyle, "ImageID")+8 ,
Len(diaobj.ObjectStyle)- (InStr( diaobj.ObjectStyle, "ImageID")+8) ),
'') <> ''
AND dia.Name='{PutInYourDiagramNameHere}'
ORDER BY 12 DESC,1,2,3,4,5,6,7,8,9
The order of tree elements in the project browser should be queried in SQL.
Die Reihenfolge der Objekte im Projekt-Browser soll über SQL abgefragt werden
Usage of the TPos column within the tables t_object and t_package.
Verwendung der TPos Spalte in den Tabellen t_object und t_package.
SELECT b.TPos as Package_Position,
b.Name as Package_Name,
a.TPos as Object_Tree_Position,
a.Object_ID,
a.Name as Object_Description
FROM t_object a INNER JOIN t_package b ON a.Package_ID=b.Package_ID
WHERE Stereotype='Process Step'
ORDER BY 1,2,3
Die Datenstruktur DataTable von .NET muss richtig initialisiert wreden
public DataTable initDataGrid()
{
DataColumn c0 = new DataColumn("ID");
DataColumn c1 = new DataColumn("FILE");
DataColumn c2 = new DataColumn("SITE");
DataColumn c3 = new DataColumn("OBJEKTSTEREOTYPE");
DataColumn c4 = new DataColumn("TAB");
DataColumn c5 = new DataColumn("STEREOTYPE");
DataColumn c6 = new DataColumn("CONNECTION");
DataColumn c7 = new DataColumn("LINK");
DataColumn c8 = new DataColumn("LINK_TO_ID");
DataColumn c9 = new DataColumn("ALIAS");
dataTable.Columns.Add(c0);
dataTable.Columns.Add(c8);
dataTable.Columns.Add(c1);
dataTable.Columns.Add(c2);
dataTable.Columns.Add(c9);
dataTable.Columns.Add(c3);
dataTable.Columns.Add(c4);
dataTable.Columns.Add(c5);
dataTable.Columns.Add(c6);
dataTable.Columns.Add(c7);
return dataTable;
}
public void main()
{
DataTable dataTable = new DataTable("Tabellenname");
dataTable.Clear();
// Hier in einer Schleife die Tabelle befüllen
// Use i.e. Loops to fill the table like this
DataRow row = dataTable.NewRow();
row["ID"] = "1";
row["FILE"] = "2";
row["SITE"] = "3";
row["OBJEKTSTEREOTYPE"] = "4";
row["TAB"] = "5";
row["STEREOTYPE"] = "6";
row["CONNECTION"] = "7";
row["LINK"] = "8";
row["ALIAS"] = "9";
dataTable.Rows.Add(row);
}
Der TreeView-Baum soll anhand von Strings befüllt werden
Verwendung eines Backslashes wie bei Dateipfaden zur Baumeinrückung
private void populateTreeFromStringArray(string[] lines)
{
SortedList sl = new SortedList();
this.treeView1.Nodes.Clear();
this.treeView1.BeginUpdate();
// this.treeView1.ShowRootLines;
TreeNodeCollection parentNodes = this.treeView1.Nodes;
foreach (string line in lines)
{
string[] stringParts = line.Split('\\');
TreeNode nd = null;
// Der Parent Key wird leer inititalisiert
string strParentKey = string.Empty;
foreach (string s in stringParts)
{
string sTrimmed = s.Trim();
if (sTrimmed == string.Empty)
{
continue;
}
if (strParentKey.Length > 0)
{
strParentKey = string.Concat(strParentKey, @"\", sTrimmed);
}
else
{
strParentKey = string.Concat(strParentKey, sTrimmed);
}
if (sl.ContainsKey(strParentKey))
{
//verwende diesen
nd = sl[strParentKey] as TreeNode;
}
else
{
//create new
nd = new TreeNode(sTrimmed);
//den FullPath adden
sl.Add(strParentKey, nd);
parentNodes.Add(nd);
}
parentNodes = nd.Nodes;
}
}
this.treeView1.EndUpdate();
}
private void button4_Click(object sender, EventArgs e)
{
string[] lines=new string[]
{
@"E:\",
@"E:\Bier",
@"D:\Eigene Dateien",
@"D:\Programme\Games",
@"D:\Eigene Dateien\Eigene Musik2",
@"D:\",
@"D:\Eigene Dateien\Eigene Downloads\Multi",
@"D:\Eigene Dateien\Eigene Downloads\Multi\CD 1",
@"D:\Eigene Dateien\Eigene Downloads\Multi\CD 2",
@"D:\Eigene Dateien\Eigene Downloads\Multi\CD 3",
@"D:\Eigene Dateien\Eigene Downloads\Multi\CD 3\Teil 2",
@"D:\Eigene Dateien\Eigene Downloads\Multi\CD 4"
};
populateTreeFromStringArray(lines);
}
A binary picture that has been saved in a database or an Access File (i.e. of the Sparx Systems Enterprise Architect) shall be displayed on a web page.
using System;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class GetImage : System.Web.UI.Page
{
// Mit folgender URL Kann ein Bild nun rausgeladen werden
// http://localhost:51241/GetImage.aspx?img=343868582
// und entsprechend in HTML über den Image-Tag geladen werden:
// <img src="GetImage.aspx?img=343868582" />
protected void Page_Load(object sender, EventArgs e)
{
string sqlStatement = @"
SELECT Image
FROM t_image
WHERE ImageID={ImageID}
";
sqlStatement = sqlStatement.Replace("{ImageID}", Request.QueryString["img"].Trim());
OleDbConnection conn = new OleDbConnection(MyConfigurationManager.eapFilePath);
try
{
conn.Open();
OleDbCommand comm = new OleDbCommand();
comm.Connection = conn;
comm.CommandText = sqlStatement;
OleDbDataReader reader = comm.ExecuteReader();
while (reader.Read())
{
Response.ContentType = "image/jpeg"; // if your image is a jpeg of course
Response.BinaryWrite((byte[])reader.GetValue(0));
}
}
catch (Exception ex)
{
//return e.Message;
}
finally
{
conn.Close();
}
}
}
A SQL statement is needed, that returns a list of all link relations with start and end object name. Additionally a tagged value (here it is called ‚Object identifier‘) should be appended
Usage of MDB Plus
Note: If you do not need tagged values, you can customize the following Access / .eap-File Statement in the way that you reduce it by leaving out the last 2 LEFT JOINs (and don’t forget to remove the Columns from the Select clause).
SELECT objstart.[Object_ID] As EAIDSource,
objstart.[Name] AS EANameSource,
objpropstart.[Value] AS DoorsSoruceObjectID,
tconn.[Connector_ID] AS EAConnectorID,
tconn.[Direction] AS EADirection,
tconn.[Connector_Type] AS EAConnectorType,
tconn.[Stereotype] AS EAStereoType,
objend.[Object_ID] AS EAIDTarget,
objend.[Name] AS EANameTarget,
objpropende.[Value] AS DoorsTargetObjectID
FROM
(((
[t_connector] tconn LEFT JOIN [t_object] objstart ON tconn.[Start_Object_ID]=objstart.[Object_ID])
LEFT JOIN [t_object] objend ON tconn.[End_Object_ID]=objend.[Object_ID])
LEFT JOIN (SELECT [Object_ID], [Property], [Value] FROM [t_objectproperties] WHERE [Property]="Object identifier" ) objpropstart ON tconn.[Start_Object_ID]=objpropstart.[Object_ID] )
LEFT JOIN (SELECT [Object_ID], [Property], [Value] FROM [t_objectproperties] WHERE [Property]="Object identifier" ) objpropende ON tconn.[End_Object_ID]=objpropende.[Object_ID]
A SQL Statement is needed to get the coordinates of Diagram Object like Activities, Classes, Lanes and so on…
In this statement only the stereotypes ‚Project Phase‘, ‚Gate‘, ‚Product Maturity‘, ‚Lane‘ of the diagram ‚Product Creation Process‘ will be selected
Usage of MDB Plus or another SQL Tool
This example is for Access / .eap-Files
SELECT dia.Name As Diagram,
objstart.stereotype,
diaobj.RectLeft As x,
diaobj.RectTop As y,
diaobj.RectRight-diaobj.RectLeft As Width,
Abs(diaobj.RectBottom-diaobj.RectTop) As Height,
objstart.Object_ID,
objstart.Alias,
objstart.[Name] As ProcessStep
FROM
((
[t_diagram] dia LEFT JOIN (Select Diagram_ID, Object_ID, RectLeft, RectTop, RectRight, RectBottom from [t_diagramobjects]) diaobj ON dia.[Diagram_ID]=diaobj.[Diagram_ID])
LEFT JOIN [t_object] objstart ON objstart.[Object_ID]=diaobj.[Object_ID])
WHERE dia.Name='Product Creation Process'
AND objstart.stereotype IN ('Project Phase', 'Gate', 'Product Maturity', 'Lane')
ORDER BY 1,2,3,4,5,6,7,8,9