Skip to content

Instantly share code, notes, and snippets.

Hendrik Bulens hbulens

Block or report user

Report or block hbulens

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 2016-01-14-custom-properties-in-log4net-logging_006.xml
<appender name="TracingAppenderDatabase" type="log4net.Appender.AdoNetAppender">
<bufferSize value="10" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionStringName value="MyContext" />
<commandText value="INSERT INTO Logs ([Date],[Thread],[Level],[Logger],[Message],[Exception], [Category], [User]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception, @Category, @User)" />
<parameter>
<parameterName value="@log_date" />
<dbType value="DateTime" />
<layout type="log4net.Layout.RawTimeStampLayout" />
</parameter>
View 2015-07-26-difference-between-readonly-and-const-in-c_001.cs
public class MyClass
{
public const int _myCustomConstField = 1;
public readonly int _myCustomReadOnlyField = 1
public MyClass()
{
_myCustomConstField = 2; // Invalid statement
_myCustomReadOnlyField = 2; // Valid statement
}
View 2015-10-26-things-i-always-have-to-google_001.txt
Failed to load resource: the server responded with a status of 404 (Not Found) http://mysite.azurewebsites.net/Content/Base/icons/line-icons/fonts/line-icons.woff
Failed to load resource: the server responded with a status of 404 (Not Found) http://mysite.azurewebsites.net/fonts/fontawesome-webfont.woff?v=4.4.0
Failed to load resource: the server responded with a status of 404 (Not Found) http://mysite.azurewebsites.net/Content/Base/icons/line-icons/fonts/Simple-Line-Icons.woff
Failed to load resource: the server responded with a status of 404 (Not Found) http://mysite.azurewebsites.net/Content/ExtJS/ext-watermark/fonts/ext-watermark.woff?n6lnws
Failed to load resource: the server responded with a status of 404 (Not Found) http://mysite.azurewebsites.net/Content/Base/icons/font-awesome/fontawesome-webfont.woff2?v=4.3.0
Failed to load resource: the server responded with a status of 404 (Not Found) http://mysite.azurewebsites.net/Content/Base/icons/font-awesome/fontawesome-webfont.woff?v=4.3.0
View 2015-10-26-things-i-always-have-to-google_002.xml
<system.webServer>
<staticContent>
<remove fileExtension=".svg">
<remove fileExtension=".eot">
<remove fileExtension=".woff">
<mimeMap fileExtension=".svg" mimeType="image/svg+xml">
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject">
<mimeMap fileExtension=".woff" mimeType="application/x-woff">
</staticContent>
</system.webServer>
View 2015-10-26-things-i-always-have-to-google_003.js
if (data === parseInt(data, 10))
alert("data is integer");
else
alert("data is not an integer");
View 2015-10-26-things-i-always-have-to-google_004.js
store.queryBy(function(record,id) {
return (record.get('oneField') == someValue && record.get('secondField') == otherValue);
});
View 2015-10-26-things-i-always-have-to-google_005.cs
[Flags] enum Colors
{
None = 0,
Red = 1,
Green = 2,
Blue = 4
};
public class Example
{
View 2015-12-02-asp-net-mvc-and-html5-web-workers_001.js
var pathToWebWorkerScript = ROOT + 'Scripts/webworker.js';
var worker = new Worker(pathToWebWorkerScript);
worker.onmessage = function (e) {
if (e && e != null) {
// Do work
}
}
var messageParameters = { parameter1: '1', parameter2: '2', };
worker.postMessage(messageParameters);
View 2015-12-02-asp-net-mvc-and-html5-web-workers_002.js
self.onmessage = function (e)
{
// Get existing appointments
&amp;amp; assignments
var param1 = e.data.parameter1;
var param2 = e.data.parameter2;
var myCustomParameters = {
myOtherCustomParam1: param1 ,
myOtherCustomParam2: param2
};
You can’t perform that action at this time.