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
0x60606040526040516020806106f5833981016040528080519060200190919050505b80600160005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550806000600050819055505b506106868061006f6000396000f360606040523615610074576000357c010000000000000000000000000000000000000000000000000000000090048063095ea7b31461008157806318160ddd146100b657806323b872dd146100d957806370a0823114610117578063a9059cbb14610143578063dd62ed3e1461017857610074565b61007f5b610002565b565b005b6100a060048080359060200190919080359060200190919050506101ad565b6040518082815260200191505060405180910390f35b6100c36004805050610674565b6040518082815260200191505060405180910390f35b6101016004808035906020019091908035906020019091908035906020019091905050610281565b6040518082815260200191505060405180910390f35b61012d600480803590602001909190505061048d565b6040518082815260200191505060405180910390f35b61016260048080359060200190919080359060200190919050506104cb565b6040518082815260200191505060405180910390f35b6101976004808035906020019091908035906020019091 |
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 Nethereum.Web3; | |
using Nethereum.Web3.Accounts; | |
using NUnit.Framework; | |
namespace Tests | |
{ | |
public class ArticleTests | |
{ | |
string _privateKey; | |
Web3 _web3; |
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
https://www.raspberrypi.org/forums/viewtopic.php?t=189889 | |
Re: Raspberry Pi 3 cannot set up WiFi network | |
Quote | |
Wed Aug 02, 2017 9:30 am | |
Mind I can't explain it exactly, you could have the same issue as I had. When I got my pi I used the /etc/network/interfaces file to set my fixed IP address on eth0 (ethernet). | |
This worked fine with the exception of my wifi never working properly, but as I was using it with a hard wired cable I never added it as a priority to fix it. |
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
services.AddHostedService<ApplicationService>(); | |
services.AddHostedService<AnotherService>(); | |
services.AddHostedService<AnotherService>(); |
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
.UseSerilog((hostingContext, loggerConfiguration) => | |
{ | |
loggerConfiguration.ReadFrom.Configuration(hostingContext.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
// External settings provider | |
services.Configure<ExternalSettings>( (options) => { | |
// TODO: Get values from external settings provider (eg. Consul) | |
options.SomeValue = 1000; | |
options.AnotherValue = "a value"; | |
}); |
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
{ | |
"intervalMs": "1000", | |
"environment": "development", | |
"authentication": { | |
"username" : "dev_user", | |
"password" : "dev_pass" | |
} | |
} |
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
.ConfigureServices((hostContext, services) => { | |
services.Configure<ApplicationSettings>(hostContext.Configuration); | |
services.Configure<AuthenticationSettings>(hostContext.Configuration.GetSection("authentication")); | |
services.AddTransient<IRepository, Repository>(); | |
services.AddHostedService<ApplicationService>(); | |
}); |
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
// Program.cs | |
AuthenticationSettings bindedSettings = new AuthenticationSettings(); | |
hostContext.Configuration.Bind("authentication", bindedSettings); | |
services.AddSingleton<AuthenticationSettings>(bindedSettings); | |
// Repository.cs | |
public class Repository : IRepository | |
{ | |
private readonly AuthenticationSettings _authenticationSettings; |
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 AnotherService : BackgroundService | |
{ | |
private bool _isStopping; | |
protected override async Task ExecuteAsync(CancellationToken stoppingToken) | |
{ | |
try | |
{ | |
while(!stoppingToken.IsCancellationRequested && !_isStopping) | |
{ |