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
FileStream fileStream = new FileStream("C:\\Temp\\EncompassExtract.csv", FileMode.Create); | |
var streamWriter = new StreamWriter(fileStream); | |
streamWriter.AutoFlush = true; | |
StringBuilder line = new StringBuilder(); | |
line.AppendFormat("User" + "," + "UserId" + "," + "Account Enabled"); | |
line.Append(Environment.NewLine); | |
foreach (User user in users) | |
{ | |
line.AppendFormat(user.FullName + "," + user.Id + "," + user.Enabled); | |
line.Append(Environment.NewLine); |
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
//Turns "My first blog post" into my-first-blog-post | |
function slugIt() { | |
let title = document.getElementById("title"); | |
let slug = document.getElementById("slug"); | |
slug.value = title.value.replace(/ /g, "-").toLowerCase(); | |
} |
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 Login() { | |
jQuery.support.cors = true; | |
$.ajax({ | |
type: 'GET', | |
url: 'api/Account/ExternalLogins?returnUrl=%2F&generateState=true', | |
dataType: 'JSON', | |
success: function (data) { | |
var url = (data[0].Url); | |
window.open(url, '_self', false); | |
} |
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
var app = angular.module('CarFinderApp', []); | |
app.controller('DisplayController', ['$scope', '$http', function ($scope, $http) { | |
$scope.selected = { | |
year: '', | |
make: '', | |
model: '', | |
trim: '' | |
}; | |
} |
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
<form id="search_form" action="/listings/search" method="get"> | |
<%= hidden_field_tag :search_item_id %> | |
<%= hidden_field_tag :search_item_type %> | |
<fieldset> | |
<span class="search"> | |
<% q = params[:term].to_s.empty? ? "Instant search result as you type" : params[:term] %> | |
<script>var start_search = true</script> | |
<input type="text" class="input" id="search_field" name="q" value="<%=q%>" onclick="if(this.value=='Instant search results as you type'){this.value=''};start_search=true;$('search_results').hide()" autocomplete="off" /> | |
<%= indicator("search_ind") %> | |
</span> |