- Dockerfile(1) - FROM 指令详解
小菠萝测试笔记
dockerpythonjavacmd大数据
FROM指明当前的镜像基于哪个镜像构建dockerfile必须以FROM开头,除了ARG命令可以在FROM前面FROM[--platform=][AS]FROM[--platform=][:][AS]FROM[--platform=][@][AS]小栗子FROMalpine:latest一个dockerfile可以有多个FROM可以有多个FROM来创建多个镜像,或区分构建阶段,将一个构建阶段作为另
- VUE3 + xterm + nestjs实现web远程终端 或 连接开启SSH登录的路由器和交换机。
焚木灵
node.jsvue
可远程连接系统终端或开启SSH登录的路由器和交换机。相关资料:xtermjs/xterm.js:Aterminalfortheweb(github.com)后端实现(NestJS):1、安装依赖:npminstallnode-ssh@nestjs/websockets@nestjs/platform-socket.io2、我们将创建一个名为RemoteControlModule的NestJS模块,
- Kafka详细解析与应用分析
芊言芊语
kafka分布式
Kafka是一个开源的分布式事件流平台(EventStreamingPlatform),由LinkedIn公司最初采用Scala语言开发,并基于ZooKeeper协调管理。如今,Kafka已经被Apache基金会纳入其项目体系,广泛应用于大数据实时处理领域。Kafka凭借其高吞吐量、持久化、分布式和可靠性的特点,成为构建实时流数据管道和流处理应用程序的重要工具。Kafka架构Kafka的架构主要由
- QCMA:开源的PS Vita内容管理新选择
瞿格女
QCMA:开源的PSVita内容管理新选择qcmaCross-platformcontentmanagerassistantforthePSVita(Nolongermaintained)项目地址:https://gitcode.com/gh_mirrors/qc/qcma随着游戏界的日新月异,对于那些怀旧的游戏玩家而言,PSVita仍然是一颗璀璨的明珠。为了让更多人能够自由地管理自己的游戏和媒体
- Prism 教程
yang_B621
PrismIOC
http://t.csdnimg.cn/VXSSvhttps://blog.csdn.net/u010476739/article/details/119341731Prism-随笔分类-Hello——寻梦者!-博客园(cnblogs.com)C#IoC学习笔记-缥缈的尘埃-博客园(cnblogs.com)WPF_SchuylerEX的博客-CSDN博客
- Apache POI用法
JH3073
apache
一、ApachePOI是什么ApachePOI是用Java编写的免费开源的跨平台的JavaAPI,ApachePOI提供API给Java程序对MicrosoftOffice格式档案读和写的功能,其中使用最多的就是使用POI操作Excel文件。二、POI结构HSSF-提供读写MicrosoftExcelXLS格式档案的功能XSSF-提供读写MicrosoftExcelOOXMLXLSX格式档案的功能
- java中的ide、sdk是什么,javaee\javase\javame区别
极客Thomas
idejavaeclipse
ide:integrateddevelopmentenvironment集成开发环境简单的来说就是提供编译代码等一系列功能的开发环境比如:eclipsesdk:servicedevelopmentpack服务开发包简单来说就是一些封装的功能代码,做成了一个包,给我们可以直接调用比如jdk1.8jdkjavase(JavaPlatform,StandardEdition)标准版本,在电脑上运行jav
- pytorch安装(windows)
m0_62244898
windows人工智能
(1)下载pycharmPyCharm:thePythonIDEforProfessionalDevelopersbyJetBrains(2)下载anacondaAnaconda|TheWorld'sMostPopularDataSciencePlatform(3)创建一个新环境:torchcondacreate-ntorch-y(4)进入新环境condaactivatetorch(5)加入清华源
- flutter开发多端平台应用的探索 上(基本操作)
夏目艾拉
flutter设计模式javaandroid
前言Flutter是一个跨平台的开发框架,它允许开发者使用相同的代码库来构建iOS、Android、Web和桌面应用程序。最近想了想,自己一直在用flutter开发特定端的应用,但是对于其他端的端特性case,如桌面端的菜单、多窗口、鼠标事件,需要怎么处理还没什么概念,本文旨在简单探索这方面的内容。正文首先就是判断平台了,可以通过如下方式import'dart:io'showPlatform;vo
- gitlab的下载和安装教程&我的踩坑经验
o762
gitlab
#######这里就记录一下内网的安装包形式的安装过程############1、下载过程和安装过程1)进入gitlab官网,platform>Install.--gitlab有极狐版,CE(社区版)和EE(企业版)。下面以CE版进行研究和学习。2)也可以进入官网镜像网站或者其它各大镜像网站下载gitlab-ce的rpm包--官网镜像网站:https://packages.gitlab.com/g
- 华为VRP系统基本操作
ZZZCY2003
华为
简介:VRP是VersatileRoutingPlatform的简称,它是华为公司数据通信产品的通用网络操作系统。目前,在全球各地的网络通信系统中,华为设备几乎无处不在,因此,学习了解VRP的相关知识对于网络通信技术人员来说就显得尤为重要。VRP系统提供了丰富的命令行视图,包括用户视图、系统视图、接口视图等,用户可以通过相应的命令进入不同的视图进行配置和管理。例如,system-view命令可以进
- USB HOST DWC3 初始化
wing_7
usbusbdwc
https://www.cnblogs.com/newjiang/p/15675746.html如果dr_mode为device,则初始化gadget。如果dr_mode为host,需要初始化xHCI驱动。在dwc3_host_init函数的最后调用platform_device_add(xhci)添加platformdevice(xhci-hcd),用于匹配xHCIdriver(xHCIdriv
- Java 批量ping操作
不会写诗的程序猿
Java性能调优批量ping批量pingcom.sun.jnaLgetLib
批量ping操作1批量ping操作,所需jar包 net.sf.json-lib json-lib 2.4 jdk13 net.java.dev.jna jna 4.0.0 net.java.dev.jna jna-platform 4.0.0 2工具包下载点击
- 获取视频长度
AI算法网奇
python基础python开发语言
fromdecordimportVideoReadersys.path.insert(0,'/home/model-server/dev/data_platform/processors')fromaestheticimportget_aesthetic_model,get_aesthetic_score_batch_queuefrommytools.utilsimportprint_with_t
- 最新网络安全(黑客)——自学篇
黑客小雨
web安全安全
*需要的小伙伴关注我第一阶段:基础操作入门,学习基础知识入门的第一步是学习一些当下主流的安全工具课程并配套基础原理的书籍,一般来说这个过程在1个月左右比较合适。在这个阶段,你已经对网络安全有了基本的了解。如果你学完了第一步,相信你已经在理论上明白了上面是sql注入,什么是xss攻击,对burp、msf、cs等安全工具也掌握了基础操作。这个时候最重要的就是开始打地基!所谓的“打地基”其实就是系统化的
- 全模型驱动架构(f-MDA)的基本思想
禹希初
MDAf-MDA架构
传统MDA实现方案的共同缺陷模型驱动架构(ModelDrivenArchitecture,MDA)的核心思想是抽象出与实现技术无关、完整描述业务功能的核心平台无关模型(PIM,PlatformIndependentModel),然后针对不同实现技术制定多个转换规则,通过这些转换规则及辅助工具将PIM转换成与具体实现技术相关的平台相关模型(PSM,PlatformSpecificModel),最后将
- [linux 驱动]增加一个文件节点控制led灯亮灭
嵌入式成长家
linux内核的系统实战linux驱动linux驱动led灯驱动
目录1修改设备树2修改驱动3驱动源码3.1驱动源码3.2设备树节点3.3驱动源码分析3.3.1##解释3.3.2class_create解释3.3.3class_create_file解释3.3.4of_get_named_gpio_flags解释3.3.5devm_gpio_request解释3.3.6platform_driver_register解释3.3.7platform_driver_
- 微信小程序入门【三】:实现简单登录退出和个人信息页面
山岫
微信小程序微信小程序小程序
效果图预览这个框很是惆怅,但是真机调试没出现过,这个bug下次再解决吧。这次说说登录。效果图:附上代码:home.wxml-->-->-->-->Hi游客{{userInfo.nickName}}-->退出登录@技术支持:江阔jk921home.wxss/*pages/scroll/scroll.wxss*/.top{width:100%;height:400rpx;background-colo
- Web应用防火墙
Smile灬凉城666
网络安全WAF安全
一、定义与目的WAF是一种特殊类型的防火墙,专门设计用于监视、过滤和阻挡进出Web应用的HTTP流量。其主要目的是保护Web应用免受如XSS(跨站脚本)、SQL注入、会话劫持等网络攻击。二、工作原理WAF工作在应用层,即OSI模型的第七层。它通过对HTTP/HTTPS请求进行解析、协议检测、攻击识别和恶意行为阻断等步骤来保护Web应用。具体来说,WAF会解析进入Web应用的HTTP/HTTPS请求
- 如何识别和防范跨站脚本攻击(XSS)?
盼盼盼
xss安全网络
识别和防范跨站脚本攻击(XSS)需要一系列的措施,包括输入验证、输出编码、安全配置和用户教育。以下是一些关键步骤:识别XSS异常行为:观察网站行为是否异常,例如页面上突然出现未经预期的内容或功能。错误消息:检查错误消息中是否包含敏感信息,这可能是由于未经过滤的输入导致的。安全工具:使用浏览器插件或安全扫描工具来检测潜在的XSS漏洞。代码审计:定期进行代码审计,查找可能的安全漏洞,特别是在处理用户输
- CMake项目的CMackeLists.txt内容语法详解
过好每一天的女胖子
linuxWindows跨平台cmake跨平台
文章目录1、CMake构建级别2、CMakeLists.txt文件基本结构语法解析宏变量含义1、CMakeCMake(crossplatformmake)是一个跨平台的安装编译工具,可以使用简单的语句描述安装编译过程,输出安装编译过程中产生的中间文件。CMake不直接产生最终的文件,而是产生对应的构造文件,如linux下的makefile,windows下的vs的projects等CMake的编译
- 【网络安全】空字节绕过:URL回调+XSS+SQL绕WAF
秋说
网络安全web安全xsssql漏洞挖掘
未经许可,不得转载。文章目录空字节URL回调XSSSQL空字节\0,也称为null字节,是一个值为零的特殊字符。在编程中,通常用来表示字符串的结束。攻击者可以利用null字节注入来绕过一些验证或过滤机制。以下三个漏洞,空字节功不可没。URL回调密码重置功能,发起请求后,邮箱会收到链接。请求包中存在callbackUrl参数:在参数中添加/test,发包后,邮箱中的链接为https://compan
- 【Docker】MongoDB 容器化部署
轻云UC
运维部署mongodbdocker数据库
MongoDBdocker容器化部署MongoDB标准软件基于BitnamiMongoDB构建。当前版本未7.0.5你可以通过轻云UC部署工具直接安装部署,也可以手动按如下文档操作配置文件地址:https://gitee.com/qingplus/qingcloud-platformQinghubStudio在线体验初始化一个新实例使用Docker容器网络,应用程序容器可以轻松访问容器内运行的Mo
- Java Web安全与Spring Config对象实战
福建低调
本文还有配套的精品资源,点击获取简介:本课程深入探讨JavaWeb开发中的安全实践,包括认证与授权、输入验证、CSRF和XSS防护以及SQL注入防御等关键安全措施。同时,介绍SpringSecurity框架的应用,以及Config对象在Spring配置管理中的作用,包括依赖注入和外部化配置。课程还包括实战演练,通过设置安全环境和安全漏洞模拟,帮助开发者提升应用的安全性和故障排查能力。1.Web安全
- .net MAUI应用生命周期
A_nanda
.netmaui.netmaui生命周期
.NETMulti-platformAppUI(.NETMAUI)应用通常有四种执行状态:“未运行”、“运行中”、“已停用”和“已停止”。当应用从未运行状态转换为运行状态、从运行状态转换为已停用状态、从已停用状态转换为已停止状态、从已停止状态转换为运行状态,以及从已停止状态转换为未运行状态时,.NETMAUI会引发Window类的跨平台生命周期事件。下图显示了.NETMAUI应用生命周期的概述:在
- 【网络安全】URL解析器混淆绕过CSP实现XSS
秋说
网络安全web安全xss漏洞挖掘
未经许可,不得转载。文章目录前言正文前言许多流行的静态网站生成器都存在图像CDN功能,它们通过优化网站中的图像来加快页面加载速度。例如:1、OptimizingImages|Next.js利用内置的next/image组件优化图像(nextjs.org)2、NuxtImage:Nuxt应用的图像优化即插即用的图像优化功能,使用内置优化器对图像进行调整(image.nuxt.com)这些工具的目标都
- VSCode学习笔记
songyuc
学习笔记
1.快捷键KeyDescriptionPlatformF1打开命令面板(CommandPalette)Win10Shift+Delete剪切当前光标所在的代码行Win102.文件2.1在文件列表中定位当前文件操作路径:右键单击文件名⇒在右键菜单中点击【RevealinExplorerView】
- WordPress website building technology service providers
podoor
wordpresswoocommerce
Top10WordPresswebsitebuildingcompaniesinChina,WordPresswebsitebuildingtechnologyserviceprovidersJianzhanpress.comWordPressThemeJianzhanisaplatformdedicatedtoWordPressthemedevelopment,providingavariety
- XSS和sql注入部分场景测试用例样例
谷隐凡二
测试xsssql测试用例
目录1.SQL注入测试用例设计基本SQL注入复杂SQL注入盲注测试2.XSS攻击测试用例设计基本XSS攻击复杂XSS攻击DOM-basedXSS1.SQL注入测试用例设计SQL注入攻击通常通过在输入字段中插入恶意SQL代码,试图操纵数据库查询。设计这些测试用例时,需要涵盖各种常见的SQL注入技术。基本SQL注入用例1:使用单引号:输入:'OR'1'='1预期结果:应拒绝输入并返回错误消息,不应允许
- QT-Could not load the Qt platform plugin “xcb“ in xxx even though it was found.解决
QuanHaHQuan
BugFreeqtpythonopencvlinux
QT-CouldnotloadtheQtplatformplugin''xcb"inxxxeventhoughitwasfound.解决文章目录1.杂话2.问题3.解决3.1查找系统默认的Qt插件路径3.2设置环境变量QT_PLUGIN_PATH3.2.1自动设置环境变量3.3检查QT库是否正确加载3.4后续3.4.1删除或重命名OpenCV自带的Qt插件目录3.4.2检查其他Qt环境变量1.杂话
- JAVA基础
灵静志远
位运算加载Date字符串池覆盖
一、类的初始化顺序
1 (静态变量,静态代码块)-->(变量,初始化块)--> 构造器
同一括号里的,根据它们在程序中的顺序来决定。上面所述是同一类中。如果是继承的情况,那就在父类到子类交替初始化。
二、String
1 String a = "abc";
JAVA虚拟机首先在字符串池中查找是否已经存在了值为"abc"的对象,根
- keepalived实现redis主从高可用
bylijinnan
redis
方案说明
两台机器(称为A和B),以统一的VIP对外提供服务
1.正常情况下,A和B都启动,B会把A的数据同步过来(B is slave of A)
2.当A挂了后,VIP漂移到B;B的keepalived 通知redis 执行:slaveof no one,由B提供服务
3.当A起来后,VIP不切换,仍在B上面;而A的keepalived 通知redis 执行slaveof B,开始
- java文件操作大全
0624chenhong
java
最近在博客园看到一篇比较全面的文件操作文章,转过来留着。
http://www.cnblogs.com/zhuocheng/archive/2011/12/12/2285290.html
转自http://blog.sina.com.cn/s/blog_4a9f789a0100ik3p.html
一.获得控制台用户输入的信息
&nbs
- android学习任务
不懂事的小屁孩
工作
任务
完成情况 搞清楚带箭头的pupupwindows和不带的使用 已完成 熟练使用pupupwindows和alertdialog,并搞清楚两者的区别 已完成 熟练使用android的线程handler,并敲示例代码 进行中 了解游戏2048的流程,并完成其代码工作 进行中-差几个actionbar 研究一下android的动画效果,写一个实例 已完成 复习fragem
- zoom.js
换个号韩国红果果
oom
它的基于bootstrap 的
https://raw.github.com/twbs/bootstrap/master/js/transition.js transition.js模块引用顺序
<link rel="stylesheet" href="style/zoom.css">
<script src=&q
- 详解Oracle云操作系统Solaris 11.2
蓝儿唯美
Solaris
当Oracle发布Solaris 11时,它将自己的操作系统称为第一个面向云的操作系统。Oracle在发布Solaris 11.2时继续它以云为中心的基调。但是,这些说法没有告诉我们为什么Solaris是配得上云的。幸好,我们不需要等太久。Solaris11.2有4个重要的技术可以在一个有效的云实现中发挥重要作用:OpenStack、内核域、统一存档(UA)和弹性虚拟交换(EVS)。
- spring学习——springmvc(一)
a-john
springMVC
Spring MVC基于模型-视图-控制器(Model-View-Controller,MVC)实现,能够帮助我们构建像Spring框架那样灵活和松耦合的Web应用程序。
1,跟踪Spring MVC的请求
请求的第一站是Spring的DispatcherServlet。与大多数基于Java的Web框架一样,Spring MVC所有的请求都会通过一个前端控制器Servlet。前
- hdu4342 History repeat itself-------多校联合五
aijuans
数论
水题就不多说什么了。
#include<iostream>#include<cstdlib>#include<stdio.h>#define ll __int64using namespace std;int main(){ int t; ll n; scanf("%d",&t); while(t--)
- EJB和javabean的区别
asia007
beanejb
EJB不是一般的JavaBean,EJB是企业级JavaBean,EJB一共分为3种,实体Bean,消息Bean,会话Bean,书写EJB是需要遵循一定的规范的,具体规范你可以参考相关的资料.另外,要运行EJB,你需要相应的EJB容器,比如Weblogic,Jboss等,而JavaBean不需要,只需要安装Tomcat就可以了
1.EJB用于服务端应用开发, 而JavaBeans
- Struts的action和Result总结
百合不是茶
strutsAction配置Result配置
一:Action的配置详解:
下面是一个Struts中一个空的Struts.xml的配置文件
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
&quo
- 如何带好自已的团队
bijian1013
项目管理团队管理团队
在网上看到博客"
怎么才能让团队成员好好干活"的评论,觉得写的比较好。 原文如下: 我做团队管理有几年了吧,我和你分享一下我认为带好团队的几点:
1.诚信
对团队内成员,无论是技术研究、交流、问题探讨,要尽可能的保持一种诚信的态度,用心去做好,你的团队会感觉得到。 2.努力提
- Java代码混淆工具
sunjing
ProGuard
Open Source Obfuscators
ProGuard
http://java-source.net/open-source/obfuscators/proguardProGuard is a free Java class file shrinker and obfuscator. It can detect and remove unused classes, fields, m
- 【Redis三】基于Redis sentinel的自动failover主从复制
bit1129
redis
在第二篇中使用2.8.17搭建了主从复制,但是它存在Master单点问题,为了解决这个问题,Redis从2.6开始引入sentinel,用于监控和管理Redis的主从复制环境,进行自动failover,即Master挂了后,sentinel自动从从服务器选出一个Master使主从复制集群仍然可以工作,如果Master醒来再次加入集群,只能以从服务器的形式工作。
什么是Sentine
- 使用代理实现Hibernate Dao层自动事务
白糖_
DAOspringAOP框架Hibernate
都说spring利用AOP实现自动事务处理机制非常好,但在只有hibernate这个框架情况下,我们开启session、管理事务就往往很麻烦。
public void save(Object obj){
Session session = this.getSession();
Transaction tran = session.beginTransaction();
try
- maven3实战读书笔记
braveCS
maven3
Maven简介
是什么?
Is a software project management and comprehension tool.项目管理工具
是基于POM概念(工程对象模型)
[设计重复、编码重复、文档重复、构建重复,maven最大化消除了构建的重复]
[与XP:简单、交流与反馈;测试驱动开发、十分钟构建、持续集成、富有信息的工作区]
功能:
- 编程之美-子数组的最大乘积
bylijinnan
编程之美
public class MaxProduct {
/**
* 编程之美 子数组的最大乘积
* 题目: 给定一个长度为N的整数数组,只允许使用乘法,不能用除法,计算任意N-1个数的组合中乘积中最大的一组,并写出算法的时间复杂度。
* 以下程序对应书上两种方法,求得“乘积中最大的一组”的乘积——都是有溢出的可能的。
* 但按题目的意思,是要求得这个子数组,而不
- 读书笔记-2
chengxuyuancsdn
读书笔记
1、反射
2、oracle年-月-日 时-分-秒
3、oracle创建有参、无参函数
4、oracle行转列
5、Struts2拦截器
6、Filter过滤器(web.xml)
1、反射
(1)检查类的结构
在java.lang.reflect包里有3个类Field,Method,Constructor分别用于描述类的域、方法和构造器。
2、oracle年月日时分秒
s
- [求学与房地产]慎重选择IT培训学校
comsci
it
关于培训学校的教学和教师的问题,我们就不讨论了,我主要关心的是这个问题
培训学校的教学楼和宿舍的环境和稳定性问题
我们大家都知道,房子是一个比较昂贵的东西,特别是那种能够当教室的房子...
&nb
- RMAN配置中通道(CHANNEL)相关参数 PARALLELISM 、FILESPERSET的关系
daizj
oraclermanfilespersetPARALLELISM
RMAN配置中通道(CHANNEL)相关参数 PARALLELISM 、FILESPERSET的关系 转
PARALLELISM ---
我们还可以通过parallelism参数来指定同时"自动"创建多少个通道:
RMAN > configure device type disk parallelism 3 ;
表示启动三个通道,可以加快备份恢复的速度。
- 简单排序:冒泡排序
dieslrae
冒泡排序
public void bubbleSort(int[] array){
for(int i=1;i<array.length;i++){
for(int k=0;k<array.length-i;k++){
if(array[k] > array[k+1]){
- 初二上学期难记单词三
dcj3sjt126com
sciet
concert 音乐会
tonight 今晚
famous 有名的;著名的
song 歌曲
thousand 千
accident 事故;灾难
careless 粗心的,大意的
break 折断;断裂;破碎
heart 心(脏)
happen 偶尔发生,碰巧
tourist 旅游者;观光者
science (自然)科学
marry 结婚
subject 题目;
- I.安装Memcahce 1. 安装依赖包libevent Memcache需要安装libevent,所以安装前可能需要执行 Shell代码 收藏代码
dcj3sjt126com
redis
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
前面3步应该没有问题,主要的问题是执行make的时候,出现了异常。
异常一:
make[2]: cc: Command not found
异常原因:没有安装g
- 并发容器
shuizhaosi888
并发容器
通过并发容器来改善同步容器的性能,同步容器将所有对容器状态的访问都串行化,来实现线程安全,这种方式严重降低并发性,当多个线程访问时,吞吐量严重降低。
并发容器ConcurrentHashMap
替代同步基于散列的Map,通过Lock控制。
&nb
- Spring Security(12)——Remember-Me功能
234390216
Spring SecurityRemember Me记住我
Remember-Me功能
目录
1.1 概述
1.2 基于简单加密token的方法
1.3 基于持久化token的方法
1.4 Remember-Me相关接口和实现
- 位运算
焦志广
位运算
一、位运算符C语言提供了六种位运算符:
& 按位与
| 按位或
^ 按位异或
~ 取反
<< 左移
>> 右移
1. 按位与运算 按位与运算符"&"是双目运算符。其功能是参与运算的两数各对应的二进位相与。只有对应的两个二进位均为1时,结果位才为1 ,否则为0。参与运算的数以补码方式出现。
例如:9&am
- nodejs 数据库连接 mongodb mysql
liguangsong
mongodbmysqlnode数据库连接
1.mysql 连接
package.json中dependencies加入
"mysql":"~2.7.0"
执行 npm install
在config 下创建文件 database.js
- java动态编译
olive6615
javaHotSpotjvm动态编译
在HotSpot虚拟机中,有两个技术是至关重要的,即动态编译(Dynamic compilation)和Profiling。
HotSpot是如何动态编译Javad的bytecode呢?Java bytecode是以解释方式被load到虚拟机的。HotSpot里有一个运行监视器,即Profile Monitor,专门监视
- Storm0.9.5的集群部署配置优化
roadrunners
优化storm.yaml
nimbus结点配置(storm.yaml)信息:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional inf
- 101个MySQL 的调节和优化的提示
tomcat_oracle
mysql
1. 拥有足够的物理内存来把整个InnoDB文件加载到内存中——在内存中访问文件时的速度要比在硬盘中访问时快的多。 2. 不惜一切代价避免使用Swap交换分区 – 交换时是从硬盘读取的,它的速度很慢。 3. 使用电池供电的RAM(注:RAM即随机存储器)。 4. 使用高级的RAID(注:Redundant Arrays of Inexpensive Disks,即磁盘阵列
- zoj 3829 Known Notation(贪心)
阿尔萨斯
ZOJ
题目链接:zoj 3829 Known Notation
题目大意:给定一个不完整的后缀表达式,要求有2种不同操作,用尽量少的操作使得表达式完整。
解题思路:贪心,数字的个数要要保证比∗的个数多1,不够的话优先补在开头是最优的。然后遍历一遍字符串,碰到数字+1,碰到∗-1,保证数字的个数大于等1,如果不够减的话,可以和最后面的一个数字交换位置(用栈维护十分方便),因为添加和交换代价都是1