Internship23

AJAX

动态网站和静态网站

​ 动态网站可维护性高,拓展性强,成本比较高

​ 静态网站可维护性低,成本低

PHP

**单引号和双引号的区别:**单引号将内容解析成字符串 双引号将内容解析成变量

配置虚拟主机

1.httpd配置文件 ====》documentRoot 根路径 ======> extra文件夹 =====> v-hosts配置文件 ====》定义主机名 别名 根路径 ===》修改hosts 127.0.0.1(表示本机) chen.com

配置多台虚拟主机

VirtualHosts 把其下面的注释打开 注释内容为----- Include conf/extra/httpd-vhosts.conf==》在v-hosts 文件中配置多台虚拟主机 ==》修改hosts文件 ==》 修改权限标签 Directory 把它更改为根目录

AJAX

  • 原生

    • 1.创建核心对象 XMLHttpRequest(xhr)
    • 2.准备发送 xhr.open(参数)
        1. 请求方式 get(参数在URL) post(请求体)
        2. URL: 请求地址
        3. 同步异步 默认是异步 true
    • 3.发送请求 xhr.send(参数)
      • 当是get时 参数为null
      • 当是post 参数为需传递到后台的参数
    • 4.回调函数 xhr.onreadystatechange
      • readyState
        • 0 对象创建成功
        • 1 已发送请求
        • 2 浏览器接收到数据
        • 3 浏览器解析数据
        • 4 数据解析完成 可以开始使用
      • status
        • 2XX 成功
        • 3XX 转发或重定向
        • 4XX 找不到资源
        • 5XX 服务器端错误
  • 不适用ajax如何实现异步刷新

    • 隐藏帧
      • iframe 子框架上的数据放到大窗口的DOM元素下
  • JQuery封装的ajax

    • $.ajax() 内部参数为一个对象

      • type 请求方式
      • url 请求地址
      • data 请求参数
      • dataType
        • xml responseXML
        • text responseText
        • script(脚本)responseText
        • html responseText
        • json responseText
        • jsonp responseText
      • success 数据请求成功后的回调函
      • error 失败后的回调函数

      跨域

      ajax默认不允许跨域,因为同源策略

      • dataType改为jsonp

      jsonp原理

      • 动态创建script标签 (可以进行跨域操作)
        *
      • 静态创建script标签 :
        • 保证加载顺序
        • 参数不方便传递

      模板引擎

      ​ 数据+模板 ==> 静态页面的片段

      前后端分离

PS C:\Users\binfan.he\Desktop\internship\emtsDataAnlysis> & C:/Users/binfan.he/AppData/Local/Programs/Python/Python310/python.exe c:/Users/binfan.he/Desktop/internship/emtsDataAnlysis/measurement.py 点位筛选: 原始点数=144, 筛选后点数=128 (移除16个外围点位) Ignoring fixed y limits to fulfill fixed data aspect with adjustable data limits. Ignoring fixed x limits to fulfill fixed data aspect with adjustable data limits. Ignoring fixed x limits to fulfill fixed data aspect with adjustable data limits. open file: C:/Users/binfan.he/Desktop/internship/emtsDataAnlysis/data/W101_loc_20250725_104154.txt successful! get sta points:147 变换系数为: [-1.16 -2.02 9.92 17.98 0.06 -0.02 -0.14] error[mm]: bias=0.86, rep=0.14, rms=0.87, rmsMax=1.63, 95%CI=1.47, median=0.73 ori std=0.00[deg] PS C:\Users\binfan.he\Desktop\internship\emtsDataAnlysis> & C:/Users/binfan.he/AppData/Local/Programs/Python/Python310/python.exe c:/Users/binfan.he/Desktop/internship/emtsDataAnlysis/measurement_2.py open file: C:/Users/binfan.he/Desktop/internship/emtsDataAnlysis/data/5#/20250704 loc/loc_300cube-4-W101.txt successful! get sta points:65 变换系数为: [ 8.33 -10.88 11.84 -23.05 0.05 0.08 0.42] error[mm]: bias=0.66, rep=0.19, rms=0.69, rmsMax=1.27, 95%CI=0.99, median=0.63 ori std=0.00[deg] Traceback (most recent call last): File "c:\Users\binfan.he\Desktop\internship\emtsDataAnlysis\measurement_2.py", line 524, in <module> emtsPdvMeasure(case=2) File "c:\Users\binfan.he\Desktop\internship\emtsDataAnlysis\measurement_2.py", line 518, in emtsPdvMeasure pdvMeas(ps1, arr1) File "c:\Users\binfan.he\Desktop\internship\emtsDataAnlysis\measurement_2.py", line 422, in pdvMeas ax23.violinplot(errRmsBox, positions=disBox, showmedians=True, widths=20) File "C:\Users\binfan.he\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\_api\deprecation.py", line 453, in wrapper return func(*args, **kwargs) File "C:\Users\binfan.he\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\__init__.py", line 1521, in inner return func( File "C:\Users\binfan.he\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\axes\_axes.py", line 8615, in violinplot vpstats = cbook.violin_stats(dataset, _kde_method, points=points, File "C:\Users\binfan.he\AppData\Local\Programs\Python\Python310\lib\site-packages\matplotlib\cbook.py", line 1509, in violin_stats min_val = np.min(x) File "C:\Users\binfan.he\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\_core\fromnumeric.py", line 3302, in min return _wrapreduction(a, np.minimum, 'min', axis, None, out, File "C:\Users\binfan.he\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\_core\fromnumeric.py", line 86, in _wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) ValueError: zero-size array to reduction operation minimum which has no identity 这是我代码运行产生的报错,请告诉我报错原因,和如果我希望你能修正错误,你可能需要哪些代码中的函数2
07-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值