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.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
namespace ExampleConsole | |
{ | |
class Program | |
{ |
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 void Main(string[] args) | |
{ | |
// Create a stopwatch for performance testing | |
var stopwatch = new Stopwatch(); | |
// Test content | |
var data = GetTestingBytes(); | |
// Looping Test | |
using (var s1 = new MemoryStream()) |
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 HomeController : Controller | |
{ | |
[HttpGet] | |
public ActionResult Index() | |
{ | |
return View(); | |
} | |
[HttpPost] | |
public ActionResult Index(HttpPostedFileBase file) |
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 COMP UpdateComp(COMP newObj, int idOriginal) | |
{ | |
var original = _context.Comps.FirstOrDefault(m => m.ID == idOriginal); | |
// Update these properties using your new information | |
original.CHECKLISTs = newObj.CHECKLISTs; | |
original.Division = newObj.Division; | |
_context.SaveChanges(); | |
// When you return the original it should have those changes made | |
return original; | |
} |
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
[Export(typeof(IVsTextViewCreationListener))] | |
[ContentType("aspx")] | |
[TextViewRole(PredefinedTextViewRoles.Document)] | |
class AspxTextViewListener : IVsTextViewCreationListener | |
{ | |
// This will be triggered when an HTML document is opened | |
public void VsTextViewCreated(IVsTextView textViewAdapter) | |
{ | |
// If the Glyphs haven't been loaded, load them | |
if(GlyphfriendPackage.Glyphs == null) |
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
[HttpPost] | |
[Route("Account/LogIn")] | |
public async Task<IActionResult> LogIn(SignInViewModel model, string returnUrl = null) | |
{ | |
// If you put the redirect here, it works fine... | |
ViewData["ReturnUrl"] = returnUrl; | |
if (ModelState.IsValid) | |
{ | |
// This doesn't count login failures towards account lockout |
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 asp-for="Organization" asp-items="ViewBag.Organizations" class="form-control custom-select"> | |
<option>Please select an Organization</option> | |
</select> |
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 asp-for="Group" asp-items="ViewBag.Options"> | |
<option>Please select an Option</option> | |
</select> |
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 EnvDTE; | |
using EnvDTE80; | |
using Microsoft.VisualStudio.Shell; | |
using Microsoft.VisualStudio.Shell.Interop; | |
using Microsoft.CSS.Editor.Completion; | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.Composition; | |
using System.Drawing; | |
using System.Drawing.Text; |
NewerOlder