cuiweiyou

  • Windows下C++获取进程ID、进程基址、窗口句柄

    Windows下C++获取进程ID、进程基址、窗口句柄

    获取进程id [crayon-681427a87db11208306115/] 获取进程基地址 [crayon-681427a87db1e725284136/] 通过进程ID获取其顶层窗口句柄 警告:有时候下面代码得到的句柄,和 FindWindow 得到的句柄不同。 FindWindow得到的总是指定了窗口类或窗体名的目标窗体的句柄; 下面代码得到的则是进制中执行其的窗体——可能是子窗体(如弹出的Dialog)——的句柄,同 CWnd::...

  • CreateRemoteThread注入示例,调用远程进程的无参、有参函数

    CreateRemoteThread注入示例,调用远程进程的无参、有参函数

    一 被注入的目标程序 [crayon-681427a87e656049312411/] 二 注入器程序 0.获取目标进程PID windows 7 win7上,演示程序直接启动为命令提示符独立程序,FindWindow配合GetWindowThreadProcessId拿到的PID和任务管理器中看到的一致,可用。 [crayon-681427a87e65f489185626/] windows 10 在win10上,命令提示符是一个父窗体,演示程序启动为它的一...

  • threejs_r132.使用Raycaster获取鼠标点击物体示例

    threejs_r132.使用Raycaster获取鼠标点击物体示例

    全屏let original_width=800;let original_height=350;let canvas=document.getElementById("canvas");let button=document.getElementById("button");button.onclick=function(){CanvasResizeManager.addFullScreenListener()};let head=document.getElementsByTagName("head")[0];let cannon_script=document.createElement("script");cannon_script.src="http:...

  • threejs_r132.结合cannon.js_v0.6.2示例

    threejs_r132.结合cannon.js_v0.6.2示例

    Cannon.js是一个Web的轻量级3D物理引擎,包括简单的碰撞检测,各种体形,接触,摩擦和约束。可用于游戏的刚体模拟。用JavaScript编写的,可以与任何支持浏览器的渲染或游戏引擎一起使用。 cannonjs官网:http://schteppe.github.io/cannon.js/ cannonjs分支:https://github.com/pmndrs/cannon-es/ let head=document.getElementsByTagName("head")[0];let c...

  • python使用xlrd时的错误处理

    python使用xlrd时的错误处理

    1. XLRDError: Excel xlsx file; not supported 这是因为高版本xlrd不支持xlsx格式导致的,可以安装低版本 [crayon-681427a87f66e935379113/] 2. NotImplementedError: formatting_info=True not yet implemented 这是因为使用 rich_text_runlist_map 时,不支持xlsx格式导致的,把xlsx另存为xls格式。 [crayon-681427a87f675686722262/]

  • python中笛卡尔积的示例

    python中笛卡尔积的示例

    根据一个提问整理的 https://ask.csdn.net/questions/7475427 。 核心需求是,有若干集合(列表),每个集合中的元素数量是相同的: [crayon-681427a87f9e6782074481/] 期望这些列表元素能如下组合 这个问题的核心是数学中的“笛卡尔积”,如果不知道这个概念解决起来确实挺费脑筋。 根据笛卡尔积的运算,只要将上面的二维数组-excel表格,以"b2"为中心,顺...

  • 使用python下载m3u8在线ts视频并解密合并

    使用python下载m3u8在线ts视频并解密合并

    现在的在线视频都流行使用m3u8格式,加载一个ts网络地址的列表,分段加载视频。 通常,第二个才是ts文件的url列表,并说明是否进行了加密。 m3u8内容的格式比较简单。 这里在macos中使用python结合ffmpeg进行下载: [crayon-681427a87fe47560862727/] 恼人错误就是 ValueError: Data must be padded to 16 byte boundary in CBC mode ,解密时须...

  • macos下pynput.mouse监听鼠标事件无响应

    macos下pynput.mouse监听鼠标事件无响应

    [crayon-681427a880196435557598/] - end

  • python3使用pybst可视化完全二叉树

    python3使用pybst可视化完全二叉树

    PyBST在Python2中实现了二进制树、AVL树、Splay树和红黑树。此外,PyBST还提供了一个模块,用于使用networkx和matplotlib绘制这些树。 https://pypi.org/project/pybst/ https://github.com/TylerSandman/py-bst 1.pybst的若干准备 在python3中使用,需要做必要的修改。 [crayon-681427a8804f9348444741/] 首先,修改文件 "/Library/Frameworks/Python.f...

  • uiautomatorviewer抓取Android页面失败的处理

    uiautomatorviewer抓取Android页面失败的处理

    本例场景: 手机:小米2SC,安卓5.0.2/MUI9.2;小米Note3,安卓9/MUI12 ERROR: null root node returned by UiTestAutomationBridge. Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException :Remote object doesn't exits! https://blog.csdn.net/q915730058/article/details/108150792 https://blog.csdn.net/qq_40280920/ar...

  • threejs_r132.使用GPU拾取方法的鼠标射击示例

    threejs_r132.使用GPU拾取方法的鼠标射击示例

    本例参照 https://threejsfundamentals.org/threejs/lessons/zh_cn/threejs-picking.html 原理: 首先,物体有id,并且自身颜色根据id数值计算出的, 然后,获取鼠标点击位置的1像素的颜色值,反推id,将对应物体就移除。 缺陷就是基于颜色,如果场景中颜色很多,及物体的颜色比较相近,在视野比较远时-物体离相机很远,会出现‘隔山打牛’的情况。 let head...

  • threejs_r132.常见材质示例

    threejs_r132.常见材质示例

    let three_script=document.createElement("script");three_script.src="http://www.gaohaiyan.com/dws/walt/three_r132_min.js";let head=document.getElementsByTagName("head")[0];head.appendChild(three_script);three_script.onload=function(){let cinema=new Cinema();cinema.render()};class MeshBasicPlaneActor{constructor(){let mat=new THREE.MeshB...

  • threejs_r132.Points和Line

    threejs_r132.Points和Line

    let three_script=document.createElement("script");three_script.src="http://www.gaohaiyan.com/dws/walt/three_r132_min.js";let head=document.getElementsByTagName("head")[0];head.appendChild(three_script);three_script.onload=function(){let cinema=new Cinema();cinema.render()};class SpherePointsCloudActor{constructor(color,radius,posit...

  • threejs_r132.光源示例

    threejs_r132.光源示例

    threejs里有:环境光 、平行光 、点光 、聚光 、半球光 、面光。 AmbientLight(环境光)颜色会直接作用物体的当前颜色上。 DirectionalLight(平行光源)平行光源,例如太阳光。 PointLight(点光源)一个点射出向所有方向。 SpotLight(聚光灯)聚光灯效果。例如台灯。 HemisphereLight(半球光)创造自然室外光线,模拟反光和光线微弱的天空。 AreaLight...

  • threejs_r132.使用OrbitControls飞行视角示例

    threejs_r132.使用OrbitControls飞行视角示例

    W、S、A、D 或 上、下、左、右 按键。 let new_script=document.createElement("script");new_script.src="http://www.gaohaiyan.com/dws/walt/three_r132_min.js";let head=document.getElementsByTagName("head")[0];head.appendChild(new_script);new_script.onload=function(){let cinema=new Cinema();cinema.animate()};class Cinema{constructor(){this.c...

  • threejs_r132.拆分视窗渲染示例

    threejs_r132.拆分视窗渲染示例

    let three_script=document.createElement("script");three_script.src="http://www.gaohaiyan.com/dws/walt/three_r132_min.js";let head=document.getElementsByTagName("head")[0];head.appendChild(three_script);three_script.onload=function(){main()};class TextLegendSprite{constructor(text="",position=new THREE.Vector3(0,0,0),w=2,h=2,textcolor="...