This works on html 5 supported browsers.
A Pen by Chinh Vo Wili on CodePen.
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Net.Http; | |
| using System.Threading.Tasks; | |
| using Microsoft.AspNetCore.Http; | |
| using Microsoft.AspNetCore.Mvc; | |
| namespace TestAPIGithub.Controllers | |
| { |
| app.MapGet("/background", ( | |
| PeriodicHostedService service) => | |
| { | |
| return new PeriodicHostedServiceState(service.IsEnabled); | |
| }); |
| class PeriodicHostedService : BackgroundService | |
| { | |
| private readonly TimeSpan _period = TimeSpan.FromSeconds(5); | |
| private readonly ILogger<PeriodicHostedService> _logger; | |
| private readonly IServiceScopeFactory _factory; | |
| private int _executionCount = 0; | |
| public bool IsEnabled { get; set; } | |
| public PeriodicHostedService( | |
| ILogger<PeriodicHostedService> logger, |
| private int _executionCount = 0; | |
| public bool IsEnabled { get; set; } | |
| protected override async Task ExecuteAsync(CancellationToken stoppingToken) | |
| { | |
| using PeriodicTimer timer = new PeriodicTimer(_period); | |
| while ( | |
| !stoppingToken.IsCancellationRequested && | |
| await timer.WaitForNextTickAsync(stoppingToken)) | |
| { |
| -- ######################################################### | |
| -- Author: www.sqlbook.com | |
| -- Copyright: (c) www.sqlbook.com. You are free to use and redistribute | |
| -- this script as long as this comments section with the | |
| -- author and copyright details are not altered. | |
| -- Purpose: For a specified user defined table (or all user defined | |
| -- tables) in the database this script generates 4 Stored | |
| -- Procedure definitions with different Procedure name | |
| -- suffixes: | |
| -- 1) List all records in the table (suffix of _GetAll) |
| $.fn.autoSizr = function () { | |
| var el, elements, _i, _len, _results; | |
| elements = $(this); | |
| if (elements.length < 0) { | |
| return; | |
| } | |
| _results = []; | |
| for (_i = 0, _len = elements.length; _i < _len; _i++) { | |
| el = elements[_i]; | |
| _results.push((function(el) { |
| CREATE TABLE IF NOT EXISTS `country` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `iso` char(2) NOT NULL, | |
| `name` varchar(80) NOT NULL, | |
| `nicename` varchar(80) NOT NULL, | |
| `iso3` char(3) DEFAULT NULL, | |
| `numcode` smallint(6) DEFAULT NULL, | |
| `phonecode` int(5) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
This works on html 5 supported browsers.
A Pen by Chinh Vo Wili on CodePen.
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Bootstrap Table Checkbox Select All and Cancel</title> | |
| <link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <h2>Bootstrap Table Checkbox Select All and Cancel</h2> | |
| <table class="table table-striped"> |
| using System; | |
| using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; | |
| namespace Foo { | |
| // Implementation makes use of the IPropertyValidationFilter interface that allows | |
| // control over whether the attribute (and its children, if relevant) need to be | |
| // validated. | |
| [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = true)] | |
| public class ConditionalValidationAttribute : Attribute, IPropertyValidationFilter { | |
| public string OtherProperty { get; set; } |