Skip to content

Instantly share code, notes, and snippets.

View DDzia's full-sized avatar
:octocat:

Dziarkach Dzianis DDzia

:octocat:
  • Social Discovery Ventures
  • Belarus, Minsk
View GitHub Profile
foreach (Row currentRow in rows)
{
//write the row start element with the attributes added above
_writer.WriteStartElement(currentRow);
foreach (OpenXmlElement currentCell in currentRow.ChildElements)
{
var cell = (Cell)currentCell;
//write the start of the cell element with the type and cell reference attributes
var conn = new SqlConnection("some connection string");
var db = new DatabaseContext(conn);
const string tableName = "dbo.tUsers";
var dataFound = db.QueryToTable(tableName)
.Where(x => (string)x["UserName"] == "Dzianis")
.ToList();
@DDzia
DDzia / Startup.cs
Last active January 29, 2019 20:47
using System;
using System.Diagnostics;
using System.Linq;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(WebApplication5.Startup))]
namespace WebApplication5
{
@DDzia
DDzia / Web.config
Last active January 29, 2019 22:02
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<staticContent>
<!-- no cache for bundles -->
<clientCache cacheControlMode="DisableCache"/>
</staticContent>
</system.webServer>
</configuration>
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<activity>
<entry>
<record>1</record>
<time>2019/03/05 09:32:42.773</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Microsoft Visual Studio 2017 version: 15.0.28307.421</description>
</entry>
var UserType = (function(){
function UserType(){ }
// some code ...
return UserType;
})();
var UserType;
(function(){
/* other code */
})(UserType || UserType = <type_initializer>);
var typeName = (function(){ /* something here */ })();
class User {
}