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" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Imported Rule 1" stopProcessing="true"> | |
<match url="themes/.*/(layouts|pages|partials)/.*.htm" /> | |
<action type="Rewrite" url="index.php" /> | |
</rule> | |
<rule name="Imported Rule 2" stopProcessing="true"> |
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
public class ApplicationUser : IPrincipal | |
{ | |
private readonly RoleSet roles; | |
public ApplicationUser(RoleSet roles) | |
{ | |
this.roles = roles; | |
} | |
public bool IsInRole(string role) |
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
<?php | |
$source = "DespGoods.csv"; | |
$target = fopen("DespGoods.csv", "w"); | |
$conn = ftp_connect("ftp.server.com") or die("Could not connect"); | |
ftp_login($conn,"ftpusername","ftppassword"); | |
ftp_fget($conn,$target,$source,FTP_ASCII); | |
echo "file downloaded.\n"; |
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
.vertical-center { | |
min-height: 100%; /* Fallback for browsers do NOT support vh unit */ | |
min-height: 100vh; /* These two lines are counted as one :-) */ | |
display: flex; | |
align-items: center; | |
} |
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.Text; | |
using System.Security.Cryptography; | |
public class Program | |
{ | |
private const string key = "key"; | |
private const string message = "message"; | |
private static readonly Encoding encoding = Encoding.UTF8; |
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
/*! | |
* jQuery.parseJSON() extension (supports ISO & Asp.net date conversion) | |
* | |
* Version 1.0 (13 Jan 2011) | |
* | |
* Copyright (c) 2011 Robert Koritnik | |
* Licensed under the terms of the MIT license | |
* http://www.opensource.org/licenses/mit-license.php | |
*/ | |
(function ($) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<ul></ul> | |
<script> |
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; | |
namespace ConsoleApplication1.Migrations | |
{ | |
using System.Data.Entity.Migrations; | |
internal sealed class Configuration : DbMigrationsConfiguration<DatabaseContext> | |
{ | |
public Configuration() | |
{ |
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
function setWeatherIcon(condid) { | |
switch(condid) { | |
case '0': var icon = '<i class="wi-tornado"></i>'; | |
break; | |
case '1': var icon = '<i class="wi-storm-showers"></i>'; | |
break; | |
case '2': var icon = '<i class="wi-tornado"></i>'; | |
break; | |
case '3': var icon = '<i class="wi-thunderstorm"></i>'; |
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
static string RemoveDiacritics(string text) | |
{ | |
var normalizedString = text.Normalize(NormalizationForm.FormD); | |
var stringBuilder = new StringBuilder(); | |
foreach (var c in normalizedString) | |
{ | |
var unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c); | |
if (unicodeCategory != UnicodeCategory.NonSpacingMark) | |
{ |