Tag:Test code

  • Usage Summary of Python collaborative process (I)

    Time:2022-5-6

    1、 Python collaboration keyword Async: declare collaboration Note: the function declared through async is not a function, and a separate call will not be executed Await: it is used to wait for objects that can wait, including collaboration (that is, the collaboration declared by async), task (asyncio. Create_task(), asyncio ensure_ Future () is the task […]

  • Pit of pointer events

    Time:2022-5-4

    When we do the function of dragging page elements, we will consider the adaptation between the PC end and the mobile end, so we use the combination of MouseDown, MouseMove and mouseup on the PC end, and the combination of touchstart, touchmove and touchend on the mobile end will also be active,If both ends are […]

  • Writing high-quality unit tests for unity3d using NUnit

    Time:2022-4-13

    0x00 unit test pro & con Recently, I tried to introduce TDD (Test Driven Development) development mode into the game project I participated in, so unit testing has become very necessary. This blog will talk about the feelings and thoughts of this period of time. Due to the differences between game development and traditional software […]

  • Understanding IOC

    Time:2022-4-12

    Learning spring and IOC is a topic that cannot be bypassed. As the foundation of spring, IOC has too many blogs and tutorials. Here is a brief review. Take job hunting as an example to talk about my understanding of IOC. In the classic MVC architecture, there are generally Dao, service and controller layers. We […]

  • Unit test (III)

    Time:2022-4-1

    When the object to be tested depends on another object that cannot be controlled (system related, third-party services, etc.), how should we test it? I Problem description The requirement to judge whether the file is valid has changed: the valid file extension is stored in the file system, and the fileverify class to be tested […]

  • Install tensorflow environment and jupyter under Anaconda

    Time:2022-3-23

    Tensorflow has many versions, and there are great differences between different versions. To install tensorflow 1 4 as an example to introduce the creation process. The steps for installing other versions are similar. Install tensorflow1 four 1. Open Anaconda prompt 2. Create tensorflow1 4 environment The environment is named tensorflow1 4. My Python is 3.6, […]

  • [share] IOS development – objective C runtime technology summary, what a powerful runtime

    Time:2022-3-18

    preface: Objective C’s runtime technology is very powerful. It can obtain and modify all kinds of information of classes at runtime, including obtaining method list, attribute list, variable list, modifying methods, attributes, adding methods, attributes and so on. This paper summarizes several related points. catalog: (1) Use class_ replaceMethod/class_ Addmethod function dynamically replaces or adds […]

  • Deep learning practice – using celeba_ Weight test NUAA for spoof training

    Time:2022-3-15

    1. Directly use the saved network to test NUAA Test code: def read_test_file(): base_path = r’E:\ml\fas\data\NUAA’ val_file_path = os.path.join(base_path, “test.txt”) train_image_path_list = [] train_labels_list = [] with open(val_file_path) as f: lines = f.readlines() for line in lines: image_path = line.split(‘,’)[0] label = line.split(‘,’)[1] img = cv2.imread(image_path) resize_img = cv2.resize(img, (100, 100)) train_image_path_list.append(resize_img) train_labels_list.append(int(label)) return np.asarray(train_image_path_list), […]

  • OUTOFMEMORY is implemented through code

    Time:2022-3-14

    Implemented by codeOutOfMemory Intro To try to write an occurrenceOutOfMemoryExceptionLet’s open the third part of the code——OutofMemory OutOfMemory OutOfMemoryAs the name suggests, there is insufficient memory Net will be thrown when the memory is insufficientOutOfMemoryExceptionException of. Want to triggerOutOfMemoryExceptionTo meet the condition of insufficient memory, in Net framework can only allocate memory until there is […]

  • Step by step analysis of handwritten promise

    Time:2022-3-10

    Promise is a constructor for asynchronous requests introduced by ES6 to help solve the problem of callback hell. The following content will customize the implementation of promise, which only includes basic use, so some boundary conditions are not taken into account.If you are not familiar with promise usage, you can moveUnderstanding and use of promise […]

  • Mybatis Mapper. XML inheritance mechanism

    Time:2022-2-24

    Mapper. XML inheritance mechanism GitHub address Mybatis actually hides a feature: mapper XML can inherit. This is not mentioned in the official document, but it is mentioned in the issue (COMMIT). Statement override Using mapper With the inheritance mechanism of XML, we can make childmapper cover parentmapperselect、insert、delete、update。 The following is an example: Interface: @MybatisMapper public […]

  • Modelsim simulation novice introduction to the most detailed tutorial

    Time:2022-2-4

    November 15, 2021 00 installation package / version I got off the Internet in advance (but this also caused “trouble” for my experiment). I used Modelsim se-64 2020.4 version, which seems different in the school laboratory. But it didn’t have much impact in the end. 01 configure environment steps The school has a document. Just […]