Tag Archives: ui

[Solved] unity EditorGUILayer dynamic drawing scrolling list error

The specific error message: ArgumentException: Getting control 0’s position in a group with only 0 controls when doing Repaint A

OnGUI will be called two times each time it draws, the first time to calculate the position of all controls, all EdtorGUILayout control method returns the Rect is 0; the second time to draw all the content based on the position, the control method returns the Rect is the actual coordinates.

BeginScrollView to generate a scrolling list, because I need to display a lot of content, so I made an optimization: pre-calculate the position of each line, when the line is in viewport display content, otherwise display blank.

Generic logging found that the height of each row generated by the system is not the same, generally floating randomly between 19-21, so it is impossible to calculate the position of each row, so instead, when the second call to OnGUI, use the Rect returned by the control method to calculate in real time.

 

[Solved] Pyinstaller Package and Run Error: RuntimeError: Unable to open/read ui device

Just made a Python program to calculate body mass index BMI, and used Pyside6 to draw the user interface. When using auto-py-exe ( auto-py-to-exe is based on pyinstaller, compared to pyinstaller, it has more GUI interface, which makes it easier to use. for simplicity). After packaging, click main.exe, but it prompts an error: RuntimeError: Unable to open/read ui device. Repeated debugging does not know where the problem is.

At first, I thought there was a problem with the loading UI statement in the main program (main.py). I repeatedly modified the main program, and finally found that it was not the problem of the program.

class Stats():
    def __init__(self):
	    # loading UI file
        self.ui = QUiLoader().load(".\\cac_BMI.ui") 

Finally, I found that I needed to put the UI file into the packaged executable folder.

Put the UI file and the main program in the same folder, which is convenient for the main program to call.

Then double-click main.exe, has been able to successfully open the program user interface, and the problem has been successfully solved.

npm ERR code ELIFECYCLE [How to Solve]

npm ERR! Code elifecycle solution

1. Problems

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: webpack --config config/webpack. config. js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.

The reason for this is the webpack.config.js configuration error, which is actually a path configuration error. Some path configurations in webpack.config.js are configured according to the package.json file location, and some are configured according to the current file location, and people tend to get confused when configuring them.

2. Solutions
2.1 Solution 1
Fill in the correct path, this problem is often caused by the path configuration error. Refer to the following template, I will decipher the path configuration.

entry:’. /src/js/index.js’ // this path is based on the package.json file as the base file path (not the webpack.config.js file)

template in plugins: ‘src/index.html’ //this is also based on the package.json file as the base file path

and path:path.resolve(__dirname,’…/dist’) // is based on the webpack.config.js file path

const path=require(‘path’); // call the path in node.js
const HtmlWebpackPlugin = require(‘html-webpack-plugin’);
module.exports={undefined
entry:’. /src/js/index.js’, // the file to be packaged (this path is written according to the package.json location)
output:{undefined
filename:’bundle.js’, //the name of the package file
path:path.resolve(__dirname,’…/dist’) //specify the generated file directory (written by the current file location)
},
module: {undefined
rules: [
{undefined
test: /.css$/,
use: [ ‘style-loader’, ‘css-loader’ ]
}
]
},
plugins: [
new HtmlWebpackPlugin({undefined
template: ‘src/index.html’ //configure html template (by package.json location)
})
]
}

2.2 Solution 2
Direct reinstallation, but personally do not recommend, indeed some files reinstallation is possible to solve the problem, but sometimes reinstallation is very slow, which is annoying. Reinstallation steps are as follows.

(Do not delete package.json, delete package-lock.json)

npm cache clean --force
rm -rf node_modules
rm -rf package-lock.json
npm install

[Solved] The “QtRunWork“ task returned false but did not log an error

Recently in business development need to update the UI in the QThread, if the UI handle through the direct update will make the program reported an error, because the update of the UI in the thread will not be captured by the original thread of the EXEC event, will lead to message event blockage generated ERROR, so the use of the signal and slot mechanism, and then I declared a signals signal in the QThread, the compilation reported this error.

The "QtRunWork" task returned false but did not log an error

No detailed warning was given, and I later checked the relevant QT instructions to solve the problem.

Solution: Add a line of macro definition to the class where you use signals and slots.

Q_OBJECT

This will work, the signal and slotted based on Q_OBJECT, we need to declare it module to our class so that the QT compiler can instantiate it, otherwise it will be exception ERROR.

[Solved] Springboot Error: swagger-UI/index.html Access Error 404

Springboot solves swagger UI/index HTML Access Error 404

Recently, I was working on a project to adopt swagger 3.0. After the project is started, access the swagger path: http://localhost:8880/vdmpess -web/swagger-ui/index. HTML reports 404 because webmvcconfig inherits webmvcconfigurationsupport. After inheriting this class, the relevant contents configured in the configuration file will become invalid and the static resource needs to be re specified
the swagger static resource needs to be re specified.

Swagger address in project

Solution:

Adds the address of the specified static resource

@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.
                addResourceHandler("/swagger-ui/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
                .resourceChain(false);
    }
}

ERROR command failed: npm install –loglevel error vue-cli-plugin-cube-ui -D

Execute the command at the vscode terminal: Vue add cube UI reports an error   Command failed: NPM install — loglevel error Vue cli plugin cube UI – d the solution is as follows:

Exit vscode – & gt; Right click the visual studio code icon – & gt; Click Properties – & gt; Click compatibility – & gt; Check the “run this program as administrator” option – & gt; Click OK

 

error CS0234: The type or namespace name ‘UI‘ does not exist in the namespace ‘UnityEngine‘

1. After opening the project, an error is reported: error cs0234: the type or namespace name ‘UI’ doors not exist in the namespace ‘unityengine’

2. Solution: close untiy, delete the Library folder, and then reopen the project

[1] Close the project and delete the folder library. The location is as follows:

[2] . reopen the project and unity will automatically rebuild the relevant DLL

Error: one input ui-file must be specified [How to Solve]

QT designer installed   After success, install PIP anyway   install PyQt5   And pip   Install pyqt5 designer is useless

So consider whether the installation path of QT designer is wrong. Therefore, searching designer.exe in the folder unexpectedly found 2 files.

The first path has been used before, but the UI file cannot be converted to py file. The link below was replaced.

OK after running the test

Hope to help you!

Ise14.7 uses its own XST synthesis Error: error: ngdbuild: 604

“ERROR:NgdBuild:604 – logical block ‘TEMPERAURE_CTRL/AD7893 ’ with type ‘ad7893’ could not be resolved. A pin name misspelling can cause this, a missing edif or ngc file, case mismatch between the block name and the edif or ngc file name, or the misspelling of a type name. Symbol ’ is not supported in target ‘virtex5’.”

Solution:
1. Connect all the ports of the top-level module
2. Connect all the inputs and outputs of the sub-module, and assign values to the outputs

Solution of toast not displaying in Android

Today, in the test, toast could not be displayed. I analyzed several possibilities

1. There is a problem with the context. The corresponding context may be incorrect

2. The value of message is null

But I checked it several times and there was no problem…. Looking up information on the Internet, I said that I couldn’t update UI in sub thread, but I didn’t open thread… After a night of silence. I found the problem. After using toast, I didn’t call the show method… That’s why I don’t show it. It’s too sloppy…

VS2010 library function problem: objidl. H (11266): error c2061: syntax error: identifier ‘__ RPC__ out_ xcount_ part’

This error was caused by the lack of lib files or include, but the UI in VS2010 was set up so badly that people didn’t know how to edit the original VC++ directory files. The solution is as follows:
Open the VS2010 project
Notice that in the lower left corner are Solution Explorer, Class View, Property Manager, and many other options.
is revised for Directories like the one we introduced in VS2010.

display Property Manager
contains the Debug|Win32 and Release|Win32 options
. You can set the project properties of Debug and Release
. Open any of them
. Double click microsoft.cpp.win32.
is modified here for the tutorial vc Directories. H (11266) : error C2061: syntax error: identifier ‘___, rpc___, out_xcount_part’
use the above method to delete the DirectX SDK Include from the Include path. Supplements: the

Directories that were modified for VC++ Directories in the project property dialog are project specific. The above modified VC++ Directories are large, affecting all project Directories and configuration Directories (Debug/Release/…) .

Failed to load viewstate.The control tree into which viewstate is being loaded must match the contro…

A server error occurred in the application.

Loading viewstate failed. The tree of controls to which the viewstate is loaded must match the tree of controls used to save the viewstate during the previous request. For example, when dynamically adding controls, the controls added during the retransmission must match the type and location of the controls added during the initial request.
Description:An unhandled exception occurred while executing the current web request. Please review the stack trace for more information about the error and its origin in the code.

Exception Details:</ font> Contains. Failed to load viewstate. The tree of controls to which the viewstate was loaded must match the tree of controls used to save the viewstate during the previous request. For example, when dynamically adding controls, the controls added during the retransmission must match the type and location of the controls added during the initial request.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information about the origin and location of the exception can be identified using the following exception stack trace.

[HttpException (0x80004005): Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.]
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +306
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
   System.Web.UI.Control.LoadChildViewStateByID(ArrayList childState) +121
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +235
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
   System.Web.UI.Page.LoadAllState() +312
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1661

Solution:It may be caching. Clear your browser cache and do a full refresh of your browser and publish if it continues.