ICode9

精准搜索请尝试: 精确搜索
  • Python+selenium 网页滚动条操作详解2022-02-18 17:33:26

    selenium没有控制页面滚动的方法,这时候只能借助Js了,selenium提供了一个操作js的方法: execute_script(),可以直接执行js的脚本。 js="var q=document.getElementById(‘id‘).scrollTop=0" driver.execute_script(js)     scrollTop是右侧高度滚动,Y轴滚动 1.滚动条回到

  • Unity 打包 WegGL后与浏览器的通信,解决JS无法使用SendMessage2022-02-18 11:32:15

    unity 调用浏览器 js 直接看 官方文档 调用没什么问题,传值都可以 js 调用 unity 方法 首先在 webgl 打包好的 index.html中写一个按钮,用来触发我们的js Script部分写在打包生成的js段落中就可以了  1 var script = document.createElement("script"); 2

  • Creating .deb to install bash script program2022-02-15 23:31:08

    https://stackoverflow.com/questions/12288357/creating-deb-to-install-bash-script-program   Basically (install and) run dh-make to set up the debian/ directory, edit the generated files (mainly remove the many you do not need, and fill in a package descrip

  • zepto和jquery的区别2022-02-09 11:33:18

    1. Zepto 对象 不能自定义事件 例如执行: $({}).bind('cust', function(){}); 结果: TypeError: Object has no method 'addEventListener' 解决办法是创建一个脱离文档流的节点作为事件对象: 例如: $('').bind('cust', function(){}); 2. Zepto 的选择器表达式: [name=value] 中

  • bash和sh的区别2022-02-08 16:03:44

    1.bash and sh are two different shells. Basically bash is sh, with more features and better syntax. Most commands work the same, but they are different. 2.Having said that, you should realize /bin/sh on most systems will be a symbolic link and will not

  • 引入javaScript2022-02-08 16:01:07

    内部标签: w<!-- script标签内,写javaScript代码--><!-- <script>--><!-- alert("hello,world");--><!-- </script>-->外部引入: <!-- 外部引入注意:script标签必须成对出现--> <script src = "tj.js"></script>

  • 【前端面试必读】setTimeout 、 promise、async await 的执行顺序?宏任务、微任务,分别包含哪些?2022-02-07 11:05:02

    JS 分为同步任务和异步任务 同步任务在主线程上执行 异步任务放在主线程之外的一个任务队列 主线程执行完毕后,读取任务队列的内容 宏任务(macro)task:当前主线程上执行的就是一个宏任务。例: script 的代码、setTimeout、setInterval、postMessage等。 微任务:microtask。例:Prom

  • HTML Entry 源码分析2022-02-05 19:02:10

    简介 从 HTML Entry 的诞生原因 -> 原理简述 -> 实际应用 -> 源码分析,带你全方位刨析 HTML Entry 框架。 序言 HTML Entry 这个词大家可能比较陌生,毕竟在 google 上搜 HTML Entry 是什么 ? 都搜索不到正确的结果。但如果你了解微前端的话,可能就会有一些了解。 致读者 本着不浪费大

  • 2.4 八股题目归纳总结2022-02-04 11:31:10

    axios底层 自动判断用户当前环境,如果是浏览器则使用XMLHttpRequests,nodejs则使用内置http模块 XMLHttpRequests(AJAX) function send(config){ return new Promise(resolve => { const {url = '', method = 'get', data = {}} = config; // 发送ajax请

  • Nmap中一些常用的脚本2022-02-02 18:34:52

    我们将研究最著名的渗透工具之一 Nmap 一款标志性的跨平台扫描器。它的原意为Network Mapper(网络映射器),具有相当强大的扫描功能,几乎适用于任何渗透场景。不少人甚至认为它就是全球最好的扫描软件。除了常规的网络扫描,Nmap还可根据NSE (Nmap scripting Engine)的脚本进行大量渗透

  • Nginx-FastCGI-"Primary script unknown" while reading response header from upstream,2022-02-02 10:32:53

    在对nginx添加fastCGI的支持后,然后进行php页面验证,居然报错File not found,查看日志显示 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, 一开始以为是权限问题,先上配置 location ~ \.php$ { root /data/nginx/ht

  • Unity(二十三):ScriptableObject2022-01-31 22:00:44

    创建Asset资源 - ScriptableObject Assets\Editor\Create_ScriptableObject.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; public class Create_ScriptableObject { [MenuItem("Assets/Create/CreateAss

  • keepalived单播设置2022-01-31 09:30:54

    具体的配置文件参考如下 10.88.0.28 为MFS的master节点之一 10.88.0.29 为MFS的master节点之一 10.88.0.111 为VIP $ cat /soft/keepalived/etc/keepalived/keepalived.conf ! Configuration File for keepalived global_defs { notification_email { root@localhost

  • tinymce.js2022-01-30 11:32:22

    基本使用步骤 添加如下的 layui 表单行: <div class="layui-form-item"> <!-- 左侧的 label --> <label class="layui-form-label">文章内容</label> <!-- 为富文本编辑器外部的容器设置高度 --> <div class="layui-input-block" style=&

  • MATLAB探索初步问题汇总2022-01-29 14:03:10

    MATLAB命令窗口如果显示:尝试将SCRIPT normrnd作为函数执行:C:\User…… 出错sort 这类问题,一般是你的*.m文件的名与内置函数名重名,改一下文件名即可。             2、MATLAB常用的颜色字母? plot函数代表不同颜色的标示符一共有八种:y:黄色;k:黑色;w:白色;b:蓝色;g:绿色;r:红色;c:亮青色;m:

  • thymeleaf fragment不想要div标签2022-01-29 13:32:48

    我想把script全部放入一个页面中,然后其他页面就可以通过th:replace引入它进来。但是正常方式都需要把script包裹在div中,并且div给上th:fragment="foot"这样之后其他页面才可以引入。 我的解决方法是 直接在foot.html写上所有的script,不使用div包裹它 <script th:src="@{/js/j

  • Airtest通过代码生成报告——simple_report、LogToHtml详解2022-01-29 11:03:20

    上期回顾:Airtest生成报告命令行airtest report详解 以下基于python3.8;airtestIDE1.2.11;airtest1.2.2;pocoui1.0.83 上期我们讲了在命令行生成报告,这次我们看下怎么通过脚本直接在代码中运行生成报告。分别是LogToHtml类和simple_report()函数。 LogToHtml 上期我们讲airtest rep

  • dotnetcore EF migration2022-01-29 09:33:03

    migration命令需要安装Microsoft.EntityFrameworkCore.Tools dotnet add package Microsoft.EntityFrameworkCore.sqlserver --version 5.0.13 dotnet add package Microsoft.EntityFrameworkCore.Tools --version 5.0.13 migration命令 add-migration init update-database state

  • PHP Script - 百万级数据脚本执行优化笔记 (PHP Script)2022-01-28 15:04:48

    Mysql - 百万级数据查询优化笔记 (PHP Script) ② 说明:要处理的是在一个脚本中统计的年度账单,和上一篇的处理思路完全 不同,先把全量取出,再按字典形式拼接,10w条数据只需要668s! 数据: 测试服:17w 正式服:280w 1.全量查询,减少链接断开次数,使用PHP处理,性能更高 一次性取出1000条数

  • main script2022-01-27 20:33:39

    main script # jungle.py # import sys, io, os, inspect import numpy as np, pandas as pd; _=np pd.set_option('display.precision', 6) import matplotlib.pyplot as plt # from dqsbt.util2 import util as aid # 加载数据 # from util import ttr

  • sed支持扩展正则表达式2022-01-22 14:32:56

    需求 使用sed对ubuntu apt source快速换源,希望同时兼容两种地址 deb http://archive.ubuntu.com/ubuntu/ bionic main restricted deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted 替换后 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted deb h

  • pycharm创建文件时自动添加头注释2022-01-22 14:31:39

    进入设置 File->settings->Editor->File and Code Templates->Python Script 添加代码 # -*- coding: utf-8 -*- # File : ${NAME}.py #制作人:XXX #文件生成时间:${DATE} ${TIME}

  • Chrome浏览器加载script机制浅谈2022-01-22 11:32:30

    最近在工作中遇到了一些script方面的加载顺序问题,下面进行一些介绍 在之前的理解中,浏览器是作为一个解释器,逐行分析代码,构建DOM树,然后进行资源加载的,那么如果在一个script执行过程中document.write一个新的script标记到文档流中,本script执行完毕后,浏览器就会同步执行新的script中

  • 2021 东华杯 pwn boom_script2022-01-19 10:32:00

    RELRO没开。 程序本身的逻辑是实现了一个boom语言的编译器,我们输入boom语言会给我们编译。 但是对于我们做题人来讲,因为程序体量太大,我们逆向起来会非常麻烦,所以我们结合他一些可能会出漏洞的地方,进行一些猜测并尝试。 我们最后将漏洞点放在了他的array,也就是数组的地方。

  • 【案例】时钟的练习2022-01-15 15:32:22

       写正则,读取html,截取style和script标签提取

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有