Category Archives: How to Fix

The element “extra pin The solution of “in normal of part” warning

After compiling with Altium Designer, we only looked at the errors but not the warnings. Now we need to check carefully what the warnings are.
Prompt a warning message in the title when the compilation of the ongoing project schematic is complete. After a search on the Internet, I found that someone had summed up the problem.
The principle is that the MODE of all the components in the component library cannot match the introduced MODE in PCB. Then what is MODE?
It’s clear when you look at the pictures you bought,

Mode means different view modes.
Then quickly open the schematic library in question components. Double-click to open the properties dialog box and you see the following


And then you have here

You can also select different views, select different views will find that the number of components pins in the three views is different! The analysis is the problem. The reason for this problem may be that when creating a new component, it is usually copied from other components. Only the component under Normal view is modified, but the component under other MODE is not modified at the same time. Since the device doesn’t need a few views, just delete the other views, leaving only Normal, and you should be OK. (or change the other views to have the same pin as Normal). So how do you delete it?The following figure


After deleting the device according to the above instructions, update the device, compile the schematic project again, and find that the problem is no longer there!

Solution of off grid pin in Ad

AD software gives a warning of “OFF GRID PIN” in the process of use, which is not caused by the electrical connection problem of the schematic diagram, but the reason that the PIN pin of the component or device is not aligned with the grid. The solution is as follows:
(1) Open AD and click “Project” – “Engineering Parameters”
(2) “Error Reporting” – “Cheesecake Associated with Others” – “Off-grid object” – Right click – “Cheesecake closed”

— — — — — — — — — — — — — — — — — — — — —
the author: Tang Lingyuan
source: CSDN
,
https://blog.csdn.net/u014473675/article/details/80629913 copyright statement: this article original articles for bloggers, reproduced please attach link to blog!

Altium designer 18: activeroute failed to complete any routing

Problem description:

use AD18 in PCB with Active Route automatic wiring has been unable to successfully, before using this function is normal. ActiveRoute failed to complete any routing. The fault.


Cause of the problem:
There is something wrong with the Chinese compatibility system of AD18. If the file name is Chinese, the Active Route cannot be carried out


Solution:
Just change the name of the PCB file to pure English mode. It doesn’t matter if the path of the file name is Chinese


Reporter:

When creating the project, try to use the English file name to prevent the crash caused by Chinese problems (other problems caused by Chinese have not been found). I don’t know whether AD20 has fixed this BUG for testing

Altium designer 18: failed to export

Problem description:

use AD18 in PCB with export has been unable to export the 3 d step, prompt unable to export.


Cause of the problem:
It is due to 3D packaging model error, here is the terminal 3D error caused


Solution:
Simple solution to
select export PCB selected to export the selected 3 d models,

although can’t see all of the components but can you give export board shape and hole to thoroughly solve the
click on the 3 d assembly model to check 3 d properties, 3 d model will be deleted only keep screen printing


Remember a mybatis error org.apache.ibatis . session.defaults.DefaultSqlSession

Today, MyBatis was used to insert a hop record into the database, and the error was reported as follows:
SqlSession [org. Apache. Ibatis. Session. Defaults. DefaultSqlSession @ 74794994] was not registered for synchronization because synchronization is not active
The error is due to the fact that one of my fields is NULL, but the database design, this field cannot be NULL, so the error is to change the input field not NULL, to solve the error.
Welcome to pay attention to my public number, learn together, exchange.

 

[solved] closingontransa ctionalSqlSessionorg.apache.ibatis . session.defaults.DefaultSqlSession @20] No information after that.

Today in learning to follow the teacher learning Mybatis – plus technology found god in the use of the test class testing to add and delete operation, display Closing non transactional SqlSession [org. Apache. Ibatis. Session. Defaults. DefaultSqlSession @ 656922 a0] after no information feedback, no results after searching for some information.

The solution
Eventually find the main class does not start: @ MapperScan (com. Kuang. "mapper")
pay attention to the point, we need to start class up to scan our mapper package of all interface

to add @ MapperScan (" com. Kuang. Mapper ") scans we mapper under UserMapper interface inheritance parent class BaseMapper< User> . In order to identify all methods in the parent class.

import org.mybatis.spring.annotation.MapperScan;
@MapperScan("com.kuang.mapper")

Then test the class again and find that the data is present and the information is fed back.

Build your own resnet18 network and load torch vision’s own weight

import torch
import torchvision
import cv2 as cv
from utils.utils import letter_box
from model.backbone import ResNet18


model1 = ResNet18(1)
model2 = torchvision.models.resnet18(progress=False)
fc = model2.fc
model2.fc = torch.nn.Linear(512, 1)
# print(model)
model_dict1 = model1.state_dict()
model_dict2 = torch.load('resnet18.pth')
model_list1 = list(model_dict1.keys())
model_list2 = list(model_dict2.keys())
len1 = len(model_list1)
len2 = len(model_list2)
minlen = min(len1, len2)
for n in range(minlen):
    if model_dict1[model_list1[n]].shape != model_dict2[model_list2[n]].shape:
        continue
    model_dict1[model_list1[n]] = model_dict2[model_list2[n]]

model1.load_state_dict(model_dict1)
missing, unspected = model2.load_state_dict(model_dict2)
image = cv.imread('zhn1.jpg')
image = letter_box(image, 224)
image = image[:, :, ::-1].transpose(2, 0, 1)
print('Network loading complete.')
model1.eval()
model2.eval()
with torch.no_grad():
    image = torch.tensor(image/256, dtype=torch.float32).unsqueeze(0)
    predict1 = model1(image)
    predict2 = model2(image)
print('finished')
# torch.save(model.state_dict(), 'resnet18.pth')

Property ‘style’ does not exist on type ‘element‘

Property ‘style’ does not exist on type ‘element’ property does not exist on type ‘element’
Reason: This is caused by TypeScript type checking, which requires a type assertion in front of the querySelector method.

let frameContainObj = document.getElementById("model_view_container")
let iframeObj= <HTMLElement>frameContainObj.querySelector("#modelView");
iframeObj.style.height = document.documentElement.clientHeight* 0.65 + "px";

Extensions: When using QuerySelectorAll, the following scenario can be used:

let block = document.querySelectorAll(".block") as NodeListOf<HTMLElement>;

Tells the TypeScript compiler to pass this code by setting assertions

Visual studio code shortcut

The main command box
The most important function is the Command Panel opened by F1 or Ctrl+Shift+P. In this command box, you can execute any command of VSCode and even close the editor.
Pressing Backspace will take you to Ctrl+P mode
Type> under Ctrl+P; You can go back to Ctrl+Shift+P.
It’s fine under the Ctrl+P window
Type the file name directly and jump to the file
?List the currently executable actions! Errors or Warnings. Or Ctrl+Shift+M: skip to line number, or Ctrl+G to @: skip to Symbol (search for a variable or function), or Ctrl+Shift+O to @: skip to Symbol by category and find an attribute or function, or Ctrl+Shift+O to: enter # find Symbol by name, or Ctrl+T
Common Shortcuts
 
Editor and window management
Open multiple Windows at once (view multiple projects)
Open a new window: Ctrl+Shift+N Close the window: Ctrl+Shift+W
Open multiple editors at the same time (view multiple files)
Create a new file Ctrl+N Toggling Ctrl+Tab between files Cut out a new editor (up to 3) Ctrl+\, or you can hold down the Ctrl mouse and click on the file name in the Explorer Ctrl+1 Ctrl+2 Ctrl+33 editor cycle Ctrl+ ‘editor to change position, Ctrl+ K and then press Left or Right
The code editor
formatting
Lines of code indented Ctrl+[Ctrl+]
Ctrl+C Ctrl+V If unchecked, copy or cut a whole line by default
Copy one line Up or Down: Shift+Alt+Up or Shift+Alt+Down Enter one line below the current line, Ctrl+Shift+Enter
The cursor associated
Move to Start of Line: Home Move to End of Line: End Move to Start of File: Ctrl+End Move to Start of File: Ctrl+Home Move to Definition: F12 Definition Thumnail: Just Look at It and Don’t Skip Forward Alt+F12 Move to End of Bracket Ctrl+Shift+] Select From Ctrl to End of Line Shift+Home Remove all words on the right side of the cursor Ctrl+DeleteShrink/ Expand Selection: Shift+Alt+Left and Shift+Alt+ Rightmulti-cursor: Alt+Click to add Cursor or Ctrl+Alt+Down or Ctrl+Alt+Up to select all matching Ctrl+Shift+L at the same time
Ctrl+D The next match is also selected (I’ve customized it to delete the current line, see Ctrl+Shift+K below).
Back up the previous cursor operation Ctrl+U
Refactor the code
Rename: For example, if you want to change a method name, select it and press F2. Enter the new name. You will see that all the files have been changed. Right-click “Set File to Compare” in the Explorer and select “Compare with ‘file_name_you_chose’ on the file you want to compare.”
To find the replacement
Find Ctrl+F Find Ctrl+H Find Ctrl+Shift+F
:
* To match one or more characters in a path segment?To match on one character in a path segment** to match any number of path segments,including none{} to group conditions (e.g. {**/*.html,**/*.txt} matches all HTML and TXT files)[] to declare a Range of characters to match (e.g., example.[0-9] to match on…
According to the relevant
Full-screen: F11Zoomin/Zoomout: Ctrl+ =/Ctrl + – Sidebar Show/Hidden: Ctrl+B Sidebar Show:
Show Explorer Ctrl+Shift+ ESHOW SearchCtrl+Shift+ FSHOW GitCtrl+Shift+ GSHOW DebugCtrl+Shift+ DSHOW OutputCtrl+Shift+U
other
Auto-save: File ->; AutoSave, or Ctrl+Shift+P, type Auto

Modify the custom keyboard shortcut of visual studio code

Many IDEs, such as Eclipse and Visual Studio Code’s Auto Completion Intellisense shortcut key, use Ctrl + Space, which conflicts with Chinese developers’ cases of switching Chinese and English input methods, which is very annoying.
How to toggle IntelliSense shortcut key definitions in Visual Studio Code:
File-> Preferences-> Settings Enter the Settings menu:

Go to the Trigger Suggest’s original button Settings: Ctrl + Space

I changed it to a different combination: Ctrl + L

Now press Ctrl + L to trigger the autocomplete function, which will no longer interfere with the Chinese/English input method.

For more Jerry’s original articles, please follow the official account Wang Zixi :