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
#!/bin/bash | |
# Define the base URL for the zip files | |
base_url="https://aqs.epa.gov/aqsweb/airdata/annual_aqi_by_county_" | |
# Define the range of years (from 2000 to 2022 in this example) | |
start_year=2015 | |
end_year=2022 | |
# Define the directory where you want to store the downloaded zip files |
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 DocxToJournalTransformer | |
{ | |
private const int BLOCK_TEXT = -2; | |
public void Transform(string docxFilename, Stream outputStream) | |
{ | |
var root = new Node(); | |
using (var document = DocX.Load(docxFilename)) | |
{ | |
var lastNode = root; |
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.IO; | |
using System.Linq; | |
using System.Text; | |
using Xunit; | |
namespace Parser | |
{ | |
public class Parser |
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 DemoFormModel | |
{ | |
[JsonSchemaExtensionData("label", "Label")] | |
[JsonSchemaExtensionData("required", true)] | |
[Description("The description appears below the input.")] | |
[MinLength(3)] | |
[MaxLength(50)] | |
public string TextProperty { get; set; } | |
public string StringProperty { get; set; } |
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
// | |
// MethodBaseRocks.cs | |
// | |
// Author: | |
// Jb Evain (jbevain@novell.com) | |
// | |
// WARNING: code now lives in http://github.com/jbevain/mono.reflection | |
// | |
// (C) 2009 Novell, Inc. (http://www.novell.com) | |
// |
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 static class EFHelpers | |
{ | |
/// <summary> | |
/// Helper function to update an EF model child collection from a view model posted from javascript. | |
/// </summary> | |
public static void MergeGraph<TModel, TUpdate, TId>( | |
ICollection<TModel> modelCollection, | |
ICollection<TUpdate> updateCollection, | |
DbSet<TModel> dbSet, | |
Func<TModel, TId> modelId, |
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 WhereBuilder | |
{ | |
private readonly IProvider _provider; | |
private TableDefinition _tableDef; | |
public WhereBuilder(IProvider provider) | |
{ | |
_provider = provider; | |
} |
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 WhereBuilder | |
{ | |
private readonly IProvider _provider; | |
private TableDefinition _tableDef; | |
public WhereBuilder(IProvider provider) | |
{ | |
_provider = provider; | |
} |
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 FastAccessor<T> where T : class | |
{ | |
private static readonly Hashtable _cache = new Hashtable(); | |
public static FastAccessor<T> For(T target) | |
{ | |
if (_cache.ContainsKey(typeof(T))) | |
{ | |
var dlg = (Action<T, string, object>)_cache[typeof(T)]; | |
return new FastAccessor<T>(dlg, target); |
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.Linq; | |
using PagedList; | |
public class DataTablesSearch | |
{ | |
public string Value { get; set; } | |
public bool Regex { get; set; } | |
} |
NewerOlder