How to Create Dynamic Settings Pages

视觉特征-自监督-掩码像素预测【2021-11】:SimMIM【一种用于掩码图像建模的简单框架】 ¹ 清华大学²微软亚洲研究院⁸ 西安交通大学Abstract摘要本文提出了SimMIM,一个用于掩码图像建模的简单框架。我们简化了最近提出的相关方法,无需采用特殊设计,例如按块掩码以及通过离散VAE或聚类进行 tokenization。为了研究是什么使掩码图像建模任务能够学习到良好的表征,我们系统地研究了框架中的主要组件,并发现每个组件的简单设计都展现出非常强的表征学习性能:1)以适度较大的掩码 patch大小(例如32)对输入图像进行随机掩码,可构成一个强大的 pre-text 任务; 阅读详情

Create Dynamic Settings Pages

How to Create Dynamic Settings Pages

Many times there are situations where you want to create settings pages dynamically and not design them beforehand in the resource files. This is quite easy but there are some things you must take into account.

Basic Class

Your settings page class derives from CAknSettingItemList, defined in aknsettingitemlist.h. You don't have anything special to define or override but naturally you want to define your own ConstructL() where you can create the setting items.

Settings.h
#include <aknsettingitemlist.h>
 
class CSettings : public CAknSettingItemList
{
public:
	static CSettings *NewL(CCoeControl *parent, TInt resource);
	static CSettings *NewLC(CCoeControl *parent, TInt resource);
 
private:
	CSettings();
	void ConstructL();
};
Settings.cpp
#include "Settings.h"
 
// This is used as the empty text for text setting items
_LIT(KEmptyItemText, "(none)");
 
CSettings *CSettings::NewL(CCoeControl *parent, TInt resource)
{
	CSettings* self = CSettings::NewLC(parent, resource);
	CleanupStack::Pop(self);
	return self;
}
 
CSettings *CSettings::NewLC(CCoeControl *parent, TInt resource)
{
	CSettings* self = new (ELeave)CSettings();
	CleanupStack::PushL(self);
	self->SetMopParent(parent);
	self->SetContainerWindowL(*parent);
	self->ConstructFromResourceL(resource);
	self->ConstructL();
	return self;
}
 
CSettings::CSettings()
{
// Here you can set the default values for your setting items
}
 
CSettings::ConstructL()
{
// Here you can create the setting items
}

Minimal ConstructL() Without Any Items

void CSettings::ConstructL()
{
	TInt order = 0;
	// Get the icon array if you want to set icons
	CArrayPtr<CGulIcon>* icons =
ListBox()->ItemDrawer()->FormattedCellData()->IconArray();
	// Used for setting text items in enumerated controls
	CArrayPtr<CAknEnumeratedText>* texts;
	// Text input items
	CAknTextSettingItem *textitem;
	// Enumerated text items
	CAknEnumeratedTextPopupSettingItem *enumitem;
	// The setting item array
	CAknSettingItemArray* items;
 
	// Get the setting item array from the derived control
	items = SettingItemArray();
 
	// Add your controls here to the item array
 
	items->RecalculateVisibleIndicesL();
	HandleChangeInItemArrayOrVisibilityL();
}

Adding Items to the List

There are several setting item types you can use in your settings page. They are all added to the list using CAknSettingItemArray which we can get using the SettingItemArray() method. I'll show you how to use two of the controls that I've found most useful, a text input element and an enumerated selection item.

All controls have an order number. The easiest way to keep this running is just to define an int variable that you'll increment after adding each control to the array.

After all items have been added to the array, you call RecalculateVisibleIndicesL() for the CAknSettingItemArray and HandleChangeInItemArrayOrVisibilityL() for your own derived class. This will ensure the control updates its state and view.

If you want to use icons for the settings, you can retrieve the icon array from the listbox using ListBox()->ItemDrawer()->FormattedCellData()->IconArray().

Adding Text Input Item

Text input items are added creating an instance of CAknTextSettingItem. NOTE! You MUST set the empty item text for the control even if you're not going to allow setting empty strings! If you don't do this, the control will panic with one of the ETEXT panics when the text is empty, even while editing!

The following code can be added to the ConstructL() method shown earlier. textvalue is a descriptor defined in your class which will hold the current and modified value for the setting item.

By default, the editor won't display the OK selection if the editor is empty. If you want to allow an empty string to be input, you must uncomment the flag setting line.

// Make sure the order numbers are updated
	order++;
	textitem = new (ELeave)CAknTextSettingItem(order, textvalue);
	textitem->SetEmptyItemTextL(KEmptyItemText);
 
	// If you want to allow setting an empty string, uncomment this
	// text->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
 
	textitem->ConstructL(IsNumberedStyle(), order, _L("Setting Name"),
icons, R_TEXT_SETTING_PAGE, -1);
	items->AppendL(textitem);

The resource R_TEXT_SETTING_PAGE contains the following base settings for the item. The maximum length of the setting item is 64 and the editor will allow only text input mode.

RESOURCE AVKON_SETTING_PAGE r_text_setting_page
{
	type = EEikCtEdwin;
	editor_resource_id = r_text_edwin;
}
 
RESOURCE EDWIN r_text_edwin
{
	width = 20;
	lines = 1;
	maxlength = 64;
	default_input_mode=EAknEditorTextInputMode;
	allowed_input_modes=EAknEditorTextInputMode;
}
Adding Enumerated Text Item

If you want to make the user choose from a predefined set of values you can use CAknEnumeratedTextPopupSettingItem. It will display a similar control to the text editor but when activated will display a popup list from which the user can choose a value.

itemvalue is the TInt variable defined in your setting class that will hold the value for the setting item. NOTE! You MUST set the setting value to zero when creating the control! Otherwise the ConstructL() will crash. After you've added the selections to the list you can set the default value and call LoadL() method for the enumerated item.

You can set the selection values either in a resource file or dynamically, as we're doing here. The values are of type CAknEnumeratedText and have an integer value that you get as the selection value and a text string that will be shown to the user. Note that you shouldn't use _L("asd").AllocL() ever, I'm doing this just to keep the texts in the same part of the code.

Note that the integer values don't need to be sequential. Here we have three selections that will have integer values of 0, 1 and 10 respectively. If you set the itemvalue as 10, the third item will be selected. Make sure you set the itemvalue to a value that is present in the array.

// Make sure the order numbers are updated
	order++;
 
	// Hold the value for the item in temp variable and set it to zero
	TInt tmpvalue = itemvalue;
	itemvalue = 0;
	enumitem = new (ELeave)CAknEnumeratedTextPopupSettingItem(order, itemvalue);
	enumitem->ConstructL(IsNumberedStyle(), order, _L("Enum item"), icons
R_ENUMERATED_SETTING_PAGE, -1, 0, R_POPUP_SETTING_TEXTS);
 
	// Get the value array
	texts = enumitem->EnumeratedTextArray();
	// Empty it
	texts->ResetAndDestroy();
	texts->AppendL(new CAknEnumeratedText(0, _L("first (0)").AllocL()));
	texts->AppendL(new CAknEnumeratedText(1, _L("second (1)").AllocL()));
	texts->AppendL(new CAknEnumeratedText(10, _L("third (10)").AllocL()));
 
	// Set the real value for the item
	itemvalue = tmpvalue;
	// Tell the control to load the value in
	enumitem->LoadL();
	items->AppendL(enumitem);

The resources R_ENUMERATED_SETTING_PAGE and R_POPUP_SETTING_TEXTS used in the code contain the following settings. We have a dummy item in the text array which we'll clear away when we're creating the control.

RESOURCE AVKON_SETTING_PAGE r_enumerated_setting_page
{
	type = EAknCtPopupSettingList;
	editor_resource_id = r_popup_setting_list;
}
 
RESOURCE POPUP_SETTING_LIST r_popup_setting_list
{
	flags = 0;
}
 
RESOURCE AVKON_POPUP_SETTING_TEXTS r_popup_setting_texts
{
	setting_texts_resource = r_texts;
}
 
RESOURCE ARRAY r_texts
{
	items =
	{
		AVKON_ENUMERATED_TEXT { value=0; text = "dummy";}
	};
}

Constructing the Setting Page

Resources Needed

When you're using the setting page from your code, you must have a resource for it that contains the basic settings. Here we only have a title for tha page.

RESOURCE AVKON_SETTING_ITEM_LIST r_settings_list
{
	title = "Settings";
}
Construction
CSettings settings = CSettings::NewLC(this, R_SETTINGS_LIST);

Loading And Saving Settings Values

When you want to save the setting item values, you must first call SaveSettingsL(). This will call the same method on all the setting items and instruct them to store their values in the variables you defined when you created them. After this you can save the values.

If you want to load the values after the controls have been created, you can use LoadSettingsL() which in turn will call the same method on all the setting items and instructs them to load the values from the variables you defined.

Note! You can use one TInt variable and one descriptor for all your setting items if you want to (sometimes the dynamically created setting items are totally dynamic and you don't know how many there are etc). If you want to do this, you must call SaveSettingsL() for all your setting items one by one and save the values before calling it for the next.

Possible Panics

Setting item lists can generate several panics. The most annoying are Setting Item List panics (which will show as Setting Item Lis X on your device). They are not documented in official documentation but I have written about them here to help others that have problems with them. Also ETEXT panics are not uncommon with text items.

CV-骨架02:Swin Transformer V2: Scaling Up Capacity and Resolution【2021-11】 Ze Liu* Han Hu*† Yutong Lin Zhuliang Yao Zhenda Xie Yixuan Wei Jia Ning Yue Cao Zheng Zhang Li Dong Furu Wei Baining Guo Microsoft Research Asia{v-zeliu1,hanhu,t-yutonglin,t-zhuyao,t-zhxie,t-yixuanwei,v-jianing}@microsoft.com {yuecao,zhez,lidong1,fuwei,bai 阅读详情

相关推荐

群晖Hyper Backup还原实战:加密与非加密备份的完整操作指南

本文详细介绍了群晖Hyper Backup在加密与非加密备份场景下的完整还原操作指南。通过实战案例和高级技巧,帮助用户应对硬盘故障或系统崩溃时的数据恢复挑战,特别是加密备份恢复中的关键节点和常见陷阱。

weixin_29323365的博客 441

PHP - PHP-FPM - 学习/实践

本文摘要: 文章主要探讨了Nginx+PHP-FPM的运行机制、配置优化与实践应用。首先介绍了PHP-FPM作为PHP FastCGI进程管理器的工作原理,对比了CGI与FastCGI的区别,强调FastCGI通过主进程管理worker进程提升性能。详细解析了php-fpm.conf配置文件结构及核心参数,包括进程管理、日志设置等。同时展示了Nginx与PHP-FPM的协同配置,特别是虚拟主机多站点部署。文中还讨论了PHP-FPM的进程模型(master+worker)、平滑重启方法,以及常驻内存特性与Sw

"代码"的日常搬运 2290

香橙派5B-RK3588-NPU内核升级至0.9.8:RKLLM多模态部署实战

本文详细介绍了香橙派5B-RK3588设备NPU内核升级至0.9.8版本的完整流程,重点讲解了升级的必要性、两种升级方案(预编译包安装与自行编译内核)以及RKLLM SDK的安装配置。通过实战演示多模态模型转换与推理,显著提升AI计算性能,为嵌入式AI部署提供实用指南。

salt9的博客 1027

Rage(PC) Modding Notes : Console Commands

_________________________________________ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Rage(PC) Modding Notes : Console

tailiangliang的专栏 2341

告别Selenium!纯Python+Requests搞定微信视频号登录Cookie(附完整代码与避坑指南)

本文详细介绍了如何利用纯Python和Requests库实现微信视频号的自动化登录,替代传统的Selenium方案。通过解析HTTP请求交互流程,提供完整的代码实现和避坑指南,显著提升爬虫效率和隐蔽性,适用于轻量化爬虫开发。

weixin_30642561的博客 312

若依(RuoYi)框架从零到部署:Spring Boot+Vue权限系统完整配置指南

在Java企业级应用开发中,Spring Boot作为构建微服务和单体应用的基石,极大地简化了项目初始化和配置流程。其核心原理在于通过自动配置和起步依赖,快速整合数据访问、安全认证、缓存等常用模块,显著提升开发效率。这一技术价值在需要快速构建后台管理系统的场景中尤为突出,例如权限管理、用户角色分配等通用需求。若依(RuoYi)框架正是基于Spring Boot和Vue.js的优秀实践,它封装了RBAC权限模型、代码生成器等高频功能,提供了开箱即用的解决方案。本文聚焦于若依框架的【环境配置】与【项目部署】,通

weixin_33984032的博客 457

SO-101真机复现及Sim-to-Real之Isaac sim Isaac lab安裝(更新ing)

电脑配置系统:ubuntu24.04显卡:4060ti 16g内存:32g安装版本。

qq_36497771的博客 308

保姆级教程:断网环境下用Flexnet服务器搞定SolidWorks 2021安装与破解(附错误5解决方案)

本文提供SolidWorks 2021在断网环境下的企业级部署指南,详细解析Flexnet服务器本地化工作原理,并给出安装与破解的实战方案,特别针对常见的'错误5'问题提供多维度解决方案。适用于需要内网隔离或移动办公的工业设计场景,确保数据安全与授权合规。

weixin_28683391的博客 301

AI编码智能体Claude Code:从自然语言到完整代码工作流的革命

如果你还在用传统的代码补全工具,或者只是把大语言模型当作一个更聪明的代码提示器,那么你可能已经落后了。最近,一个名为 Claude Code 的工具正在开发者社区引发热议。它不仅仅是一个插件或一个聊天窗口,而是一个能真正理解你的代码库、在终端里执行命令、并自主完成从需求到代码再到提交全流程的 AI 编码智能体 。 简单来说,Claude Code 试图解决一个核心痛点: 将自然语言意图直接转化为可运行的、经过验证的代码变更 。过去,你告诉 AI “给设置页面加个暗色模式开关”,它可能给你一段代码片段,然后你

weixin_30876945的博客 341

基于ESP32-P4的低成本旋转式激光雷达系统设计

激光雷达(LiDAR)作为机器人环境感知的核心传感器,其本质是融合光学测距、机电控制与实时数据处理的嵌入式系统。理解时间飞行(ToF)原理与机械旋转耦合机制,是实现高精度点云采集的基础;而系统级误差源——如计时抖动、电机惯性、信号串扰和温漂——直接决定实际建图鲁棒性。在资源受限场景下,选用RISC-V双核MCU(如ESP32-P4)可兼顾实时控制与网络服务能力,通过硬件时间戳捕获、S型加减速轨迹规划、旋转变压器供电及双Bank OTA等工程手段,有效平衡分辨率、帧率与稳定性。本文围绕360°旋转式激光雷达的

weixin_36231030的博客 434

糖尿病预测(深度学习pytorch实现-最新)

本次做的项目是糖尿病的预测,也是来自kaggle上面的一个小项目。根据一个人的怀孕次数、血糖、血压、皮肤厚度、胰岛素指标、身体质量指数、糖尿病谱系指数、年龄等身体参数来预测一个人是否患有糖尿病。

NangoGreen的博客 5359

Rage(PC) Modding Notes 狂怒 (pc)制作模组 指南 一

从rage狂怒的mod笔记资料来看中看的出来,跟doom3和quake3的很多东西已经完全不一样了,我觉得乃是在doom3源代码的基础之上,不断的改进,基本上大部分都改动过了 ________________________________________ Rage(PC) Modding Notes ___________________________

tailiangliang的专栏 7936

Linux C/C++ or 嵌入式面试之《C/C++笔面试系列》(10) C++ 前置后置增减运算符重载形式与比较

C语言的++、–运算符在此不讨论。 文章目录1、前置后置增减运算符重载的形式2、前置和后置运算符的性能比较 1、前置后置增减运算符重载的形式 自增运算符“++”和自减运算符“–”分别包含两个版本。即运算符前置形式(如 ++x)和运算符后置形式(如 x++),这两者进行的操作是不一样的。因此,当我们在对这两个运算符进行重载时,就必须区分前置和后置形式。C++根据参数的个数来区分前置和后置形式。如果按照通常的方法来重载 ++ 运算符(即作为成员函数重载时不带参数,或者作为非成员函数重载时带有一个参数),那么重载

二进制君 5832

虚拟内存 | 原理、硬件地址转换、运行机制与 Linux 应用

……

u013669912的博客 359

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

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

Python 异步协程:asyncio、async/await、aiohttp

Windows GUI 主线程消息循环是典型。

freeking101的博客 4390

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

js面试问题笔记(一)

js面试问题笔记(一)

qq_42750608的博客 1510

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

工作中使用到的单词(软件开发)_第三版

====

sun0322 1万+

C++ 入门笔记(十七):list 入门 —— 为什么 list 不能 sort?

第17课:用大白话讲清 list 的双向链表结构、哨兵头、push_back 四步、迭代器封装、merge 与 splice 的区别,以及 vector 排序为什么常比 list 快。

wo_jack的博客 241

【C++】【STL】list_OJ题

本文系统解析了8道C++链表经典OJ题,按“算数操作”与“指针重连”分为两组,强调指针操作与数据结构解耦的重要性。通过手写ListNode、std::list及带头双向循环链表三类载体验证算法普适性,重点剖析空链、单节点、全相同值等6类边界情况,并给出统一编译与调试方案(g++11 + -Wall -O2),确保零告警、可追踪。所有题目时间复杂度均为O(N),常数差异源于遍历次数与操作开销,代码实现兼顾正确性与面试可用性。

这里是Cocatrice的博客,感谢大家一直以来的支持和鼓励,如果对C/C++方向感兴趣的话,可以通过主页的微信名片加Cocatrice的好友,也可以通过邮箱:Chen31980094@163.com 联系,一同加油! 461

list

的底层是双向链表结构,双向链表中每个元素存储在互不相关的独立节点中,在节点中通过指针指向其前一个元素和后一个元素。,因此反向迭代器的实现可以借助正向迭代器,即:反向迭代器内部可以包含一个正向迭代器,对正向迭代器的接口进行包装即可。是可以在常数范围内在任意位置进行插入和删除的序列式容器,并且该容器可以前后双向迭代。迭代到该位置,在这段位置上迭代需要线性的时间开销;最大的缺陷是不支持任意位置的随机访问,比如:要访问。还需要一些额外的空间,以保存每个节点的相关联信息。个元素,必须从已知的位置。

xie0510_的博客 285

Redis 数据类型详解:Hash 哈希与 List 列表

大 key 指单个 key 对应的 value 过大(如 Hash 字段数极多、List 元素极多)。危害包括:单次全量命令(

2303_77004089的博客 114

【C++】【STL】list

list 是带头结点的双向循环链表,通过哨兵位消除首尾边界判断,实现任意位置插入删除的常数时间复杂度。其节点独立分配,不支持随机访问,迭代器仅支持前后移动。与 vector 对比,list 在中间插入/删除时更高效,但遍历缓存命中率低;vector 适合随机访问和连续遍历,但头部操作代价高。二者在内存布局、访问效率与适用场景上形成互补。

这里是Cocatrice的博客,感谢大家一直以来的支持和鼓励,如果对C/C++方向感兴趣的话,可以通过主页的微信名片加Cocatrice的好友,也可以通过邮箱:Chen31980094@163.com 联系,一同加油! 682

Java 集合框架(List、Set、Map)与常用基础

本文整理Java集合框架核心知识,涵盖集合体系、Collection接口API、List(ArrayList、LinkedList、Vector)、Set(HashSet、TreeSet)、Map(HashMap、TreeMap、Hashtable)实现类原理、泛型、增强for循环、可变参数与工具类,并附核心易错点速查表。

既然你都点开这里了,那可以给我点个关注吗?可以吗?可以吗? 490

Bugku 326 Baby-heap1 题解:glibc 2.23 堆溢出到 FSOP 劫持 _IO_list_all(附完整 exp)

为什么 FSOP 在 2.23 这么好用?glibc 2.23 的_IO_FILE虚表调用没有 vtable 合法性检查是 2.24 才加入的),只要能把指向自己伪造的 FILE,就能让__overflow槽位指向任意函数。exit()一定会走因此把_mode置 0、置 1、置 0,就能进入;把fp首地址写成/bin/shsystem(fp)的参数就齐了。为什么用 fastbin attack 而不是?2.23 没有 tcache,fastbin 的fd。

kingx3的博客 228

List(下):LPOP / RPOP、BLPOP / BRPOP 与 LINDEX、LINSERT

这是《Redis C++ 实战笔记》系列的第 07 篇。上一篇是往列表里放,这一篇是往外拿——包括那个会"等"的弹出。

wbs_scy的博客 118

CListCtrl 第一列为什么不能居中

/ 你满怀期待写下这段代码m_list.InsertColumn(0, _T("序号"), LVCFMT_CENTER, 80);m_list.InsertColumn(1, _T("名称"), LVCFMT_LEFT, 160);m_list.InsertColumn(2, _T("数值"), LVCFMT_RIGHT, 100);运行后傻眼:第 1、2 列对齐完全正常,唯独索引 0 这一列,无论你写还是,文字永远靠左。反复调试、怀疑自己参数写错、怀疑扩展样式、怀疑资源模板,折腾半小时 ——

谢谢大家的关注和点赞!这里只有纯纯的知识干货,没有一句废话。希望能实实在在帮到大家~要是觉得有用,别忘了给我点支持哟,你 266
上一篇: Creating a CAknEnumeratedTextPopupSettingItem-derived class to use dynamic data at runtime
下一篇: Symbian CAknSettingItemList使用心得
君楠
博客等级 码龄19年 35粉丝 39原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值