AIR程序如何最小化到系统托盘(2)

grafana使用方法 1、点击仪表盘2、新建仪表盘3、选择数据源4、选择查询的条件5、美化。 阅读详情
public function createSystrayRootMenu():NativeMenu{ 
                var menu:NativeMenu = new NativeMenu(); 
                var openNativeMenuItem:NativeMenuItem = new NativeMenuItem("打开程序");//生成OPEN菜单项 
                var exitNativeMenuItem:NativeMenuItem = new NativeMenuItem("退出程序");//同理 
                openNativeMenuItem.addEventListener(Event.SELECT, undock); 
                exitNativeMenuItem.addEventListener(Event.SELECT, function(event):void{stage.nativeWindow.close();});//添加EXIT菜单项事件 
                menu.addItem(openNativeMenuItem); 
                menu.addItem(new NativeMenuItem("",true));//separator   
                menu.addItem(exitNativeMenuItem);//将菜单项加入菜单  
                return menu; 
          } 
      private function setSystemTrayProperties():void{ 
              SystemTrayIcon(NativeApplication.nativeApplication .icon).tooltip = "我的常用软件";
              SystemTrayIcon(NativeApplication.nativeApplication .icon).addEventListener(MouseEvent.CLICK, undock); 
              stage.nativeWindow.addEventListener(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING, nwMinimized);   
         }
         private function nwMinimized(displayStateEvent:NativeWindowDisplayStateEvent):void { 
               if(displayStateEvent.afterDisplayState == NativeWindowDisplayState.MINIMIZED) { 
                  displayStateEvent.preventDefault();//阻止系统默认的关闭窗体事件 
                  dock();//将程序放入托盘 
               } 
        }  
       
AI安全护栏评测:TrustedExecBench如何量化评估大模型防护能力 在人工智能和机器学习领域,模型安全对齐是确保AI系统可靠、可控的核心技术。其原理是通过设计安全机制(即“护栏”)来约束模型行为,防止生成有害、偏见或越界内容。这项技术的核心价值在于平衡AI能力与风险管控,是可信AI部署的基石。应用场景广泛覆盖内容审核、对话系统、代码生成等需要人机交互的领域。本文聚焦的TrustedExecBench项目,正是针对“护栏”性能量化评估这一痛点,提供了一个标准化、自动化的开源评测框架。该工具通过构建多维度的恶意测试套件,并引入基于模型的动态评判机制,能够系统性地检验大语言模型在 阅读详情

相关推荐

使用 STM32F7 和 TensorFlow Lite 开发低功耗人脸识别设备

我们讨论了 STM32F7 的特点和能力,TensorFlow Lite 在 STM32F7 上的应用,以及一些降低功耗的优化技术。- 准备模型:选择合适的人脸识别模型,在 TensorFlow 中进行训练和导出,并使用 TensorFlow Lite 转换为适用于 STM32F7 的量化模型。请注意,上述代码仅展示了如何加载和运行 TensorFlow Lite 模型的方法,实际应用中需要集成人脸检测和识别模型,并根据实际需求进行相应的输入和输出处理。结合这两个工具,我们可以开发出低功耗的人脸识别设备。

weixin_66608063的博客 2583

把AIR程序最小化到系统托盘.

非常酷! 新建一个AIR工程,拷贝代码进去,运行。 <?xml version="1.0" encoding="utf-8"?>  <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApplication

weixin_34242658的博客 111

DAGGER vs 传统模仿学习:为什么数据聚合能提升模型性能?

本文深入对比了DAGGER与传统模仿学习,揭示了传统方法因“分布不匹配”导致性能下降的根源。DAGGER通过动态的**数据聚合**机制,在智能体自身策略产生的状态分布上收集专家数据,从根本上解决了误差累积问题,从而显著提升了模型在实际部署中的鲁棒性和性能。

weixin_29170327的博客 233

将AIR应用程序最小化到托盘

在网上找到的源码,是beta版的,但由于beta与正式版在类上有很大的区别,所以不能直接使用,我在flex3正式版下修改过了,没有bug。在使用前,请按以下骤执行:1.创建一个名为testair的FLEX项目(AIR程序)2.编辑testair-app.xml并设置SystemChrome为none(这样可以获得较酷的程序皮肤)3.复制代码到testai...

weixin_34280237的博客 175

Intel AX系列网卡5G热点开启失败?Linux下3种修复方案实测(含Ubuntu/OpenWRT)

本文针对Intel AX系列网卡在Linux系统下无法开启5G热点的常见问题,深入剖析了其根源在于内核LAR机制与驱动的兼容性。文章提供了三种实测有效的修复方案:针对内核低于5.5的模块参数法、适用于高内核版本的hostapd补丁编译法以及高阶的驱动修改法,帮助用户在Ubuntu、OpenWRT等环境中成功启用5G热点功能。

weixin_29291863的博客 731

【UE 反射】反射的原理是什么?如何使用机制?

静态类型检查确保了类型的早期一致性和高效的代码执行,但减少了灵活性。动态类型检查提供了更大的灵活性,但增加了运行时的开销和潜在的错误。反射作为一种动态特性,无论是在静态类型语言还是动态类型语言中,都提供了强大的运行时类型操作能力,但也伴随着性能和安全性方面的权衡。通过理解这些联系,开发者可以在不同的编程语言和应用场景中选择适合的类型检查方式和反射机制,以实现所需的动态行为和灵活性,同时保证性能和安全性。

hhw_hhw的博客 6031

Flex【原创】Air桌面应用程序最小化托盘

如题:Air桌面应用程序最小化托盘功能实现 1.核心类 : 处理最小化托盘的逻辑 package { import flash.desktop.NativeApplication; import flash.desktop.SystemTrayIcon; import flash.display.BitmapData; import fla...

weixin_30387339的博客 280

4D Gaussian Splatting for Real-Time Dynamic Scene Rendering-4DGS阅读笔记

为了实现实时动态场景渲染,同时还能具备较高的训练和存储效率,作者提出了四维高斯溅射(4D-GS)方法,将其作为动态场景的一种整体表示方式,而不是对每个单独的帧应用三维高斯溅射(3D-GS)方法。在 4D-GS 中,提出了一种新颖的显式表示方法,它同时包含三维高斯模型和四维神经体素。受 HexPlane 启发,提出了一种分解的神经体素编码算法,以高效地从四维神经体素构建高斯特征,然后应用一个轻量级多层感知器(MLP)来预测在新时间戳下的高斯变形。

2403_85515624的博客 2343

把AIR隐藏在系统托盘中,并添加系统托盘菜单

http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApplication()">         /**     * 这个程序描述了如何把AIR程序隐藏在系统托盘中以及从系统托盘

sjz168的专栏 1015

Amesim与Simulink联合仿真:S-Function接口配置与实战避坑指南

本文详细介绍了Amesim与Simulink联合仿真中S-Function接口的配置方法与实战避坑指南。从环境搭建、编译器配置到S-Function接口实战,逐步解析关键步骤与常见问题解决方案,帮助工程师高效实现多领域系统仿真,特别适合汽车、航空航天等复杂系统建模场景。

weixin_29173777的博客 343

PICO SCOPE 二次开发

基于C#开发一个简单的PICO示波器的上位机工作,与MCC600运动控制卡一起,实现数据自动采集

nixoncheng的博客 1147

AIR程序生成系统托盘

AIR程序生成系统托盘 及 在程序最小化的时候在电脑右下角有个子定义的图标,如果对其加入事件,还可以有打开和退出的效果在你的应用主程序的init方法中调用createSystemTray就可以了public function createSystemTray():void{ va

无悔克难 590

MATLAB 开发项目实例 1000 例专栏之第37例:基于Simulink的无人机飞行控制系统设计

通过上述项目实例,我们成功地使用Simulink设计和仿真了一个无人机的飞行控制系统。这个项目展示了从无人机建模、路径规划、控制器设计到仿真验证的完整流程。Simulink的可视化和模块化特性使得系统的建模和仿真更加直观和高效。

xiaoheshang_123的博客 162

AIR程序如何最小化到系统托盘(3)

public function undock(evt:Event):void {            stage.nativeWindow.visible = true;//设置本地程序窗体可见               stage.nativeWindow.orderToFront();//设置本地程序窗体到最前端            NativeApplication.nat

yesjava的专栏 534

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

深度学习工具包 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")

AIR-最小化到系统托盘

package { import flash.desktop.*; import flash.display.*; import flash.events.*; import flash.net.*; /** * 最小化后生成系统托盘处理类 */ public class SystemTray extends Sprite { private var doc

mzfen1988 1970

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

FLEX AIR添加系统托盘图标步骤

AIR也像其它桌面应用程序一样,可以为其添加系统托盘图标。网上此类文章较多,这里简要说明一下,并列出步骤,以及关键代码如果主程序 为 myAir.mxml 打开myAir-app.xml,在第89-94行的文字如下:       --> 修改为:  flower_16.png flower_32.png flower_48.png flower_128.png  当然必须在 flex air工程的

不忘初心 方得始终 503

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

AIR程序如何最小化到托盘(1)

代码如下 private function init(){       var loader:Loader=new Loader();        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,prepareForSystray);       loader.load(new URLRequest("assets/im

yesjava的专栏 591

Adobe AIR右键菜单和系统托盘(Tray)功能以及实现方法

Adobe AIR右键菜单和系统托盘(Tray)功能以及实现方法 AIR教程 Adobe AIR右键菜单和系统托盘(Tray)功能以及实现方法 右键菜单: var mainMenu:NativeMenu = new NativeMenu(); var minimizeMenu:NativeMenuItem = new NativeMenuItem("Minimize");

mimi00x的专栏 1033

Adobe AIR右键菜单和系统托盘实现

<br />右键菜单:<br /> <br />var mainMenu:NativeMenu = new NativeMenu(); var minimizeMenu:NativeMenuItem = new NativeMenuItem("Minimize"); var maximizeMenu:NativeMenuItem = new NativeMenuItem("Maximize"); var sepMenu:NativeMenuItem = new NativeMenuItem("",tr

风痕的专栏 788
上一篇: AIR程序如何最小化到托盘(1)
下一篇: AIR程序如何最小化到系统托盘(3)
yesjava
博客等级 码龄19年 69粉丝 153原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值