首页
在线工具
搜索
1
使用Metrics指标度量工具监控Java应用程序性能(Gauges, Counters, Histograms, Meters和 Timers实例)
2
如何将Virtualbox和VMware虚拟机相互转换
3
Jumpserver的MFA配置
4
Markdown正确使用姿势
5
Kuboard与KubeSphere的区别:Kubernetes管理平台对比
杂谈与随笔
工具与效率
源码阅读
技术管理
运维
数据库
前端开发
后端开发
Search
标签搜索
Angular
Docker
Phabricator
SpringBoot
Java
Chrome
SpringSecurity
SpringCloud
DDD
Git
Mac
K8S
Kubernetes
ESLint
SSH
高并发
Eclipse
Javascript
Vim
Centos
Jonathan
累计撰写
86
篇文章
累计收到
0
条评论
首页
栏目
杂谈与随笔
工具与效率
源码阅读
技术管理
运维
数据库
前端开发
后端开发
页面
搜索到
86
篇与
的结果
2018-09-18
图片助手(ImageAssistant):强大的 Chrome 批量图片下载插件
图片助手(ImageAssistant):强大的 Chrome 批量图片下载插件 在日常浏览网页时,我们经常需要保存图片,但遇到大量图片时,手动一张张下载就显得极为低效。今天要推荐的 Chrome 插件——图片助手(ImageAssistant),是一款高效的批量图片下载工具,可以帮助你一键提取网页上的所有图片,并提供多种筛选、下载功能。 ImageAssistant 是什么? 图片助手(ImageAssistant) 是一款功能强大的 Chrome 插件,它能够快速解析网页中的所有图片,并支持用户按需筛选、批量下载,甚至还能提取 CSS 背景图片。这使得它成为设计师、研究人员、素材收集者以及日常用户的得力助手。 主要功能 批量提取网页图片 一键提取当前网页中的所有图片,包括普通图片、隐藏图片、CSS 背景图片等。 智能筛选与过滤 允许按照尺寸、格式、地址等条件筛选所需图片。 过滤掉不相关的图标、小图片,避免下载无用文件。 支持多种图片格式 可识别并下载 JPG、PNG、GIF、SVG、WebP 等多种格式的图片。 快速预览和选择下载 插件提供图片预览功能,用户可以在下载前检查图片是否符合需求。 多种下载方式 可单独下载某些图片,也可以一键打包 ZIP 下载所有选中的图片。 高级模式 允许深入解析 Ajax 动态加载的图片。 适用于社交媒体、在线图库等平台。 使用方法 安装插件 在 Chrome 网上应用店搜索 ImageAssistant,或点击这里下载安装。 提取网页图片 打开需要下载图片的网页,点击浏览器工具栏上的 ImageAssistant 图标。 筛选和选择 通过筛选功能选择需要下载的图片,避免下载无用的内容。 批量下载 选择图片后,点击“下载”按钮,可选择单张下载或打包下载 ZIP。 为什么选择 ImageAssistant? 批量下载,提高效率:无需逐张保存,节省时间。 智能筛选,精准获取:避免下载垃圾图片。 支持各种格式,适应性强:适用于各种图片网站。 轻量化、无广告:不占用过多资源,使用体验流畅。 适用人群 设计师:快速下载素材,提高工作效率。 图片采集者:批量抓取网站图片,方便整理。 研究人员:提取图片数据,辅助研究分析。 普通用户:下载心仪的壁纸、商品图片等。 结语 如果你经常需要从网页中批量下载图片,图片助手(ImageAssistant) 绝对是一个值得安装的 Chrome 插件。它不仅功能强大,而且简单易用,让你的图片采集工作变得轻松高效。快去 Chrome 网上应用店下载试试吧!
2018年09月18日
2018-03-17
SpringCloud使用中的一下注意事项与问题
Spring Cloud Config 配置的坑 动态配置时,在配置中心修改zuul的 service id ,修改后将无法访问 kafka整合zipkin笔记 参考:https://github.com/niemingming/springcloud-sleuth-kafka-zipkin/tree/71404c9cd1e3f4b7c6ae8dee80ffca31652b03a9 如果使用actuator就无法访问端口spring-boot-starter-actuator o.s.k.support.LoggingProducerListener : Exception thrown when sending a message with key='null' and payload='{-1, 4, 11, 99, 111, 110, 116, 101, 110, 116, 84, 121, 112, 101, 0, 0, 0, 78, 34, 97, 112, 112, 108,...' to topic sleuth: 忘记设置 sleuth: enabled: false 搭建zipkin整合kafka碰到的问题 一个奇怪的issue: 如果application.yml里面配置logging相关的配置,则sleuth无法启动 http://takeip.com/spring-cloud-stream-app-starter-fails-after-10-secs-saying-binderexception-cannot-initialize-binder.html解决方案 如果程序启动到Kafka commitId : f10ef2720b03b247 过一段时间报 Cannot initialize Binder org.springframework.context.ApplicationContextException: Failed to start bean 'outputBindingLifecycle'; nested exception is org.springframework.cloud.stream.binder.BinderException: Cannot initialize binder: 需要修改kafka的配置 server.properties listeners=PLAINTEXT://localhost:9092 一般因为没有监听对应的ip UserRedirectRequiredException: A redirect is required to get the users approval 在spring mvc下无法跳转到统一认证页报错 org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.security.oauth2.client.resource.UserRedirectRequiredException: A redirect is required to get the users approval j 解决方案:缺少两个Spring Security和Oauth2的过滤器: oauth2ClientContextFilter springSecurityFilterChain public void onStartup(ServletContext container) throws ServletException { AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); ctx.register(HelloWorldConfiguration.class); ctx.setServletContext(container); ServletRegistration.Dynamic servlet = container.addServlet( "dispatcher", new DispatcherServlet(ctx)); servlet.setLoadOnStartup(1); servlet.addMapping("/"); // registerProxyFilter(container, "springSecurityFilterChain"); // registerProxyFilter(container, "oauth2ClientContextFilter"); } private void registerProxyFilter(ServletContext servletContext, String name) { DelegatingFilterProxy filter = new DelegatingFilterProxy(name); filter.setContextAttribute("org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher"); servletContext.addFilter(name, filter).addMappingForUrlPatterns(null, false, "/*"); }
2018年03月17日
2017-12-08
Angular2使用中的一下注意事项与问题
Angular2使用中的一下注意事项与问题 在angular2项目中 compass的使用 在头部引入 @import "~compass-mixins/lib/compass/css3"; 而不是 @import "compass/css3"; ng2-file-upload预览的实现 第一种使用 platform-brower import {DomSanitizer, SafeUrl} from "@angular/platform-browser"; 这种方式有极限,浏览器支持比较少 第二种使用 编写一个指令 import { Directive, ElementRef, Input, OnChanges, Renderer } from '@angular/core'; @Directive({ selector: 'img[imgPreview]' }) export class ImagePreviewDirective implements OnChanges { @Input() image: any; constructor(private el: ElementRef, private renderer: Renderer) {} ngOnChanges(changes: SimpleChanges) { const reader = new FileReader(); const el = this.el; reader.onloadend = function (e) { el.nativeElement.src = reader.result; }; if (this.image) { return reader.readAsDataURL(this.image); } } } Angular2 使用websocket sockjs和stomp碰到 Cannot resolve module 'net' https://github.com/jmesnil/stomp-websocket/issues/119 我的处理方式安装net模块 stomp必须依赖于sockjs运行,否则程序无法运行 centos下ng-client无法npm install的问题angular2-image-popup@1.1.2 postinstall /opt/soft/ngclient/node_modules/angular2- angular2-image-popup@1.1.2 postinstall /opt/soft/ngclient/node_modules/angular2-image-popup \> typings install /opt/soft/ngclient/node_modules/configstore/index.js:48 throw err; ^ Error: EACCES: permission denied, open '/root/.config/configstore/typings.json' You don't have access to this file. at Object.fs.openSync (fs.js:652:18) at Object.fs.readFileSync (fs.js:553:33) at Configstore.get all [as all] (/opt/soft/ngclient/node_modules/configstore/index.js:29:25) at new Configstore (/opt/soft/ngclient/node_modules/configstore/index.js:25:46) at Object.<anonymous> (/opt/soft/ngclient/node_modules/typings-core/dist/utils/store.js:5:19) at Module._compile (module.js:573:30) at Object.Module._extensions..js (module.js:584:10) at Module.load (module.js:507:32) at tryModuleLoad (module.js:470:12) at Function.Module._load (module.js:462:3) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) https://github.com/yeoman/yeoman.github.io/issues/282 解决的方法: 执行: chmod g+rwx /root /root/.config /root/.config/configstore ng-client在centos npm install无法安装 message EACCES: permission denied, open '/opt/yjmicro-saas-ngclient/node_modules/angular2-image-popup/typings/index.d.ts' typings ERR! typings ERR! cwd /opt/yjmicro-saas-ngclient/node_modules/angular2-image-popup typings ERR! system Linux 3.10.0-123.el7.x86_64 typings ERR! command "/usr/local/src/node/bin/node" "/opt/yjmicro-saas-ngclient/node_modules/.bin/typings" "install" typings ERR! node -v v8.9.1 typings ERR! typings -v 2.1.1 typings ERR! code EACCES typings ERR! typings ERR! If you need help, you may report this error at: typings ERR! <https://github.com/typings/typings/issues> npm WARN bootstrap@4.0.0-beta requires a peer of popper.js@^1.11.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: angular2-image-popup@1.1.2 (node_modules/angular2-image-popup): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: angular2-image-popup@1.1.2 postinstall: `typings install` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 解决: npm config set unsafe-perm=true 参考 :https://github.com/Microsoft/WSL/issues/14
2017年12月08日
2017-09-14
AMqp阅读笔记
@Payload 表示有效的传输数据 每个 RabbitTemplate 只支持一个 ReturnCallback 批次消息 BatchingRabbitTemplate 只有当一个批次完成才会向 RabbitMQ 发送消息 从1.4.2版本开始,引入了 BatchingRabbitTemplate,它是 RabbitTemplate 的子类,覆盖了 send 方法,此方法可根据 BatchingStrategy 来批量发送消息;只有当一个批次完成时才会向 RabbitMQ 发送消息。 public interface BatchingStrategy { MessageBatch addToBatch(String exchange, String routingKey, Message message); Date nextRelease(); Collection<MessageBatch> releaseBatches(); } 警告 成批的数据是保存在内存中的,如果出现系统故障,未发送的消息将会丢失。 @RabbitListener 可以用在类上,监听多个方法 注意,如果有必要,需要在每个方法上指定 @SendTo,在类级上它是不支持的。 检测空闲异步消费者 从1.6版本开始,当没有消息投递时,可配置监听器容器来发布 ListenerContainerIdleEvent 事件。当容器是空闲的,事件会每隔 idleEventInterval 毫秒发布事件。 要配置这个功能,须在容器上设置 idleEventInterval: xml <rabbit:listener-container connection-factory="connectionFactory"...idle-event-interval="60000"... > <rabbit:listener id="container1" queue-names="foo" ref="myListener" method="handle" /> </rabbit:listener-container> Java @Bean public SimpleMessageListenerContainer(ConnectionFactory connectionFactory) { SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(connectionFactory); ... container.setIdleEventInterval(60000L); ... return container; } @RabbitListener @Bean public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory() { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setConnectionFactory(rabbitConnectionFactory()); factory.setIdleEventInterval(60000L); ... return factory; } 事件消费 通过实现 ApplicationListener 可捕获这些事件- 要么是一个一般的监听器,要么是一个窄化的只接受特定事件的监听器。 你也可以使用Spring Framework 4.2中引入的 @EventListener。 下面的例子在单个类中组合使用了 @RabbitListener 和 @EventListener 。重点要理解,应用程序监听器会收到所有容器的事件,因此如果你只对某个容器采取措施,那么你需要检查监听器id。你也可以使用 @EventListener 条件来达到此目的。 事件有4个属性: source - 监听容器实例 id - 监听器id(或容器bean名称) idleTime - 当事件发布时,容器已经空闲的时间 queueNames - 容器监听的队列名称 public class Listener { @RabbitListener(id="foo", queues="#{queue.name}") public String listen(String foo) { return foo.toUpperCase(); } @EventListener(condition = "event.listenerId == 'foo'") public void onApplicationEvent(ListenerContainerIdleEvent event) { ... } } 重要 事件监听器会查看所有容器的事件,因此,在上面的例子中,我们根据监听器ID缩小了要接收的事件。 警告 如果你想使用idle事件来停止监听器容器,你不应该在调用监听器的线程上来调用 container.stop() 方法- 它会导致延迟和不必要的日志消息。 相反,你应该把事件交给一个不同的线程,然后可以停止容器。
2017年09月14日
2017-07-02
整合spring security oauth2的时候如果碰到Possible CSRF detected - state parameter was present but no state could be found
解决方案:https://github.com/spring-projects/spring-security-oauth/issues/322 问题所在: The problem is the session then. You have 2 servers running on localhost, on different ports, but cookies don't record the host, only the path, and both are on the root path "/" so they are sharing a cookie. Put one of them in a sub context (e.g. using server.contextPath=/auth for the auth server) and it should work I think. 您有2台服务器在本地主机上运行,不同的端口,但cookie不记录主机,只有路径,并且都在根路径“/”,所以他们共享一个cookie。将其中一个放在子上下文中(例如,使用server.contextPath = / auth进行认证服务器),它应该可以工作。
2017年07月02日
1
...
8
9
10
...
18