Docker使用久了,会残留很多中间生成的镜像,占用磁盘空间。
要清理Docker镜像,本来是挺简单的,一条命令就搞定了:
| using System; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using System.Text; | |
| namespace UDP | |
| { | |
| public class UDPSocket | |
| { | |
| public Socket _socket; |
| let isAlreadyFetchingAccessToken = false | |
| let subscribers = [] | |
| function onAccessTokenFetched(access_token) { | |
| subscribers = subscribers.filter(callback => callback(access_token)) | |
| } | |
| function addSubscriber(callback) { | |
| subscribers.push(callback) | |
| } |
| public static class EfRepositoryBulkExtensions | |
| { | |
| public static void BulkInsert<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, IEnumerable<TEntity> entities) | |
| where TEntity : class, IEntity<TPrimaryKey>, new() | |
| { | |
| var dbContext = repository.GetDbContext(); | |
| dbContext.BulkInsert(entities); | |
| } | |
| public static async Task BulkInsertAsync<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, IEnumerable<TEntity> entities) |
| //Define your own session and add your custom field to it | |
| //Then, you can inject MyAppSession and use it's new property in your project. | |
| public class MyAppSession : ClaimsAbpSession, ITransientDependency | |
| { | |
| public MyAppSession( | |
| IPrincipalAccessor principalAccessor, | |
| IMultiTenancyConfig multiTenancy, | |
| ITenantResolver tenantResolver, | |
| IAmbientScopeProvider<SessionOverride> sessionOverrideScopeProvider) : | |
| base(principalAccessor, multiTenancy, tenantResolver, sessionOverrideScopeProvider) |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace MyApp.Hmac | |
| { | |
| public static class AuthenticationConstants | |
| { |
| //Demo usage | |
| public class HomeController : MyControllerBase | |
| { | |
| private readonly IRepository<MyEntity> _myEntityRepository; | |
| public HomeController(IRepository<MyEntity> myEntityRepository) | |
| { | |
| _myEntityRepository = myEntityRepository; | |
| } |
| .ui-datepicker { | |
| background-color: #fff; | |
| border: 1px solid #66AFE9; | |
| border-radius: 4px; | |
| box-shadow: 0 0 8px rgba(102,175,233,.6); | |
| display: none; | |
| margin-top: 4px; | |
| padding: 10px; | |
| width: 240px; | |
| } |
| /** | |
| * 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具 | |
| * | |
| * 参考 https://github.com/wandergis/coordtransform 实现的Java版本 | |
| * @author geosmart | |
| */ | |
| public class CoordinateTransformUtil { | |
| static double x_pi = 3.14159265358979324 * 3000.0 / 180.0; | |
| // π | |
| static double pi = 3.1415926535897932384626; |
| .ui-datepicker { | |
| background-color: #fff; | |
| border: 1px solid #66AFE9; | |
| border-radius: 4px; | |
| box-shadow: 0 0 8px rgba(102,175,233,.6); | |
| display: none; | |
| margin-top: 4px; | |
| padding: 10px; | |
| width: 240px; | |
| font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; |