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 Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.AspNetCore.Http; | |
using System; | |
using Microsoft.AspNetCore.ResponseCompression; | |
using System.IO.Compression; |
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
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
<AssemblyName>AspNetCore2APP</AssemblyName> | |
<ServerGarbageCollection>true</ServerGarbageCollection> | |
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection> | |
<OutputType>Exe</OutputType> | |
</PropertyGroup> | |
<ItemGroup> |
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
ubuntu.16.04-x64 | |
-------------------- | |
dotnet publish -c Release -r ubuntu.16.04-x64 | |
Release_Windows_Server_2008_R2 | |
--------------------------------------------- | |
dotnet publish -c Release -r win7-x64 | |
Release_Windows_Server_2012_R2 | |
------------------------------------------- |
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 host = new WebHostBuilder() | |
.UseKestrel() | |
.UseLibuv(options => | |
{ | |
options.ThreadCount = 10; | |
}) | |
.UseUrls(url) | |
.UseContentRoot(Directory.GetCurrentDirectory()) | |
.UseStartup<Startup>() | |
.Build(); |
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 AmazonS3FileReader | |
{ | |
private AmazonS3Client GetAmazonS3Client() | |
{ | |
AmazonS3Client _client = new AmazonS3Client( | |
HttpFileReaderConfig.GetConfigData.AmazonS3AccessKey, | |
HttpFileReaderConfig.GetConfigData.AmazonS3SecretKey, | |
new AmazonS3Config { ServiceURL = HttpFileReaderConfig.GetConfigData.ServiceURL } | |
); | |
return _client; |
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
Currently almost all of our components implement componentWillMount | |
to trigger some operation in reaction to select page: | |
Example: | |
componentWillMount() { | |
// This method runs when the component is first added to the page | |
let startDateIndex = parseInt(this.props.match.params.startDateIndex) || 0; | |
this.props.requestTaskItems(startDateIndex); | |
} |
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
The full solution for the issue of the page reloading will be: | |
private renderButtons() { | |
return <div className="buttonDiv"> | |
<button type="button" className="btn btn-default" onClick={this.dataRefrech}>Refresh</button> | |
<button type="button" className="btn btn-default btn-right" onClick={this.handleClick}>Remove From Queue</button> | |
</div>; | |
} | |
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
handleClick() { | |
var array = []; | |
var elements = document.getElementsByClassName('checkTask'); | |
for (var i = 0; i < elements.length; i++) { | |
var p = elements[i].getAttribute('checked'); | |
if (p === 'checked') { |
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
let fetchQue = fetch(RunQueRequest) | |
.then((response) => response.json()) | |
.then((responseJson) => { | |
responseJson.map((QueItem: any) => { | |
var Key = "row_chk" + QueItem.Key; | |
var rowElement = document.getElementById(Key); | |
if (rowElement !== null) { | |
let parent = rowElement.parentNode; | |
var p = parent as HTMLElement; | |
p.removeChild(rowElement); |
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 Converter | |
{ | |
public static String EncodingBase64(String str) | |
{ | |
byte[] bytes = Encoding.UTF8.GetBytes(str); | |
string base64 = Convert.ToBase64String(bytes); | |
return base64; | |
} | |
public static String DecodeFromBase64(String str) |
OlderNewer