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

Aix升级和安装ssh配置过程 Aix升级和安装ssh配置过程Aix升级和安装ssh配置过程配置前背景配置步骤 Aix升级和安装ssh配置过程 部门IBM小型机的Aix操作系统需要进行ssh补丁修复,修复其实就是ssh版本你的升级,对升级的过程和中途遇到的问题做了记录如下。 配置前背景 操作系统: gdboss2/>uname -u //操作系统的Aix5.3 IBM,020693E5P gdboss2/&gt... 阅读详情

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*间可以直接转换。

2026.1.9:最新VSCode集成claude插件完美解决方案,跳过登录界面,使用国内Kimi K2进行计费 本文介绍了如何安装配置Claude插件并连接Kimi K2 API的详细步骤:1)搜索安装Claude插件;2)进入设置关闭登录提示;3)在settings.json中添加API配置,包括ANTHROPIC_AUTH_TOKEN(需替换为Kimi API Key)和ANTHROPIC_BASE_URL;4)通过Kimi官网获取API Key。完成配置后即可正常使用该插件。文中配有完整的操作截图指引。 阅读详情

相关推荐

抖音直播小风车跳转企业微信全攻略:企业号申请+落地页配置详解

本文详细解析了抖音直播小风车跳转企业微信的全流程,包括企业号申请、小风车配置和落地页优化。通过实战指南,帮助企业高效实现私域流量沉淀,提升直播转化率,特别适合电商和营销从业者参考。

weixin_29289821的博客 613

Firefox extension 开发之常用XPCOM service

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

一壁蔷薇枝 712

Jetson Orin NX上CAN总线调试全攻略:从硬件焊接到开机自启动(附常见问题解决方案)

本文详细介绍了在NVIDIA Jetson Orin NX开发板上进行CAN总线调试的全过程,包括硬件焊接、驱动配置、通信测试和开机自启动设置。针对常见问题如信号接反、波特率设置等提供了实用解决方案,帮助开发者快速实现稳定的CAN总线通信。

c2d3e4f的博客 1076

关于Firefox的extension开发

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

536

基于FPGA的cy7c68013a双向通信实验

基于FPGA的cy7c68013a双向通信实验     本实验是基于FPGA的cy7c68013a的USB双向通信实验,以前折腾过一段时间cy7c68013a,没有入门时感觉好难,入门了就会感觉很简单。本教程主要内容:     1.cy7c68013a的固件编写,以及生成iic固件和下载固件。     2.cy7c68013a的slave模式,以及他的读写时序     3.cy7c6801...

乘风的博客 3万+

SerDes硬件设计原理介绍

接收端:外部差分串行数据------线性均衡器----(CDR从数据中恢复出采样时钟)-----解串器(串行信号转并行信号)-------8B/10B的解码器或解扰器-----FIFO-----FPGA接受差分并行数据。发送端: FPGA发送差分并行数据----FIFO------8B/10B编码器或者扰码器-----串行器(并行信号转串行信号)-----均衡器(滤波)--------TX串行信号差分外发。串行器:8bit的并行数据----2bit的并行数据----1bits的串行数据。

weixin_42304393的博客 1108

firefox扩展开发技术

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

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

关于SVPWM七段式五段式调制后的相电压和线电压波形——大疆DJI技术笔试

1.SVPWM七段式/五段式调制的相电压和线电压波形 脉宽调制(PWM)在并网变流技术中得到了广泛的应用。与正弦脉宽调制(SPWM)的控制方法相比,SVPWM方法具有直流侧电压利用率高,电压谐波小,易于数字化实现等显著的优点,从而使SVPWM在实际的应用中越来越普遍。TMS320F28335是32位浮点的DSP控制器,具有150MHz的高速处理能力,18路PWM输出,与前几代数字信号控制器相比,性能平均提高了50%。其中具体的SVPWM理论实现的原理,请参考我的博客永磁同步电机的矢量控制策略(七)一一一SV

昔时扬尘处 2万+

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

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

2724

爬虫瑞数5案例:联通

瑞数动态安全 Botgate(机器人防火墙)以“动态安全”技术为核心,通过动态封装、动态验证、动态混淆、动态令牌等技术对服务器网页底层代码持续动态变换,增加服务器行为的“不可预测性”,实现了从用户端到服务器端的全方位“主动防护”,为各类 Web、HTML5 提供强大的安全保护。

老衲爱洗头的博客 4470

化工设计软件:AVEVA E3D二次开发_(8).管道系统设计

在 AVEVA E3D Design 中,管道规格的定义是确保设计一致性和标准化的关键。通过二次开发,可以自动生成并管理管道规格。下面是一个示例,展示如何通过编写脚本来定义和管理管道规格。# 导入必要的库 import clr。

kkchenjj的博客 973

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

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

两天打鱼三天晒网 1万+

PCL 点到面的ICP算法【2024最新版】

经典的点到面的ICP算法。博客长期更新,本文最新更新时间为:2024年10月18日。

点云侠的博客 36万+

Firefox extension开发实战

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

wirror800的专栏 5519

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

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

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

Jinhill's Blog 5963

深度学习工具包 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 扩展开发系列 – 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

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

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

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

wulong710的专栏 1299

我的第一个 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的博客 284

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的技术 2129

我的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的博客 386

实战 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、付费专栏及课程。

余额充值