摘要: 概览 随着我们的应用程序越来越受欢迎,我们的下一步将要开发多语言功能。方便越来越多的国家使用我们中国的应用程序, 基于 WPF 本地化,我们很多时候使用的是系统资源文件,可是动态切换本地化,就比较麻烦了。 有没有一种方法既可以适用系统的资源文件,又能方便快捷的切换本地化呢? 实现思路 现在我们将要实 阅读全文
posted @ 2019-08-21 09:08 androllen 阅读(2139) 评论(3) 推荐(9) 编辑
摘要: import os import shutil import asyncio import aiofiles.os as aio_os from typing import List async def rm_with_chmod(func, path, exc_info): """修改权限后重试删 阅读全文
posted @ 2025-04-03 19:58 androllen 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 我们使用python 代码来生成一个二叉树遍历图例 在代码中依次输入的前序遍历 # input Enter preorder traversal (space-separated, use 'None' for null nodes): 1 2 4 None None 5 None None 3 6 阅读全文
posted @ 2025-04-03 19:56 androllen 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 尾插法 //实现方式 Node* createListTailInsert() { Node* head = (Node*)malloc(sizeof(Node)); // 创建头节点 head->next = NULL; int n, data; printf("请输入要插入的节点数: "); s 阅读全文
posted @ 2025-03-21 21:22 androllen 阅读(9) 评论(0) 推荐(0) 编辑
摘要: //使用示例 drawer.draw({ type: 'circle', param: 'red' }); // 调用_drawCircle drawer.draw({ type: 'rect', param: 'blue' }); // 调用_drawRect function test() { 阅读全文
posted @ 2025-03-20 18:20 androllen 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 使用.env配置PYTHONPATH来完成模块的加载 在单一模块文件中添加 import sys; sys.path.append("..") 多个模块还是仍然存在无法运行该子程序,就会出现如下ModuleNotFoundError 解决方法: 项目根目录下创建.env 文件 # .env 解决了设 阅读全文
posted @ 2025-03-03 00:34 androllen 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 值类型 int i=null; int? i=null; 我们用一个问号 来指定这个值类型是可空的 属性是只读的 字符串 从上面可以看出来,s2指向的是常量值,后面局部变量的s1做任何修改都不会改变s2自身的值 对象 //output:Name: 李四 ID: 30012211 p1 和p2 都在堆 阅读全文
posted @ 2025-03-02 22:49 androllen 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 斐波那契数列使用 var zero2 = new Febonacci(); var num = zero2.Shell(10); Debug.WriteLine(num); zero2.Main(14); zero2.Febon(155); 斐波那契数列 public class Febonacci 阅读全文
posted @ 2025-03-02 21:29 androllen 阅读(2) 评论(0) 推荐(0) 编辑
摘要: public class SelectionSort { public static int[] Sort(int[] array) { int[] copyArray = new int[array.Length]; Array.Copy(array, copyArray, array.Lengt 阅读全文
posted @ 2025-03-02 21:25 androllen 阅读(1) 评论(0) 推荐(0) 编辑
摘要: public interface IMouseFactory { Mouse createMouse(); } public class HpMouseFactory : IMouseFactory { public Mouse createMouse() { return new HpMouse( 阅读全文
posted @ 2025-03-02 20:34 androllen 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 设计模式 解耦 重用 设计模式原则: 开闭原则 OPEN CLOSE PRINCIPLE 开闭原则是面向对象设计中最基础的设计原则 对扩展开放,对修改关闭 依赖倒置原则 具体实现应该依赖于抽象 高模块不应该依赖低模块,都依赖抽象 public interface IDriver{ public vo 阅读全文
posted @ 2025-03-02 20:29 androllen 阅读(4) 评论(0) 推荐(0) 编辑
more_horiz
keyboard_arrow_up light_mode palette
选择主题
点击右上角即可分享
微信分享提示