This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Udvælg 8 tilfældige billeder til forsiden af galleriet | |
cmd.CommandText = "SELECT TOP 8 * FROM billede ORDER BY NEWID()"; | |
// Udvælg alle kategorier sammen med antallet af biller i hver kategori | |
cmd.CommandText = "SELECT kategori.id, kategori.navn, Count(billede.id) as billeder " | |
+ "FROM billede INNER JOIN kategori " | |
+ " ON billeder.FK_kategori_id = kategori.id " | |
+ "GROUP BY kategori.id, kategori.navn"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine 192.168.150.192 | |
login soren | |
password *************** | |
machine gitbix.magnussons.dk | |
login soren | |
password *************** | |
machine asp-net-snippets.scm.azurewebsites.net | |
login s0ren |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
public partial class _Default : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH=C:\Program Files (x86)\Spiceworks\Nmap;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\gource-0.38-1.win32;C:\Users\sm\Desktop\Phonie\adt-bundle-windows-x86_64-20130522\sdk\platform-tools;C:\Users\sm\Desktop\Phonie\adt-bundle-windows-x86_64-20130522\sdk\tools;%JAVA_HOME%\bin;%ANT_HOME%\bin; | |
Path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\QuickTime\QTSystem\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (tekstSomSkalKlippes.Length > maxLængde) | |
{ | |
return tekstSomSkalKlippes.Substring(0, maxLængde); | |
} | |
else | |
{ | |
return tekstSomSkalKlippes; | |
} | |
// eller som metode: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%# Eval("synligFra", "{0:D}") %> | |
// hele repeateren: | |
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSourceNyheder"> | |
<ItemTemplate> | |
<p class="smallredtext"><%# Eval("synligFra", "{0:D}") %></p> | |
<p class="smalltext"> | |
<%# Eval("titel") %></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<configuration> | |
<configSections> | |
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/> | |
</configSections> | |
<connectionStrings> | |
<add name="ConnectionString" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/> | |
</connectionStrings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Application Language="C#" %> | |
<script runat="server"> | |
void Application_Start(object sender, EventArgs e) | |
{ | |
// Code that runs on application startup | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM Albums | |
WHERE dato | |
between | |
DATEADD(month,-3, DATEADD(DAY,-(DATEPART(DAY, GETDATE()))+1, GETDATE())) | |
and | |
DATEADD(DAY,-(DATEPART(DAY, GETDATE()))+1, GETDATE()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
For more information on how to configure your ASP.NET application, please visit | |
http://go.microsoft.com/fwlink/?LinkId=169433 | |
--> | |
<configuration> | |
<system.web> | |
<compilation debug="true" targetFramework="4.5" /> |
OlderNewer