Firefox Extension开发手记(第三天)- 编写XPCOM

力软敏捷开发框架源码7.0.6旗舰版 JNPF开发平台3.4.5 企业版 旗舰版 JNPF作为作为一款深受用户喜爱的低代码产品,凭借雄厚的科研技术力量、丰富的软件开发项目经验、严谨的项目开发流程和高质量的售后服务,已成功帮助千家企业完成数字化项目,建立了覆盖不同行业客户和不同发展阶段的软件产品服务体系。 阅读详情

XPCOM与COM从概念上区别不大,都通过IDL描述接口。

在VC工程中,添加一个IDL文件指定示意XPIDL编译即可

XPCOM定义一个接口和其方法


[scriptable, uuid(90758A97-A6F3-4ea4-8953-16BD2EE3A977)]
interface IMyComponent : nsISupports
{
  long Add(in long a, in long b);
  ACString Choose ();
};

在Windows平台,该接口可以调用其他Windows程序或COM程序。

字符串操作与char*间可以直接转换。

示波器实测RGMII信号:从125MHz时钟判断千兆模式,到时序抓取与PHY寄存器避坑 本文详细介绍了使用示波器实测RGMII信号的完整流程,包括125MHz时钟频率判断、时序参数测量及PHY寄存器配置避坑指南。通过实战操作和典型故障案例分析,帮助硬件工程师快速定位和解决千兆以太网接口的调试问题,提升通信稳定性。 阅读详情

相关推荐

Intel网卡固件烧录实战:eeupdate与bootutil命令完全解析

固件作为硬件设备底层运行的软件,其稳定性直接决定硬件功能的完整性。网卡固件一旦损坏,常表现为MAC地址丢失、PXE启动失效、NVM数据异常导致降速或掉线。维护这类问题,需借助Intel官方工具eeupdate与bootutil在UEFI Shell或DOS环境下执行底层烧录操作。eeupdate负责网卡的身份信息与NVM存储管理,可重置MAC、恢复固件镜像;bootutil则专管启动行为,支持PXE配置与Boot Agent升级。从环境准备、命令参数到故障恢复,掌握这两款工具能让运维人员在修复存量网卡、应对

weixin_34269583的博客 321

Firefox extension 开发之常用XPCOM service

当进行firefox extension 开发时,经常用的一些语句就不能继续开心地使用了,想要获得正确的结果,就需要用到其XPCOM service。Components.classes 对象 参考链接:https://developer.mozilla.org/zh-CN/docs/Components.classes 下面列举一些我项目中遇到的使用实例 console log无法在add-o

一壁蔷薇枝 712

FortiClient EMS实战:从安装到配置的全流程优化指南

本文详细解析了FortiClient EMS 7.0版本的部署与优化全流程,帮助企业构建零信任终端安全体系。从环境规划、高效安装、终端纳管到高级运维,提供实战指南和优化技巧,特别适用于Windows Server环境,助力企业提升终端安全管理效率。

weixin_29325007的博客 558

关于Firefox的extension开发

今天下午心血来潮,抽空看了一下FF的扩展开发,这里把一个下午的收获列一下: 首先先要在本地建立一个开发环境,参考https://developer.mozilla.org/en/Setting_up_extension_development_environment 接着需要了解一下extension的文件结构,参考https://developer.mozilla.org

536

PostgreSQL中idle in transaction状态的5个隐藏危害及实战解决方案

本文深入剖析了PostgreSQL中`idle in transaction`连接状态的五大隐藏危害,包括内存与锁泄漏、VACUUM受阻导致表膨胀、事务ID加速消耗、连接池资源耗尽以及增加故障排查复杂度。文章提供了基于`pg_stat_activity`视图的监控方法、识别高危事务的SQL脚本,并给出了从数据库参数调优(如设置`idle_in_transaction_session_timeout`)到应用层编码规范与连接池配置的完整实战解决方案。

zzz56的博客 239

51单片机-点亮LED和蜂鸣器

ULN2003是高耐压、大电流达林顿陈列,由七个硅NPN达林顿管组成。ULN2003是大电流驱动陈列,多用于单片机、只能仪表、PLC、数字量输出卡等控制电路中。可直接驱动蜂鸣器、继电器等负载。void delay(u16 i) // i等于1大约10uswhile(i--);//取反,高低电平不断变化,产生脉冲delay(10);// 周期200us。

三日沐水 1135

firefox扩展开发技术

firefox扩展开发技术 1,XPCOM XPCOM(Cross Platform Component Object Model)是一种跨平台组件模型,是Mozilla技术的核心。其原理与微软的COM技术类似,但与COM不同的是,XPCOM是一种跨平台技术,并支持多种语言绑定(Language Bindings)。也就是说,我们可以使用C++、JAVA、JavaScript、Python...

程序员,从骨子里就有一种迎难而上的精神。 147

YOLOv11 改进入门篇 | 轻量级涨点技巧:GhostConv 替代普通卷积的实战指南

摘要: 本文介绍如何通过GhostConv改进YOLOv11,实现轻量化涨点。YOLOv11深度增加导致参数量、延迟和内存占用上升,GhostConv通过“本征特征+线性变换”策略,在精度几乎无损的情况下降低30%-50%计算量。文章详细解析GhostConv原理,对比普通卷积的参数量和FLOPs优势,并提供完整的代码级改造流程,包括模块实现、注册及网络配置。实验表明,该方法有效提升边缘端推理效率,适用于移动端等资源受限场景。

shrgegrb的博客 1663

Firefox Extension开发手记(第二天)- 安装

先说说安装问题,如何编写出正确的安装文件,在我第一次做插件时也一头雾水。文档里的说明相对简单,但是实际操作时问题较多。  install.rdf 这是最根的文件通过他Firefox才能从对应的jar文件中找到程序(chrome)XPCOM(componets)和资源(skin、locale)登。还有install.jsFirefox和Thunderbird不使用 对应的目录

2724

Onnxruntime之YOLOP部署过程记录

魔改YoloP部署过程记录

如果想成为中心,那么就到中心去吧。 1936

小红书直播弹幕采集

本文主要介绍小红书直播间弹幕的采集,便于进行直播数据监控与直播数据进行分析。

tdl320721的博客 2558

火狐扩展Firefox extension开发流程(学习记录)

之前写的一个Firefox扩展fillforms由于使用的旧技术XUL overlay,被火狐停止使用了。话说火狐扩展开发方式变了好几次了。XUL/XPCOM overlays、bootstrapped extensions 、Add-on SDK,现在推WebExtensions APIs,把之前的都废弃了,说以后都是WebExtensions APIs,是为了和其他浏览器统一,为一个浏览器写扩...

两天打鱼三天晒网 1万+

【Android性能优化】Android App 冻结与内存压缩:CachedAppOptimizer 源码级解析

本文基于 AOSP Android 16 源码,以 `CachedAppOptimizer` 为核心,深度解析 Android 对"后台缓存应用"的两大治理手段——**进程冻结(Freezer)**与**内存压缩(Compaction)**。文中完整还原冻结的 debounce 去抖动机制、`mEarliestFreezableTime` 的最早可冻结时刻算法、粘性冻结(Sticky Freeze)的语义,以及解冻时必须"先解 binder 再解进程"的顺序奥义。

weixin_44081096的博客 203

Firefox extension开发实战

    开始写文章之前,先自我检讨一下自己的无知。    Firefox是开源的,地球人都知道。在接触现在的项目中FF扩展的开发之前,我居然一直都认为FF是Java开发的(以前一直都把java和开源划上等号了)。现在终于明白,有很多开源项目像FF一样,都是C/C++开发的,有大家熟知的Mysql、PHP等。真是一个等级错误啊,宛如当年我认为移动存储设备只有U盘和移动硬盘一样,其实还有SD卡、MINI-SD卡、TF卡、CF卡、MMC卡等,愚昧啊。。。    OK,废话到此为止,让我们进入正题吧。本文章分六部分

wirror800的专栏 5519

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

Firefox插件开发(4)——XULRunner的一个例子

上一节写了一个Extension,添加了一个按钮在FF3的工具栏上。接下来我准备在这个基础上添加一个功能,点击按钮,读取本地磁盘上一个文件的内容,并显示出来。怎么做呢?用Javascript吗?因为我最终的目标是从服务器上下载文件,也可能会传输本地文件到服务器上,用Javascript访问本地文件有诸多限制,而且也无法完成复杂的功能。所以最好是能够调用我编写的 DLL那就最好不过了。怎么做呢?还是

Jinhill's Blog 5963

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

Firefox 扩展开发系列 – Firefox extension 文件的组成

找到Firefox Profile文件的位置 ,在Vista的位置为C:/Users/{username}/AppData/Roaming/Mozilla/Firefox/Profiles/{profile name}/extensions/{extension id} 其中{extension id} 为唯一的标识,可以为UUID,GUID或者电子邮件地址 在extension i

Richard 时间@脚印 543

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

我的Firefox插件开发之旅(4)——XULRunner的一个例子(转载)

转载自:http://www.cppblog.com/epubcn/archive/2008/11/10/66502.html<br />【原创】我的Firefox插件开发之旅(4)——XULRunner的一个例子<br />上一节写了一个Extension,添加了一个按钮在FF3的工具栏上。接下来我准备在这个基础上添加一个功能,点击按钮,读取本地磁盘上一个文件 的内容,并显示出来。怎么做呢?用Javascript吗?因为我最终的目标是从服务器上下载文件,也可能会传输本地文件到服务器上,用 Javasc

wulong710的专栏 1300

我的第一个 Firefox Extension

Firefox Extension介绍Firefox Extension 是扩展Firefox原有的功能,可以提供组件或者应用程序界面等。其中的组件形式是XPCOM组件-跨平台的组件,应用程序界面是通过XUL 组件。 XPCOM有点类似于微软的COM,而XUL组件类似于现在微软的WPF,利用XML定义页面组成元素。 系列文章内容 1. 开发环境的搭建2. 关于组件

Richard 时间@脚印 495

Mozilla Firefox Extension扩展 内幕 教程 源代码分析 安装过程分析(XPInstall,xpcom,rdf,xpi,chrome,manifest)

Mozilla Firefox Extension扩展 内幕 教程 源代码分析 安装过程分析(XPInstall,xpcom,rdf,xpi,chrome,manifest) 懒得整理下边的图了,唉。直接上传pdf,有兴趣的朋友看看吧。其实只是个作业,自己发上来当作知识保存吧。http://files.cnblogs.com/kenkofox/firefox扩展相关代码分析报告(kenko)

quasiceo 1061

Mozilla Firefox Extension扩展 内幕 教程 源代码分析 安装过程分析(XPInstall,xpcom,rdf,xpi,chrome,manifest)...

懒得整理下边的图了,唉。直接上传pdf,有兴趣的朋友看看吧。其实只是个作业,自己发上来当作知识保存吧。http://files.cnblogs.com/kenkofox/firefox扩展相关代码分析报告(kenko).pdf 一、分析任务说明 本报告的工作内容是对firefox源代码中跟它的扩展(extensions)部分相关的代码进行研究,总结得到firefox的扩展(extensions...

weixin_34021089的博客 286

firefox extension

http://developer.mozilla.org/en/docs/Extensions 这是mozilla的开发中心对于firefox extension的专题Building an ExtensionExplains step-by-step how to build an extension for Firefox 1.5. 通过这个可以对整个开发过程有个简单了解但是复杂的插件还是需要

treewater的技术 2130

我的Firefox插件开发之旅(4)——XULRunner的一个例子

  上一节写了一个Extension,添加了一个按钮在FF3的工具栏上。接下来我准备在这个基础上添加一个功能,点击按钮,读取本地磁盘上一个文件的内容,并显示出来。怎么做呢?用Javascript吗?因为我最终的目标是从服务器上下载文件,也可能会传输本地文件到服务器上,用Javascript访问本地文件有诸多限制,而且也无法完成复杂的功能。所以最好是能够调用我编写的 DLL那就最好不过了。怎么做

dolphin98629的专栏 2432

Firefox扩展开发-3

之前我们已经把example中的内容大致的过了一遍,现在我们再沿着Firefox官方的文档走一遍,加深理解并且看看有没有弄错的地方。 [b]Introduction[/b] Extensions allow programmers to add new features to Mozilla applications or allow existing features to be mod...

三十岁后的狂奔 110

Firefox扩展开发 (插件开发) Extension开发 入门教程 5步走 五步走

首先需要知道什么是“Firefox插件”。这里说的“插件”只是一个通俗的说法,其实Firefox这种扩展功能的“插件”包括:扩展extension和插件plugin。     {tip:title=Handy Hint} Firefox官方网站的解释是:Extensions are small add-ons that add new functionality to you...

weixin_34038652的博客 388

实战 Firefox 扩展开发

案例介绍 本文中所要构建的是一个能够批量下载某个 HTML 页面上所有图片的 Firefox 扩展。通常我们在浏览包含许多图片的网页时,如果想要把自己感兴趣的图片全部下载下来,需要逐一在图片上点击右键,然后选择另存为,再选择文件存放的目录,最后才能把图片保存在本机上。另外一种做法是把整个网页都保存下来,不过这样会保存不需要的信息,包括 JavaScript 脚本和 CSS 文件等,会增加所需的磁...

hclworld的专栏 427

Firefox扩展开发

Firefox扩展开发 (插件开发) Extension开发 入门教程 5步走 五步走 首先需要知道什么是“Firefox插件”。这里说的“插件”只是一个通俗的说法,其实Firefox这种扩展功能的“插件”包括:扩展extension和插件plugin。 {tip:title=Handy Hint} Firefox官方网站的解释是:Extensions are...

weixin_30612769的博客 156
上一篇: Firefox Extension开发手记(第二天)- 安装
下一篇: SHOUTcast优势
SystemBug
博客等级 码龄27年 5粉丝 34原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值