×

oracle培训 rac c

报oracle培训班有多大必要?jsp中 contentType 是什么作用

admin admin 发表于2022-05-11 00:21:21 浏览172 评论0

抢沙发发表评论

报oracle培训班有多大必要

很有必要,因为数据库oracle自学非常的难。Oracle JDeveloper 是一个免费的非开源的集成开发环境,通过支持完整的开发生命周期简化了基于 Java的 SOA应用程序和用户界面的开发。适合有一定的Java软件开发经验,能熟练使用Java编程语言和Java EE平台的,并想从事Java架构师的学习者。经过系统的学习使学习者达到具备专业级水平的Java系统架构师。课程介绍Oracle Java架构师培训课程分为两个阶段:第一阶段课程主要包括开源框架Java企业应用、开发EGP3框架的企业应用程序、GOF与Java EE模式、软件项目管理实战等课程,实训项目其中之一是构建网上商城,并且由学员自己动手开发。第二个阶段课程主要包括Java平台的性能调优、Solaris OS系统管理、Oracle数据库高级应用、架构和设计Java EE企业应用程序 实训项目之一是构架跨国企业的OA系统。

jsp中 contentType 是什么作用

解析语言的作用。

获知请求中的消息主体是用何种方式编码,再对主体进行解析。

Content-Type 被指定为 application/x-www-form-urlencoded;其次,提交的数据按照 key1=val1&key2=val2 的方式进行编码,key 和 val 都进行了 URL 转码。大部分服务端语言都对这种方式有很好的支持。例如 PHP 中,$_POST[‘title’] 可以获取到 title 的值,$_POST[‘sub’] 可以得到 sub 数组。-rac

JSP:

JSP全名为Java Server Pages,中文名叫java服务器页面,其根本是一个简化的Servlet设计,它是由Sun Microsystems公司倡导、许多公司参与一起建立的一种动态网页技术标准。-c

JSP技术有点类似ASP技术,它是在传统的网页HTML(标准通用标记语言的子集)文件(*.htm,*.html)中插入Java程序段(Scriptlet)和JSP标记(tag),从而形成JSP文件,后缀名为(*.jsp)。 用JSP开发的Web应用是跨平台的,既能在Linux下运行,也能在其他操作系统上运行。-rac

它实现了Html语法中的java扩展(以 《%, %》形式)。JSP与Servlet一样,是在服务器端执行的。通常返回给客户端的就是一个HTML文本,因此客户端只要有浏览器就能浏览。

JSP技术使用Java编程语言编写类XML的tags和scriptlets,来封装产生动态网页的处理逻辑。网页还能通过tags和scriptlets访问存在于服务端的资源的应用逻辑。JSP将网页逻辑与网页设计的显示分离,支持可重用的基于组件的设计,使基于Web的应用程序的开发变得迅速和容易。 JSP(JavaServer Pages)是一种动态页面技术,它的主要目的是将表示逻辑从Servlet中分离出来。-c

c#如何根据文件数量控制进度条

说实话,关于进度条的解决方案很多,我暂且假定你在做Winform程序开发。

如果你使用的StatusBar中的进度条的话,你可以不考虑多线程更新UI的问题,因为它本身已经在内部实现了外部线程更新UI控件的逻辑。 但是如果你使用普通的Progressbar控件,那你就得自己处理这部分逻辑,因为控件只能在其所在的UI中更新,如果你想在其它线程中更新那你得用控件上的BeginInvoke方法, 当然还有其它的解决方案。-rac

 

方案1:

using System;using System.Drawing;using System.IO;using System.Windows.Forms;using System.Threading;using System.Threading.Tasks;namespace AskAnswers{    public class ShowProgressStatus : Form    {        [STAThread]        static void Main()        {            Application.Run(new ShowProgressStatus());        }        public ShowProgressStatus()        {            InitializeComponent();        }        /// 《summary》        ///    Required method for Designer support - do not modify        ///    the contents of this method with an editor        /// 《/summary》        private void InitializeComponent()        {            this.components = new System.ComponentModel.Container();            this.label1 = new System.Windows.Forms.Label();            this.progressBar1 = new System.Windows.Forms.ProgressBar();            this.btnProcess = new System.Windows.Forms.Button();            this.textBox1 = new System.Windows.Forms.TextBox();                        //@design this.TrayHeight = 0;            //@design this.TrayLargeIcon = false;            //@design this.TrayAutoArrange = true;            label1.Location = new System.Drawing.Point(32, 40);            label1.Text = “Progress Value“;            label1.Size = new System.Drawing.Size(88, 24);            label1.TabIndex = 2;                        progressBar1.Maximum = 10;            progressBar1.Location = new System.Drawing.Point(8, 312);            progressBar1.Minimum = 0;            progressBar1.TabIndex = 0;            progressBar1.Value = 0;                //We have calculated the excat size which will result in only 20 boxes to be drawn                        progressBar1.Size = new System.Drawing.Size(520, 40);            progressBar1.Step = 1;                        btnProcess.Location = new System.Drawing.Point(152, 168);            btnProcess.Size = new System.Drawing.Size(144, 48);            btnProcess.TabIndex = 1;            btnProcess.Text = “Process“;            btnProcess.Click += new System.EventHandler(btnProcess_Click);                        textBox1.Location = new System.Drawing.Point(136, 40);            textBox1.Text = “0“;            textBox1.TabIndex = 3;            textBox1.Size = new System.Drawing.Size(184, 20);            this.Text = “Display Progress Status“;            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);            this.ClientSize = new System.Drawing.Size(616, 393);            this.StartPosition = FormStartPosition.CenterScreen;                        this.Controls.Add(textBox1);            this.Controls.Add(label1);            this.Controls.Add(btnProcess);            this.Controls.Add(progressBar1);        }        void btnProcess_Click(object sender, EventArgs e)        {            if (isProcessRunning)            {                MessageBox.Show(“A process is already running.“);                return;            }            string files = Directory.GetFiles(@“c:\“, “*“);            var filesCount = files.Length;            progressBar1.Maximum = filesCount;            Thread.Sleep(50);            Thread backgroundThread = new Thread(                new ThreadStart(() =》                {                    isProcessRunning = true;                    for (int n = 0; n 《 filesCount; n++ )                    {                        // 模拟拷贝文件过程                         Thread.Sleep(100);                        Console.WriteLine(files[n]);                        progressBar1.BeginInvoke(                            new Action(() =》                                {                                    progressBar1.Value = n + 1;                                }                        ));                    }                    MessageBox.Show(“Thread completed!“);                    progressBar1.BeginInvoke(                            new Action(() =》                            {                                progressBar1.Value = 0;                            }                    ));                    isProcessRunning = false;                }            ));            backgroundThread.Start();        }        private System.Windows.Forms.Button btnProcess;        private System.ComponentModel.Container components;        private System.Windows.Forms.TextBox textBox1;        private System.Windows.Forms.Label label1;        private System.Windows.Forms.ProgressBar progressBar1;        private bool isProcessRunning;    }}

方案2: 利用线程池(Task.StartNew())

你只要把btnProcess_Click中的代码替换为下面的代码即可:

void btnProcess_Click(object sender, EventArgs e){    if (isProcessRunning)    {        MessageBox.Show(“A process is already running.“);        return;    }    Task《string》.Factory.StartNew(() =》 {           isProcessRunning = true;           return Directory.GetFiles(@“C:\“, “*“);        })        .ContinueWith(files =》 {            string filesResult = files.Result;            progressBar1.Maximum = filesResult.Length;            Console.WriteLine(“The Maximum of Progress Bar “ + progressBar1.Maximum);            return filesResult;        })        .ContinueWith(files =》 {            string filesResult = files.Result;            Console.WriteLine(“The files count “ + filesResult.Length);            for (int n = 0; n 《 filesResult.Length; n++ )            {                // 模拟拷贝文件过程                 Thread.Sleep(100);                Console.WriteLine(filesResult[n]);                progressBar1.Value = n + 1;            }        })        .ContinueWith(files =》 {            MessageBox.Show(“Thread completed!“);            progressBar1.BeginInvoke(                    new Action(() =》                    {                        progressBar1.Value = 0;                    }            ));            isProcessRunning = false;        });}

当然,你也可以通过BackgroundWorker来做,可能更简单一点儿,原理相同,你可以搜索一下相关方案。

 

注意,我只是通过一个Thread.Sleep(100)来模拟你Copy文件的逻辑。