Tag Archives: Experience sharing

error RC2247 : SYMBOL name too long [How to Solve]

An error was reported in compiling usbview today…

error RC2247 : SYMBOL name too long

Therefore, you only need to add it in front of the original usbview.rc


#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#include "prsht.h"
#include "wtypes.h"
#undef APSTUDIO_HIDDEN_SYMBOLS

Then it’s OK
later, use the resource editor provided by vs to change the location and update the resource content again

In this case, the modified full usview.rc content is provided:

#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#include "prsht.h"
#include "wtypes.h"
#undef APSTUDIO_HIDDEN_SYMBOLS


#include <windows.h>
#include <commctrl.h>
#include "resource.h"



//#if WINNT
//#include <ntverp.h>
//#else
//#include <version.h>
//#endif


//
//
// VERSION
//
#define VER_FILEDESCRIPTION_STR     "Microsoft\256 Windows(TM) USB Device Viewer"
#define VER_INTERNALNAME_STR        "USBVIEW"
#define VER_ORIGINALFILENAME_STR    "USBVIEW.EXE"
#define VER_LEGALCOPYRIGHT_STR      "Copyright \251 Microsoft Corporation 1996-2008.  All Rights Reserved."

#define VER_FILETYPE     VFT_APP
#define VER_FILESUBTYPE  VFT2_UNKNOWN

//#include <common.ver>


//
//
// ICON
//
IDI_ICON                ICON    DISCARDABLE     "USB.ICO"
IDI_BADICON				ICON	DISCARDABLE		"BANG.ICO"
IDI_COMPUTER			ICON	DISCARDABLE		"MONITOR.ICO"
IDI_HUB					ICON	DISCARDABLE		"HUB.ICO"
IDI_NODEVICE			ICON	DISCARDABLE		"PORT.ICO"

//
//
// Cursor
//
IDC_SPLIT               CURSOR  DISCARDABLE     "SPLIT.CUR"

/
//
// Dialog
//

IDD_MAINDIALOG DIALOGEX 0, 0, 640, 350
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | 
    WS_THICKFRAME
CAPTION "USB View"
MENU IDR_MENU
FONT 8, "MS Shell Dlg"
BEGIN
    CONTROL         "Tree1",IDC_TREE,"SysTreeView32",TVS_HASBUTTONS | 
                    TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
                    0,0,400,341,WS_EX_CLIENTEDGE
    EDITTEXT        IDC_EDIT,400,0,240,341,ES_MULTILINE | ES_READONLY | 
                    WS_VSCROLL | WS_HSCROLL
    CONTROL         "Devices Connected: 0",IDC_STATUS,"msctls_statusbar32",
                    SBARS_SIZEGRIP,
                    0,342,640,8
END


IDD_ABOUT DIALOG DISCARDABLE  0, 0, 212, 82
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About USBView"
FONT 8, "MS Shell Dlg"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,80,62,50,14
    LTEXT           "USB Device Viewer",IDC_STATIC,54,15,64,8
    LTEXT           "Copyright (c) 1996-2008 Microsoft Corporation",
                    IDC_STATIC,54,30,145,8
#ifndef WINNT
    LTEXT           "Version",IDC_STATIC,55,45,24,8
    LTEXT           VER_PRODUCTVERSION_STR,IDC_STATIC,87,45,33,8
#endif
    ICON            IDI_ICON,IDC_STATIC,15,15,21,20
END


/
//
// Menu
//

IDR_MENU MENU DISCARDABLE 
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "&Refresh\tF5",                ID_REFRESH
        MENUITEM SEPARATOR
        MENUITEM "E&xit",                       ID_EXIT
    END
    POPUP "&Options"
    BEGIN
        MENUITEM "&Auto Refresh",               ID_AUTO_REFRESH
        MENUITEM "&Config Descriptors",         ID_CONFIG_DESCRIPTORS
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "&About",                      ID_ABOUT
    END
END

//
//
// Accelerator
//

IDACCEL ACCELERATORS DISCARDABLE 
BEGIN
    VK_F5,          ID_REFRESH,             VIRTKEY,NOINVERT
END

Content of resource.H:

/*++
Copyright (c) 1998 Microsoft Corporation, All Rights Reserved.
--*/

#define IDD_MAINDIALOG                  101
#define IDR_MENU                        102
#define IDD_ABOUT                       103
#define IDI_ICON                        104
#define IDC_SPLIT                       105
#define IDACCEL                         106

// added ScottT
#define IDI_BADICON                     107
#define IDI_COMPUTER                    108
#define IDI_HUB                         109
#define IDI_NODEVICE                    110

#define IDC_TREE                        1000
#define IDC_EDIT                        1001
#define IDC_STATUS                      1002
#define ID_EXIT                         40001
#define ID_REFRESH                      40002
#define ID_AUTO_REFRESH                 40003
#define ID_CONFIG_DESCRIPTORS           40004
#define ID_ABOUT                        40005
#define IDC_STATIC                      0xFFFFFFFF


#define VER_PRODUCTVERSION_STR			"ubzh.com"

/usr/lib/deepin-wine/wine: error while loading shared libraries: libwine.so.1

After deepin wine is installed, the following errors occur when installing other applications:

 / usr/lib/deepin-wine/wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory

There was a problem with the link and you need to re link:

ln -sf /usr/lib/i386-linux-gnu/deepin-wine/libwine.so.1.0 /usr/lib/i386-linux-gnu/deepin-wine/libwine.so.1

https://github.com/wszqkzqk/deepin-wine-ubuntu

error MSB8011: Failed to register output [How to Solve]

error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.

Cause of formation: in versions above win7, only administrator privileges can run regsvr32.exe program, that is, only administrator privileges can register controls or DLLs.

Solution:

1. When running vs, right-click to run with administrator privileges. Do not open vs directly.

2. Engineering – > Propertier–> Linker–> General–> Register Output–> NO。

Consumer service instance error: HTTP get http://xxx/actuator/health: 503 output: {“status”: “out_of_service”

Phenomenon

Some back-end services register with consumer and report an error HTTP get http://xxx/actuator/health: 503 output: {"status": "out_of_service", but other services can be registered normally. Find a way to print thin error messages on the Internet

Print detailed error information

Configure in the error reporting module: application.YML or bootstrap.YML as follows:

management:
  endpoint:
    health:
      show-details: always  
  endpoints:
    web:
      exposure:
        include: '*'    

Or add the following configuration in application.Properties :

management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*

Finally, after printing the detailed error information, I found that it was the ES cluster. I thought it was the problem of the consumer configuration that led to the wrong direction during troubleshooting.

Solution to prompt resource error when opening DAZ studio

        If you install DAZ studio through DAZ central and open it, you will be prompted with resource error

A valid PostgreSQL CMS connection could not be established. Several DAZ Studio features that require a valid PostgreSQL CMS connection,such as context aware content views and loading content installed using the Daz Connect service,will not be available.Check your network,anti-virus,and firewall settings for onflicts.

I solved it through the following methods. You can also try it

1. In dazcentral

Select uninstall to uninstall DAZ studio,

 

After the uninstall is successful, click Install to reinstall

  2. After reinstallation, click open to open DAZ studio, and click the icon on the left of the viewport

  After clicking the icon, a menu will pop up,

 

Then click the second item of the menu, content DB maintenance, and a small window will pop up, as shown in the following figure

  Then check the reset database item,

Then click accept to reset the database,

Close DAZ studio,

Reopen,

It will display the welcome window without login prompt before,

After logging in, click next in the lower right corner of the window

There will be no resource error prompt

[Cadence Allegro PCB Design] error: Possible pin type conflict GND/VCC Power Connected to Output

An error is reported in the schematic diagram of cadence when running DRC, and the error information is as follows.

[cadence-DRC]error: Possible pin type conflict GND/VCC  Power Connected to Output

Solution:

Step 1: run DRC to find and analyze the error source

Run DRC. After the above error is output, the green circle is error. Click it to display the error message. We can see the green error reporting circle page. Clicking on the pin attribute is connected to the pin attribute output (the output attribute will generate the VCC on the previous page, resulting in the device sharing a VCC network), but normally, the pin attribute is passive/power. Therefore, we manually change the properties of the device pin to normal.

Step 2: Change [edit part] to power attribute

Select the power component, right-click and select [edit part] to enter pin modification in schematic library mode (it is impossible to change pin attribute in this mode), and change output to power attribute (or passive)

Step 3: run DRC again to solve the problem~

Update ad schematic to PCB, failed to match

*Background: in the process of updating the schematic to PCB, there is often a mismatch between the components on the schematic and those on the PCB, so we should be very careful and check them one by one, otherwise there will be a lesson of blood and tears (the components in the PCB are lost).

1、 Update the schematic diagram to pcb
II. Perform device matching

There are automatic and manual. For the time being, demonstrate manual operation

for example: C35, find the first column and the second column, then select and click & gt

perform operations similar to C35 one by one

3、 Execute the change

in this figure, the remove operation is to delete the routing

in this figure, the remove operation is to delete the device

Do this carefully. You’d better take a picture, and then check whether any devices are lost one by one Is there any wiring missing!!!

Summary:
(1) this situation is generally caused by the person who changed the drawing before, just for a moment, directly changed the PCB without changing the schematic diagram or updating it
also, the PCB library path corresponding to the device is not specified.

(2) If a lot of network nodes are gone and the routing is gone as soon as the update is executed, it is the layout engineer’s method of drawing lines without nodes in pcbdoc!!!

[Solved] JS Error: Uncaught TypeError: Cannot set properties of null (setting ‘innerHTML‘)

Many students have encountered this problem when writing JS code:

Cannot set properties of null (setting ‘innerHTML’). This error means that the null property “innerHTML” cannot be read, which means that the place where you want to insert the written HTML code cannot be found.

Solution: put the script of the read part of the DOM behind the body. Or add window.onload in the script tag and execute this part of the code after the page is loaded.

Reason: when the browser loads the HTML document, it will parse the HTML document into a tree structure called DOM tree. The code is executed from top to bottom. When the innerHTML line of code is executed, it does not load into the following DOM structure, and an error will be reported that the HTML cannot be read.

Example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function showTime() {
            var today = new Date;
            var year = today.getFullYear();
            var month = checkNum(today.getMonth() + 1);
            var data = checkNum(today.getDate());
            var hour = today.getHours();
            var minute = checkNum(today.getMinutes());
            var second = checkNum(today.getSeconds());
            var day = today.getDay();
            var a = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
            var tip = 'PM'
            if (hour > 12) {
                hour -= 12;
                tip = 'AM'
            }
            var time = year + 'Year' + month + 'Month' + data + 'date' + ' ' + tip + ' ' + hour + ':' + minute + ':' +
                second + ' ' + a[day];
            document.getElementById('time').innerHTML = time;
        }

        function checkNum(num) {
            if (num < 10) {
                return '0' + num;
            }
            return num;
        }
        setInterval(showTime, 1000);
    </script>
</head>

<body>
    <div id="time"> </div> 
</body>
</html>

Solution: will setInterval(showTime, 1000); Put this line of code after the body:

<body>
    <div id="time"> </div>
</body>
<script>
    setInterval(showTime, 1000);
</script>
</html>

Or add window.onload to the original script tag

        window.onload = function () {
            setInterval(showTime, 1000);
        }
    </script>

This can be solved perfectly!

How to Solve Docker delete container image error: Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced)

I don’t know if you have encountered an error when
docker deletes the container image

docker RMI container image ID

Details of error reporting:

Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced) – image is referenced in multiple repositories

Solution:

First docker PS - a
see several containers with the same image ID. what the hell, There must be a mistake during the construction, and then stop the container using the container image (if it has stopped, please go to the next step)
docker stop the ID of the container using the container image and RM drop
docker RM the ID of the container using the container image and
docker RMI the container image ID

Discovery or error


Well, the ultimate solution (that’s the point of this article)

docker rmi -f This container image ID

It is the above command with the – f parameter that forcibly deletes all container images with the container image ID

[Solved] Git pull error: cannot pull with rebase: Your index contains uncommitted changes.

Git pull reports an error
error: cannot pull with rebase: your index contains uncommitted changes.
error: Please commit or stage them

 

Solution:

1. Execute
git stash first

2. Then execute
git pull – rebase

3. Finally, execute
git stash pop


Remember to git stash pop after git stash, otherwise the code will be lost

Git stash: # can be used to temporarily store work in progress
git stash Pop: # read the last saved content from git stack

Coppelia sim (vrep) turns on the solution of flash back

Coppelia sim (vrep) turns on the solution of flash back

I personally use coppeliasim 4.1.0. I want to use the software to do a simulation in Zoucheng preparation today. After double clicking to open the software, it will flash back automatically. I tried several models that worked normally before, all of which are like this. Went to the official forum. The general questions section of the official forum gives solutions. Find usrset.txt in the system folder under the vrep installation directory, and add a line “allowoldedurelease = 7501” at the last line (double quotation marks are not required). As shown in the figure below

Double click the model to run normally