当前位置: 首页 > news >正文

S变换matlab实现

S变换函数

function [st,t,f] = st(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate) 
% S变换
% Code by huasir @Beijing 2025.1.10
% Reference is "Localization of the Complex Spectrum: The S Transform" 
% from IEEE Transactions on Signal Processing, vol. 44., number 4, April 1996, pages 998-1001. 
%% 函数的输出和输出
% Input  
%   * timeseries:      待进行S变换的信号向量
%   * minfreq:         时频分布结果中的最小频率,对应频率轴的最小值(默认值为0)
%   * maxfreq:         时频分布结果中的最大频率,对应频率轴的最大值(默认值为奈奎斯特频率)
%   * samplingrate:    两个采样点之间的采样时间间隔(默认为1)
%   * freqsamplingrate:频率分辨率(默认为1)
% Output
%   * st:               Stockwell变换的结果,行对应频率,列对应时刻,
%   * t:                包含采样时刻的时间向量
%   * f:                频率向量
%% 以下参数可按需调整
%   * [verbose]:   如果为真,则打印函数运行中所有的提示信息
%   * [removeedge]:如果为真,则删除最小二乘拟合的抛物线,并在时间序列的边缘放置一个5%的hanning锥
%                   通常情况下,这是个不错的选择。
%   * [analytic_signal]: 如果时间序列是实数值,则取它的解析信号并进行S变换
%   * [factor]:          局部化高斯的宽度因子,例如,一个周期为10s的正弦信号具有宽度因子*10s的高斯窗口。
%                         通常使用的因子为1,有些情况下为了得到更好的频率分辨率,可以采用3。
%   *****All frequencies in (cycles/(time unit))!****** 
%   Copyright (c) by huasir
%   $Revision: 1.0 $  $Date: 2025/01/10  $ 
% 这是保存函数默认值的S变换封装器
TRUE = 1; 
FALSE = 0; 
%%% 默认参数  [有特殊需求的情况下进行更改] 
verbose = TRUE;           
removeedge= FALSE; 
analytic_signal =  FALSE; 
factor = 1; 
%%% 默认参数设置结果
%% 开始进行输入变量检查
% 首先确保输入的时间序列是有效值,否则,返回帮助信息 
if verbose disp(' '),end  % i like a line left blank if nargin == 0  % nargin为输入参数的个数,nargin=0,表示无输入if verbose disp('No parameters inputted.'),end st_help t=0;,st=-1;,f=0; return 
end % 如果输入数据为行向量的话,将它调整为列向量
if size(timeseries,2) > size(timeseries,1) timeseries=timeseries';	 
end % 确保输入数据为1维向量,而不是矩阵
if size(timeseries,2) > 1 error('Please enter a *vector* of data, not matrix') return 
elseif (size(timeseries)==[1 1]) == 1 error('Please enter a *vector* of data, not a scalar') return 
end % 输入变量不全的情况下采用默认值if nargin == 1  %只有1个输入变量minfreq = 0; maxfreq = fix(length(timeseries)/2); samplingrate=1; freqsamplingrate=1; 
elseif nargin==2 %2个输入变量maxfreq = fix(length(timeseries)/2); samplingrate=1; freqsamplingrate=1; [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries); 
elseif nargin==3  samplingrate=1; freqsamplingrate=1; [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries); 
elseif nargin==4    freqsamplingrate=1; [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries); 
elseif nargin == 5 [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries); 
else       if verbose disp('Error in input arguments: using defaults'),end minfreq = 0; maxfreq = fix(length(timeseries)/2); samplingrate=1; freqsamplingrate=1; 
end 
if verbose  disp(sprintf('Minfreq = %d',minfreq)) disp(sprintf('Maxfreq = %d',maxfreq)) disp(sprintf('Sampling Rate (time   domain) = %d',samplingrate)) disp(sprintf('Sampling Rate (freq.  domain) = %d',freqsamplingrate)) disp(sprintf('The length of the timeseries is %d points',length(timeseries))) disp(' ') 
end 
%END OF INPUT VARIABLE CHECK % If you want to "hardwire" minfreq & maxfreq & samplingrate & freqsamplingrate do it here % calculate the sampled time and frequency values from the two sampling rates 
t = (0:length(timeseries)-1)*samplingrate; 
spe_nelements =ceil((maxfreq - minfreq+1)/freqsamplingrate)   ; 
f = (minfreq + [0:spe_nelements-1]*freqsamplingrate)/(samplingrate*length(timeseries)); 
if verbose disp(sprintf('The number of frequency voices is %d',spe_nelements)),end % The actual S Transform function is here: 
st = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor);  
% this function is below, thus nicely encapsulated %WRITE switch statement on nargout 
% if 0 then plot amplitude spectrum 
if nargout==0  if verbose disp('Plotting pseudocolor image'),end pcolor(t,f,abs(st)) 
end return %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function st = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor);  
% Returns the Stockwell Transform, STOutput, of the time-series 
% Code by R.G. Stockwell. 
% Reference is "Localization of the Complex Spectrum: The S Transform" 
% from IEEE Transactions on Signal Processing, vol. 44., number 4, 
% April 1996, pages 998-1001. 
% 
%-------Inputs Returned------------------------------------------------ 
%         - are all taken care of in the wrapper function above 
% 
%-------Outputs Returned------------------------------------------------ 
% 
%	ST    -a complex matrix containing the Stockwell transform. 
%			 The rows of STOutput are the frequencies and the 
%			 columns are the time values 
% 
% 
%----------------------------------------------------------------------- % Compute the length of the data. 
n=length(timeseries); 
original = timeseries; 
if removeedge if verbose disp('Removing trend with polynomial fit'),end ind = [0:n-1]'; r = polyfit(ind,timeseries,2); fit = polyval(r,ind) ; timeseries = timeseries - fit; if verbose disp('Removing edges with 5% hanning taper'),end sh_len = floor(length(timeseries)/10); wn = hanning(sh_len); if(sh_len==0) sh_len=length(timeseries); wn = 1&[1:sh_len]; end % make sure wn is a column vector, because timeseries is if size(wn,2) > size(wn,1) wn=wn';	 end timeseries(1:floor(sh_len/2),1) = timeseries(1:floor(sh_len/2),1).*wn(1:floor(sh_len/2),1); timeseries(length(timeseries)-floor(sh_len/2):n,1) = timeseries(length(timeseries)-floor(sh_len/2):n,1).*wn(sh_len-floor(sh_len/2):sh_len,1); end % If vector is real, do the analytic signal  if analytic_signal if verbose disp('Calculating analytic signal (using Hilbert transform)'),end % this version of the hilbert transform is different than hilbert.m %  This is correct! ts_spe = fft(real(timeseries)); h = [1; 2*ones(fix((n-1)/2),1); ones(1-rem(n,2),1); zeros(fix((n-1)/2),1)]; ts_spe(:) = ts_spe.*h(:); timeseries = ifft(ts_spe); 
end   % Compute FFT's 
tic;vector_fft=fft(timeseries);tim_est=toc; 
vector_fft=[vector_fft,vector_fft]; 
tim_est = tim_est*ceil((maxfreq - minfreq+1)/freqsamplingrate)   ; 
if verbose disp(sprintf('Estimated time is %f',tim_est)),end % Preallocate the STOutput matrix 
st=zeros(ceil((maxfreq - minfreq+1)/freqsamplingrate),n); 
% Compute the mean 
% Compute S-transform value for 1 ... ceil(n/2+1)-1 frequency points 
if verbose disp('Calculating S transform...'),end 
if minfreq == 0 st(1,:) = mean(timeseries)*(1&[1:1:n]); 
else st(1,:)=ifft(vector_fft(minfreq+1:minfreq+n).*g_window(n,minfreq,factor)); 
end %the actual calculation of the ST 
% Start loop to increment the frequency point 
for banana=freqsamplingrate:freqsamplingrate:(maxfreq-minfreq) st(banana/freqsamplingrate+1,:)=ifft(vector_fft(minfreq+banana+1:minfreq+banana+n).*g_window(n,minfreq+banana,factor)); 
end   % a fruit loop!   aaaaa ha ha ha ha ha ha ha ha ha ha 
% End loop to increment the frequency point 
if verbose disp('Finished Calculation'),end %%% end strans function %------------------------------------------------------------------------ 
function gauss=g_window(length,freq,factor) % Function to compute the Gaussion window for  
% function Stransform. g_window is used by function 
% Stransform. Programmed by Eric Tittley 
% 
%-----Inputs Needed-------------------------- 
% 
%	length-the length of the Gaussian window 
% 
%	freq-the frequency at which to evaluate 
%		  the window. 
%	factor- the window-width factor 
% 
%-----Outputs Returned-------------------------- 
% 
%	gauss-The Gaussian window 
% vector(1,:)=[0:length-1]; 
vector(2,:)=[-length:-1]; 
vector=vector.^2;     
vector=vector*(-factor*2*pi^2/freq^2); 
% Compute the Gaussion window 
gauss=sum(exp(vector)); %----------------------------------------------------------------------- %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^% 
function [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries) 
% this checks numbers, and replaces them with defaults if invalid % if the parameters are passed as an array, put them into the appropriate variables 
s = size(minfreq); 
l = max(s); 
if l > 1   if verbose disp('Array of inputs accepted.'),end temp=minfreq; minfreq = temp(1);; if l > 1  maxfreq = temp(2);,end; if l > 2  samplingrate = temp(3);,end; if l > 3  freqsamplingrate = temp(4);,end; if l > 4   if verbose disp('Ignoring extra input parameters.'),end end; end       if minfreq < 0 | minfreq > fix(length(timeseries)/2); minfreq = 0; if verbose disp('Minfreq < 0 or > Nyquist. Setting minfreq = 0.'),end end if maxfreq > length(timeseries)/2  | maxfreq < 0  maxfreq = fix(length(timeseries)/2); if verbose disp(sprintf('Maxfreq < 0 or > Nyquist. Setting maxfreq = %d',maxfreq)),end end if minfreq > maxfreq  temporary = minfreq; minfreq = maxfreq; maxfreq = temporary; clear temporary; if verbose disp('Swapping maxfreq <=> minfreq.'),end end if samplingrate <0 samplingrate = abs(samplingrate); if verbose disp('Samplingrate <0. Setting samplingrate to its absolute value.'),end end if freqsamplingrate < 0   % check 'what if freqsamplingrate > maxfreq - minfreq' case freqsamplingrate = abs(freqsamplingrate); if verbose disp('Frequency Samplingrate negative, taking absolute value'),end end % bloody odd how you don't end a function %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^% 
function st_help
disp(' ')
disp('st()  HELP COMMAND')
disp('st() returns  - 1 or an error message if it fails')
disp('USAGE::    [localspectra,timevector,freqvector] = st(timeseries)')
disp('NOTE::   The function st() sets default parameters then calls the function strans()')
disp(' ')
disp('You can call strans() directly and pass the following parameters')
disp(' **** Warning!  These inputs are not checked if strans() is called directly!! ****')
disp('USAGE::  localspectra = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor) ')disp(' ')
disp('Default parameters (available in st.m)')
disp('VERBOSE          - prints out informational messages throughout the function.')
disp('REMOVEEDGE       - removes the edge with a 5% taper, and takes')
disp('FACTOR           -  the width factor of the localizing gaussian')
disp('                    ie, a sinusoid of period 10 seconds has a ')
disp('                    gaussian window of width factor*10 seconds.')
disp('                    I usually use factor=1, but sometimes factor = 3')
disp('                    to get better frequency resolution.')
disp(' ')
disp('Default input variables')
disp('MINFREQ           - the lowest frequency in the ST result(Default=0)')
disp('MAXFREQ           - the highest frequency in the ST result (Default=nyquist')
disp('SAMPLINGRATE      - the time interval between successive data points (Default = 1)')
disp('FREQSAMPLINGRATE  - the number of frequencies between samples in the ST results')
% end of st_help procedure

S逆变换函数

function [ts] = inverse_st(st) 
% Returns the inverse of the Stockwell Transform of the REAL_VALUED timeseries. 
% Reference is "Localization of the Complex Spectrum: The S Transform" 
% from IEEE Transactions on Signal Processing, vol. 44., number 4, April 1996, pages 998-1001. 
% 
%-------Inputs Needed------------------------------------------------ 
%   
%  S-Transform matrix created by the st.m function 
%-------Optional Inputs ------------------------------------------------ 
% none 
%-------Outputs Returned------------------------------------------------ 
% 
% ts     -a REAL-VALUED time series 
%--------Additional details----------------------- % sum over time to create the FFT spectrum for the positive frequencies 
stspe = sum(st,2); % get st matrix dimensions  
[nfreq,ntimes] = size(st); 
if rem(ntimes ,2) ~= 0 % odd number of points, so nyquist point is not aliased, so concatenate % the reversed spectrum to create the negative frequencies % drop the DC value negspe = fliplr(stspe(2:nfreq)'); 
else % even number of points % therefore drop the first point (DC) and the last point (aliased nyqusit freq) negspe = fliplr(stspe(2:nfreq-1)'); 
end % using symmetry of FFT spectrum of a real signal, recreate the negative frequencies from the positie frequencies fullstspe = [conj(stspe')  negspe];     % the time series is the inverse fft of this 
ts = ifft(fullstspe); 
% and take the real part, the imaginary part will be zero. 
ts = real(ts); 

相关文章:

S变换matlab实现

S变换函数 function [st,t,f] st(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate) % S变换 % Code by huasir Beijing 2025.1.10 % Reference is "Localization of the Complex Spectrum: The S Transform" % from IEEE Transactions on Signal Proc…...

【OLAP和PLTP】—— 浅谈两者的应用场景和区别

大家好&#xff0c;我是摇光~ OLAP&#xff08;Online Analytical Processing&#xff09;和OLTP&#xff08;Online Transaction Processing&#xff09;是两种不同的数据处理技术&#xff0c;分别用于不同的业务场景。以下是关于OLAP和OLTP的详细介绍&#xff1a; 一、OLAP&…...

计算机组成原理(1)王道学习笔记

一、 引言 计算机硬件唯一能识别的数据是二进制-----0/1。 用低/高电平表示0/1。 通过很多条电路&#xff0c;可以传递多个二进制数位。 每个二进制数位称为1bit&#xff08;比特&#xff09;。 计算机硬件的基本组成 早期的ENIAC计算机是通过手动接线来控制计算。冯诺依曼首次…...

LLaMA模型:自然语言处理的革新者

引言 在人工智能的领域中&#xff0c;自然语言处理&#xff08;NLP&#xff09;是一个充满挑战的分支&#xff0c;它的目标是让计算机能够理解和生成人类语言。Transformer模型&#xff0c;作为NLP的基石&#xff0c;已经极大地推动了这一领域的发展。然而&#xff0c;为了进一…...

各种特种无人机快速发展,无人机反制技术面临挑战

随着科技的飞速发展&#xff0c;各种特种无人机在军事、民用等领域得到了广泛应用&#xff0c;其性能不断提升&#xff0c;应用场景也日益丰富。然而&#xff0c;无人机反制技术的发展确实面临一定的挑战&#xff0c;难以完全跟上无人机技术的快速发展步伐。以下是对这一问题的…...

1555银行账户概要_pandas解答

目录 题目链接(无_力扣VIP_略过)一.读题(建议使用这种表结构_数据对比看)题目SQL Schema & Pandas Schema 建表语句_数据 二.答案_MySQL一图解MySQL一图解__可只需看此!!!!!!!!!!!!!!!!答案-----------------------------------------------------------------------------…...

【C++补充】第一弹---位图技术揭秘:内存优化与快速访问

✨个人主页&#xff1a; 熬夜学编程的小林 &#x1f497;系列专栏&#xff1a; 【C语言详解】 【数据结构详解】【C详解】 目录 1 位图 1.1 位图相关面试题 1.2 位图的设计及实现 1.3 C库中的位图 bitset 1.4 位图的模拟实现 1.5 位图的优缺点 1.6 位图相关考察题目 1 …...

node.js中实现token的生成与验证

Token&#xff08;令牌&#xff09;是一种用于在客户端和服务器之间安全传输信息的加密字符串。在Web开发中&#xff0c;Token常用于身份验证和授权&#xff0c;确保用户能够安全地访问受保护的资源。 作用与意义 身份验证&#xff1a;Token可以用来验证用户的身份&#xff0…...

服务器登陆后有java变量

需求&#xff1a;在ssh服务器后&#xff0c;用户root 使用java会报错&#xff0c;没有这个变量&#xff0c;其实环境变量中已经有配置了&#xff0c;在/etc/profile 中有写变量及地址&#xff0c;通过source /etc/profile 命令也可以使环境变量加载上&#xff0c;但是ssh后不会…...

层次模型式的工作流

层次模型式的工作流是一种适合分布式版本控制系统&#xff08;如 Git、Mercurial&#xff09;的开发协作方式&#xff0c;它将开发团队分成多个层次&#xff0c;每个层次有明确的角色和职责&#xff0c;代码从底层逐步向上层汇总和集成&#xff0c;最终形成一个完整、稳定的产品…...

Linux 发行版介绍与对比:Red Hat、Ubuntu、Kylin、Debian

Linux 操作系统有众多发行版&#xff08;Distros&#xff09;&#xff0c;每个发行版的设计目标、目标用户、应用场景和使用方式有所不同。常见的 Linux 发行版包括 Red Hat、Ubuntu、Kylin 和 Debian。以下是这些发行版的详细介绍与对比&#xff0c;以及它们的应用场景和使用方…...

G1原理—3.G1是如何提升垃圾回收效率

大纲 1.G1为了提升GC的效率设计了哪些核心机制 2.G1中的记忆集是什么 3.G1中的位图和卡表 4.记忆集和卡表有什么关系 5.RSet记忆集是怎么更新的 6.DCQ机制的底层原理是怎样的 7.DCQS机制及GC线程对DCQ的处理 提升G1垃圾回收器GC效率的黑科技 G1设计了一套TLAB机制 快速…...

IOS界面传值-OC

1、页面跳转 由 ViewController 页面跳转至 NextViewController 页面 &#xff08;1&#xff09;ViewController ViewController.h #import <UIKit/UIKit.h>interface ViewController : UIViewControllerend ViewController.m #import "ViewController.h" …...

C# SQL ASP.NET Web

留学生的课程答疑 按照要求完成程序设计、数据库设计、用户手册等相关技术文档&#xff1b; 要求 1. 计算机相关专业&#xff0c;本科以上学历&#xff0c;至少有1年以上工作经验或实习经历。 2. 熟练掌握WinForm程序开发&#xff0c;或ASP.NET Web编程。 3. 熟悉C#中网络…...

asp.net core webapi 并发请求时 怎么保证实时获取的用户信息是此次请求的?

对于并发请求&#xff0c;每个请求会被分配到一个独立的线程或线程池工作线程上。通过 HttpContext 或 AsyncLocal&#xff0c;每个线程都能独立地获取到它自己的上下文数据。由于这些数据是与当前请求相关的&#xff0c;因此在并发请求时不会互相干扰。 在并发请求时&#xf…...

软件23种设计模式完整版[附Java版示例代码]

一、什么是设计模式 设计模式是在软件设计中反复出现的问题的通用解决方案。它们是经过多次验证和应用的指导原则,旨在帮助软件开发人员解决特定类型的问题,提高代码的可维护性、可扩展性和重用性。 设计模式是一种抽象化的思维方式,可以帮助开发人员更好地组织和设计他们…...

FPGA 20 ,FPGA按键消抖功能解析与实现

目录 前言 一. 具体场景 二. 消抖方法...

基于单片机的无线气象仪系统设计(论文+源码)

1系统方案设计 如图2.1所示为无线气象仪系统设计框架。系统设计采用STM32单片机作为主控制器&#xff0c;结合DHT11温湿度传感器、光敏传感器、BMP180气压传感器、PR-3000-FS-N01风速传感器实现气象环境的温度、湿度、光照、气压、风速等环境数据的检测&#xff0c;并通过OLED1…...

OA系统如何做好DDOS防护

OA系统如何做好DDOS防护&#xff1f;在数字化办公蔚然成风的当下&#xff0c;OA&#xff08;办公自动化&#xff09;系统作为企业内部管理与协作的神经中枢&#xff0c;其安全性和稳定性直接关系到企业的日常运营效率、信息流通效率以及长远发展。OA系统不仅承载着企业内部的日…...

java_单例设计模式

什么是设计模式 什么是单例设计模式 单例设计模式——饿汉式 虽然你没有使用这个对象实例&#xff0c;但是它也帮你创建了&#xff01;容易造成对象的浪费 對象&#xff0c;通常是重量級的對象, 餓漢式可能造成創建了對象&#xff0c;但是沒有使用. package com.hspedu.singl…...

比较分析:Windsurf、Cody、Cline、Roo Cline、Copilot 和 通义灵码

随着人工智能技术的快速发展&#xff0c;开发者工具变得越来越智能化&#xff0c;特别是在代码生成、辅助编程等领域&#xff0c;市面上涌现了多种 AI 驱动的工具。本文将从开源性、集成能力、功能覆盖范围、支持的编程语言、生态兼容性、成本、学习曲线、响应速度、离线支持以…...

vue3后台系统动态路由实现

动态路由的流程&#xff1a;用户登录之后拿到用户信息和token&#xff0c;再去请求后端给的动态路由表&#xff0c;前端处理路由格式为vue路由格式。 1&#xff09;拿到用户信息里面的角色之后再去请求路由表&#xff0c;返回的路由为tree格式 后端返回路由如下&#xff1a; …...

C#版 软件开发6大原则与23种设计模式

开发原则和设计模式一直是软件开发中的圣经, 但是这仅仅适用于中大型的项目开发, 在小型项目的开发中, 这些规则会降低你的开发效率, 使你的工程变得繁杂. 所以只有适合你的才是最好的. 设计模式六大原则1. 单一职责原则&#xff08;Single Responsibility Principle&#xff0…...

后端Java开发:第十三天

第十三天&#xff1a;继承 - 面向对象的核心概念 欢迎来到第十三天的学习&#xff01;今天&#xff0c;我们将深入探讨 Java 中的 继承&#xff08;Inheritance&#xff09;&#xff0c;这是面向对象编程的四大基本特性之一。继承是指一个类&#xff08;子类&#xff09;通过继…...

awr报告无法生成:常见分析手段

awr报告无法生成:常见分析手段 STATISTICS_LEVEL和OPEN_MODEAWR快照是否能自动生成?AWR快照能否手动生成?日志有无ORA-12751或ORA-32701报错?MMON进程是否被挂起?排查数据库隐藏参数分析快照生成错误信息分析AWR Snapshot Tracing分析AWR Table Flush是否超时STATISTICS_L…...

基础算法——差分

原理与特点 先回顾一下前缀和算法。 | arr | 1 | 3 | 7 | 5 | 6 | | ---------- | ------ | ------ | ------ | ------ | ------ | | prefix 值 | 101 | 134 | 13711 | 137516 | 1375622 |前缀和的特点是前面的相加prefix(i)sum(i-1)arr(i)。那么差分数组diff就如下面的形式 |…...

[ LeetCode 75 ] 283 移动零(JavaScript)

283 移动零 题目描述解题思路步骤解析时间和空间复杂度代码实现 题目描述 LeetCode 283 移动零 给定一个数组 nums&#xff0c;编写一个函数将所有 0 移动到数组的末尾&#xff0c;同时保持非零元素的相对顺序。 请注意 &#xff0c;必须在不复制数组的情况下原地对数组进行操…...

YOLOv10改进,YOLOv10添加HAttention注意机制用于图像修复的混合注意力转换器,CVPR2023,超分辨率重建

摘要 基于Transformer的方法在低层视觉任务中表现出色,例如图像超分辨率。然而,作者通过归因分析发现,这些网络只能利用有限的空间范围的输入信息。这意味着现有网络尚未充分发挥Transformer的潜力。为了激活更多的输入像素以获得更好的重建效果,作者提出了一种新型的混合…...

VS调试MFC进入系统源代码配置

调试MFC代码有时候能进入MFC的源代码,有时候不能.之前一直没有深入研究.后面经过查资料发现每次调试必能进入源代码的配置.很简单,只需要3步. 1.打开工具->选项->调试->符号,勾选Microsoft符号服务器. 2.打开项目->属性->配置属性->常规,MFC的使用修改成&qu…...

C# 告别FirstOrDefault

一、开篇&#xff1a;FirstOrDefault 的 “江湖地位” 在 C# 编程的世界里&#xff0c;FirstOrDefault 可谓是一位 “常客”&#xff0c;被广大开发者频繁地运用在各种项目场景之中。无论是 Windows 窗体应用程序&#xff0c;需要从数据集中检索第一条记录&#xff0c;或是满足…...

图像处理|腐蚀操作

在计算机视觉与图像处理中&#xff0c;腐蚀操作&#xff08;Erosion&#xff09;是形态学操作的一种。形态学操作广泛应用于二值图像中&#xff0c;主要用于分析和提取图像中的结构信息。腐蚀操作是这类操作中最常见的一种&#xff0c;用来对图像进行“收缩”处理&#xff0c;消…...

全国青少年信息学奥林匹克竞赛(信奥赛)备考实战之循环结构(应用)

实战训练1—报数游戏 问题描述&#xff1a; 小明和小鹏玩报数游戏&#xff0c;小明按1∼20 报数&#xff0c;小鹏按1∼30报数。若两人同时开始&#xff0c;并以同样的速度报数&#xff0c;当两人都报了1000个数时&#xff0c;同时报相同数的次数是多少呢&#xff1f; 输入格…...

140.WEB渗透测试-信息收集-小程序、app(11)

免责声明&#xff1a;内容仅供学习参考&#xff0c;请合法利用知识&#xff0c;禁止进行违法犯罪活动&#xff01; 内容参考于&#xff1a; 易锦网校会员专享课 上一个内容&#xff1a;139.WEB渗透测试-信息收集-小程序、app&#xff08;10&#xff09; 3.直接有app 直接拿…...

《新闻大厦抢先版》V0.18.105+Dlcs官方学习版

《新闻大厦抢先版》官方版https://pan.xunlei.com/s/VODaeUn3v-ZWVvvmUMfo5AqWA1?pwdnhpz# 建造并不断优化新闻大楼&#xff0c;保障员工权益并及时赶上周日的印刷交期&#xff01; 招募并管理不同职业以登上成功的阶梯&#xff1a;记者、摄像师、勤杂工&#xff0c;除此以外…...

【Uniapp-Vue3】Prop校验与prop默认值用法及循环遍历数组对象

一、prop校验 如果我们在想要限制prop的类型&#xff0c;就可以在接收prop的时候对接收类型进行限制&#xff1a; defineProps({ 属性名:{ type:类型 } }) 需要注意类型的首字母大写 但是设置了传入参数类型限制并不能严格限制&#xff0c;只会在后台进行提示&#xff1a; 二、…...

Android Studio创建新项目并引入第三方jar、aar库驱动NFC读写器读写IC卡

本示例使用设备&#xff1a;https://item.taobao.com/item.htm?spma21dvs.23580594.0.0.52de2c1bbW3AUC&ftt&id615391857885 一、打开Android Studio,点击 File> New>New project 菜单&#xff0c;选择 要创建的项目模版&#xff0c;点击 Next 二、输入项目名称…...

Spring Boot | 基于MinIO实现文件上传和下载

关注&#xff1a;CodingTechWork 介绍 在现代的 web 应用中&#xff0c;文件上传和下载是常见的需求。MinIO 是一个开源的高性能分布式对象存储服务&#xff0c;可以用来存储和管理大量的非结构化数据&#xff0c;如图片、视频、日志文件等。本文将介绍如何在 Spring Boot 应用…...

【DNS 阿里云,域名解析,解析到IP的指定端口】

- 进入 阿里云域名解析界面 - 点击 解析设置 - 添加记录 1.添加一条 A/AAAA 类型解析你的服务器的IP地址&#xff08;不需要带端口号&#xff0c;这条解析只是起到中转作用&#xff09; 示例&#xff1a;主机记录&#xff1a;aa.bb.com 记录值&#xff1a;xxx.xxx.xxx.xxx (…...

力扣经典二分题:4. 寻找两个正序数组的中位数

题目链接&#xff1a;4. 寻找两个正序数组的中位数 - 力扣&#xff08;LeetCode&#xff09; 一、题目分析 这道题目是让我们在 两个正序的数组中寻找中位数已知两个数组的大小分别是&#xff1a;int m nums1.size(),n nums2.size();中位数性质1&#xff1a;中位数左侧元素 …...

Java Web开发进阶——Spring Boot与Spring Data JPA

Spring Data JPA 是 Spring 提供的一种面向数据访问的持久化框架&#xff0c;它简化了 JPA 的实现&#xff0c;为开发者提供了一种快速操作数据库的方式。在结合 Spring Boot 使用时&#xff0c;开发者能够快速完成数据库访问层的开发。 1. 介绍Spring Data JPA 1.1 什么是Spr…...

PySpark用sort-merge join解决数据倾斜的完整案例

假设有两个大表 table1 和 table2 &#xff0c;并通过 sort-merge join 来解决可能的数据倾斜问题。 from pyspark.sql import SparkSession from pyspark.sql.functions import col# 初始化SparkSession spark SparkSession.builder.appName("SortMergeJoinExample&quo…...

【2025 Rust学习 --- 11 实用工具特型01】

清理特型Drop 当一个值的拥有者消失时&#xff0c;Rust 会丢弃&#xff08;drop&#xff09;该值。丢弃一个值就必须释放 该值拥有的任何其他值、堆存储和系统资源。 丢弃可能发生在多种情况下&#xff1a; 当变量超出作用域时&#xff1b;在表达式语句的末尾&#xff1b;当…...

关于Linux PAM模块下的pam_listfile

讲《Linux下禁止root远程登录访问》故事的时候&#xff0c;说好会另开一篇讲讲pam_listfile。我们先看看pam_listfile的man文档怎么介绍的。 下面这些就好比人物的简介&#xff0c;甚是恼人&#xff1b;让人看得不明就里&#xff0c;反正“他大舅他二舅都是他舅”。可以直接跳…...

根据中文名称首字母进行分组

很多项目中&#xff0c;需要用到中文名称到首字母进行分组&#xff0c;例如&#xff1a;城市、游戏等等。。。 /*** 将集合数据按照汉字首字母分组排序** param list* return*/public Map<String, Object> screenManufacturer(List<Game> list) {Set<String>…...

springboot 集成 etcd

springboot 集成 etcd 往期内容 ETCD 简介docker部署ETCD 前言 好久不见各位小伙伴们&#xff0c;上两期内容中&#xff0c;我们对于分布式kv存储中间件有了简单的认识&#xff0c;完成了docker-compose 部署etcd集群以及可视化工具 etcd Keeper&#xff0c;既然有了认识&a…...

人工智能-数据分析及特征提取思路

1、概况 基于学生行为数据预测是否涉黄、涉黑等。 2.数据分析 数据分析的意义包括得到数据得直觉、发掘潜在的结构、提取重要的变量、删除异常值、检验潜在的假设和建立初步的模型。 2.1数据质量分析 2.1.1数据值分析 查看数据类型&#xff1a; 首先明确各字段的数据类型…...

设计模式 行为型 状态模式(State Pattern)与 常见技术框架应用 解析

状态模式&#xff08;State Pattern&#xff09;是一种行为型设计模式&#xff0c;它允许对象在内部状态改变时改变其行为&#xff0c;使得对象看起来好像修改了它的类。这种设计模式的核心思想是将对象的状态和行为封装成不同的状态类&#xff0c;通过状态对象的行为改变来避免…...

Android 系统签名 keytool-importkeypair

要在 Android 项目中使用系统签名并将 APK 打包时与项目一起打包&#xff0c;可以按照以下步骤操作&#xff1a; 步骤 1&#xff1a;准备系统签名文件 从 Android 系统源码中获取系统签名文件&#xff0c;通常位于 build/target/product/security 目录下&#xff0c;包括 pla…...

ubuntu22.04 gcc,g++从10.5切换到低版本9.5

一、安装gcc-9.5 mkdir gcc cd gcc sudo apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends gcc-9 | grep -v i386 | grep "^\w") sudo dpkg -i *.deb sudo…...

Microsoft 已经弃用了 <experimental/filesystem> 头文件

#define _CRT_SECURE_NO_WARNINGS 1 #define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING 1 //Microsoft 已经弃用了 <experimental / filesystem> 头文件&#xff0c;并计划在将来移除它。取而代之的是 C17 标准引入的 //<filesystem> 头文件&#xf…...