This file contains hidden or 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 ExcelOperations | |
{ | |
public List<List<string>> Read(string filePath) | |
{ | |
OleDbConnection conn = new OleDbConnection("Provider = Microsoft.ACE.OLEDB.12.0; Data Source = " + filePath + "; Extended Properties = 'Excel 8.0; HDR=NO'"); | |
OleDbCommand cmd = new OleDbCommand("select * from [Sheet1$]", conn); | |
conn.Open(); | |
OleDbDataReader dr = cmd.ExecuteReader(); |
This file contains hidden or 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 PreFlightHandler : DelegatingHandler | |
{ | |
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
{ | |
if (request.Headers.Contains("Origin")) | |
{ | |
var origin = request.Headers.GetValues("Origin").ToList()[0]; | |
if (request.Method.Method.Equals("OPTIONS")) | |
{ |
This file contains hidden or 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 ng-app='myApp'> | |
<head> | |
<title>Simple Angular.Js Get Sample Snippet</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-beta.1/angular.min.js"></script> | |
<script> | |
angular.module('myApp', []).controller('myCtrl', function ($scope, $http) { | |
$scope.hello = {}; | |
$scope.newName = ""; | |
NewerOlder