Author Archives: Robins

Split keyword in ABAP when the separator is at the beginning and end of the string

We use the SPLIT keyword to SPLIT a string by a delimiter. If the delimiter is in the middle of the string (that is, if the first and last characters are not delimiters), we can easily see the result. But what if the delimiter is exactly the first or last of the string?
In the debug window, you can see all the row items in the inner table LT_SPLIT_TABLE after line 6 is executed, as shown in the following code.

DATA: lv_str         TYPE string,
      lt_split_table TYPE TABLE OF string.

lv_str = '/This/is/a/test./'.

SPLIT lv_str AT '/' INTO TABLE lt_split_table.


From the above test results, when the separator is at the beginning of the string, the left side of the separator will split an empty string; When a delimiter is at the end of a string, the empty string is not split to the right of the delimiter.

          DATA: lv_str   TYPE string,
                lt_split_table TYPE TABLE OF string,
                ls_split_table TYPE string.

          SPLIT lv_json AT '[' INTO str1 str2.
          SPLIT str2 AT ']' INTO TABLE lt_split_table.

          LOOP AT lt_split_table INTO ls_split_table.
            IF sy-tabix <> sy-tfill.       "The last line is not involved in splicing
              CONCATENATE str3 ls_split_table  INTO str3 .
            ENDIF.
          ENDLOOP.

          CONCATENATE '[' str3 ']' INTO o_return5 .

This splits str2 according to ‘] ‘, then removes the last one and splits it together.
This is one way to SPLIT a SPLIT from the right.

Definition of bracket type in typescript

The following figure defines a type Data that can contain a single field pointing to arbitrary Data:

https://stackoverflow.com/questions/58090665/typescript-what-is-the-type-of-the-object-name-string-string

    class aa{
      constructor(headers?: string | { [name: string]: string | string[]; }){
        
      }
    }


Meaning:
The headers type can be one of two types:

    string An object with a field pointing to a string or an array of strings. The name of the field doesn’t matter, there’s no restriction, as long as the field is a string.

More of Jerry’s original articles can be found at :

Docker run xxx,E Time Elapsed: 0:00:00.000180

Problem description:

Environment: Windows 10, debug the local project, upload it to Docker for execution, and keep reporting errors (error message below). When Docker builds, there are abnormal prompts (below) : at first I thought it was a permission problem, but later I searched it and found it was not this problem.

SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to
build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.


address:

“Pandas” is not required to be written in the required. Txt file for “Pandas”.

1. Check that the project's dependencies are all written to the requirements.txt file and installed successfully!
2. Check your Python virtual environment to make sure it works!
3. Double check the project runtime environment!

display:inline-block Solution to the gap problem

We often use display:inline-block in web layouts; The advantage is that you can arrange block elements as inline elements and set the width and height. Personal feeling is very easy to use, but with more slowly came the problem?
1.display:inline-block; Not compatible in IE6/7
Display :inline-block; *dsiplay:inline; *zoom:1;
2.display:inline-block; There will be an unknown gap (4px)
Reason: A newline or space can take up space and create a gap,
Solutions:
1. Remove whitespace or newline from the current element in the HTML code. This method is too cumbersome and affects the readability of the HTML code.
Font-size :0; font-size:0; font-size:0; This is essentially the same as the 1 method, but may not be supported in Chorme
3. Set letter-spaceing:-4px in the parent element of the current element; The effect is to control the horizontal distance between the text, allowing the text to overlap horizontally (line-height is the text to overlap vertically), thus cancelling out space space or newlines.
Conclusions are as follows:
» the inline – after the block, block level elements IE6/7 no newline gap problem, other browsers have;
» after the inline – block, the level of the inline elements, all major browsers have a newline/space gap problem;
> font-size:0; font-size:0; font-size:0; font-size:0; font-size:0; font-size:0;
» spacing is removed from all browsers by the let-spacing negative value. However, Opera’s spacing limit is 1 pixel. 0 pixels will bounce back and the spacing will be restored.
Recommended solutions:
Font-size :0; letter-spaceing:-4px;
 
 
Floating Layout – List Layout Based on Display: Inline-Block

Reproduced in: https://www.cnblogs.com/jesse131/p/4872721.html

Solve the problem that TeamViewer software prompts that the trial period has expired and cannot be operated remotely

1. Exit TeamViewer remote software and uninstall the software.
2, Press [Win] + [R] on the keyboard to open [Run], type % AppData %
, In the window that pops up, find and delete the TeamViewer folder.
4, Press [Win] + [R] key combination to open [Run], type regedit, open [Registry Editor]
, in [Registry Editor], expand [HKEY_LOCAL_MACHINE SOFTWARE\], find TeamViewer folder, right click delete. Skip this step if you don’t have a TeamViewer folder. Expand [HKEY_CURRENT_USER\ Software \], find the TeamViewer folder, right-click and delete. Skip this step if you don’t have a TeamViewer folder.
6. Return to the desktop, right-click the “Computer” icon, and select “Administration”.
7. In the Computer Management window, click on Device Manager. Click to open the Network Adapter. Find the wired network card, right mouse button select [properties].
8, choose the “network address”, will be “no” changed to “value”, and then an arbitrary input 12 digits, click [sure] to save.
9, Restart your computer and reinstall the TeamViewer software. Select the Personal/Non-Business option.
10, according to the steps to complete the installation of TeamViewer, can solve the TeamViewer software prompts a probation period was due to the problem of remote operations
The original https://blog.csdn.net/qq_32157851/article/details/79895830
 

How to modify TeamViewer ID

TeamViewer will be deemed commercial and not available if used frequently. The account of this software is bound to the MAC address of the device.
You can start again after you change the TeamViewer ID. The following method can successfully modify the TeamViewer ID.
Close the TeamViewer;
Start & gt; Run, type % AppData %, delete TeamViewer folder;
Start & gt; Run, type regedit;
Remove TeamViewer under HKEY_LOCAL_MACHINE\SOFTWARE\;
Delete TeamViewer under HKEY_CURRENT_USER\SOFTWARE\;
Start & gt; Control Panel> System & gt; Hardware & gt; Device Manager>; Network adapter>; Wired/wireless network card;
Right-click>; Property & gt; Senior & gt; The Network Address.
Optionally enter a 12 digit number in the numeric field. Restart your computer and you will notice that your TeamViewer ID has changed. Success!

Selenium: 8 Ways to Locate Elements

By positioning
Using Selenium’s BY positioning, you first need to import the module

from selenium.webdriver.common.by import By

id attribute locates find_element(By.ID, "id")
name attribute locate find_element(By.NAME, "name")
classname attribute locate find_element(By.CLASS_NAME, "claname")
a tag text attribute locationfind_element(By.LINK_TEXT, "text")
a tag partial text attribute locationfind_element(By.PARTIAL_LINK_TEXT, "partailtext")
tag_name locate-find_elemnt(By.TAG_NAME, "input")
xpath path positioning-find_element(By.XPATH,"//div[@name='name']")
css selector positioningfind_element(By.CSS_SELECTOR, "#id")

Mount windows NTFS partition under Linux

Mounting the Windows NTFS partition under Linux

How it works: Use the mount command to mount the partition under Windows into a directory under Linux.

1.uname -r View the current Linux kernel version.

2. Go to
http://www.linux-ntfs.org/ Download the same NTFS patch as the kernel version.

3. Install patch: RPM – the ivh kernel – the module – NTFS – 2. 7.0.x.x – x – 2.1.20-0. Rr. 4.10 i686. RPM

4. Use fdisk-l to view the partition information of the hard disk.

5.
5.
5.
5.
5.
5.

: mkdir/MNT /c corresponds to the C disk

mkdir/MNT /d corresponds to D disk

mkdir/MNT /e corresponds to e disk

6.mount -t NTFS /dev/xxx/MNT /x
6.mount -t NTFS /dev/xxx/MNT /x
6.mount -t NTFS /dev/xxx/MNT /x

: mount /dev/hda1/MNT /c

the mount -t NTFS/dev/hda5/MNT/d

the mount -t NTFS/dev/hda6/MNT/e