A simple shell script is written in Linux Mint, using for.. do.. Done 1+2+3…… +100 value, the result of “SH-n XXx. sh” syntax detection is always wrong, but can run normally on PC;
Script:
#!/bin/bash
#information
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
read -p "Please input a num " num
sum=0
for ((a=0; a<=$num; a++))
do
sum=$(($sum + $a))
done
echo "the sum is ==> $sum"
exit 0
The errors are as follows:
Syntax error: Bad for loop variable
Analysis:
Since ubuntu 6.10, ubuntu has replaced the previous default bash shell with the dash shell; This appears as the /bin/sh link inverted /bin/dash instead of the traditional /bin/bash.
allen@allen-lql ~/workspace/script $ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Aug 12 14:29 /bin/sh -> dash
So when using SH to perform the detection, dash is actually used, and DASH does not support this C-format for loop writing.
Solutions:
1, change the default shell to bash. (Bash supports for loop in C format)
sudo dpkg-reconfigure dash
choose No
2. Use bash detection directly:
bash -n xxx.sh
3. To ensure the portability of shell scripts, directly change shell scripts and use the for loop format supported by the shell:
for a in `seq $num`
p>
div>
“Error 0162 – Setup data integrity check failure” after updating BIOS via Thinkvantage
Start the computer and press F1 to enter settings
In setup press F9 for default setting, press F10 for svae and exit.
Problem solved.
java.lang.VerifyError : inconsistent stackmap frames at branch target
exception information
ava.lang.VerifyError: Inconsistent stackmap frames at branch target 293
Exception Details:
Location:
com/foodsafety/controller/UserController.UpdateImg(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; @293: goto
Reason:
Type top (current frame, locals[7]) is not assignable to integer (stack map, locals[7])
Current Frame:
bci: @139
flags: { }
locals: { 'com/foodsafety/controller/UserController', 'javax/servlet/http/HttpServletRequest', 'com/foodsafety/commons/result/Result', 'java/lang/String', 'java/lang/Integer', 'java/lang/Integer', 'com/foodsafety/model/User' }
stack: { integer }
Stackmap Frame:
bci: @293
flags: { }
locals: { 'com/foodsafety/controller/UserController', 'javax/servlet/http/HttpServletRequest', 'com/foodsafety/commons/result/Result', 'java/lang/String', 'java/lang/Integer', 'java/lang/Integer', 'com/foodsafety/model/User', integer }
stack: { }
Bytecode:
0000000: bb00 1b59 b700 1d4d 2b12 64b9 0020 0200
0000010: c700 0701 a700 0e2b 1264 b900 2002 00b6
0000020: 0026 4e2b 1266 b900 2002 00c7 0007 01a7
0000030: 0014 2b12 66b9 0020 0200 b600 26b8 0068
0000040: b800 6e3a 042b 1272 b900 2002 00c7 0007
0000050: 01a7 0014 2b12 72b9 0020 0200 b600 26b8
0000060: 0068 b800 6e3a 05bb 0060 59b7 0074 3a06
0000070: 1906 2b12 66b9 0020 0200 b600 26b8 0075
0000080: b800 7bb6 007e 1905 b600 82aa 0000 009a
0000090: 0000 0001 0000 0004 0000 001d 0000 003d
00000a0: 0000 005d 0000 007d 1906 2db6 0086 2ab4
00000b0: 0030 1906 b900 8902 0036 0715 079e 0076
00000c0: 2c04 b600 38a7 006e 1906 2db6 008d 2ab4
00000d0: 0030 1906 b900 8902 0036 0715 079e 0056
00000e0: 2c04 b600 38a7 004e 1906 2db6 0090 2ab4
00000f0: 0030 1906 b900 8902 0036 0715 079e 0036
0000100: 2c04 b600 38a7 002e 1906 2db6 0093 2ab4
0000110: 0030 1906 b900 8902 0036 0715 079e 0016
0000120: 2c04 b600 38a7 000e 4e2c 03b6 0038 2cb8
0000130: 0042 b02c b800 42b0
Exception Handler Table:
bci [8, 293] => handler: 296
Stackmap Table:
append_frame(@23,Object[#27])
same_locals_1_stack_item_frame(@34,Object[#39])
append_frame(@50,Object[#39])
same_locals_1_stack_item_frame(@67,Object[#105])
append_frame(@84,Object[#105])
same_locals_1_stack_item_frame(@101,Object[#105])
append_frame(@168,Object[#105],Object[#96])
append_frame(@197,Integer)
chop_frame(@200,1)
append_frame(@229,Integer)
chop_frame(@232,1)
append_frame(@261,Integer)
chop_frame(@264,1)
append_frame(@293,Integer)
full_frame(@296,{Object[#1],Object[#33],Object[#27]},{Object[#84]})
same_frame(@307)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:612)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:666)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:632)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:680)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:551)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:492)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5253)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5543)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1978)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
solution: configure -xx: -usesplitverifier

in the JVM
specific parsing may refer to: http://blog.csdn.net/taiyangdao/article/details/53002570 p>
Error: XZ compression not available
In the test server for docker learning, some centos7 software installation and their own server is not compatible so lead to yun download software when the error: Error: xz compression not available
For the error solution.
rm -fr /var/cache/yum/x86_64/6/epel/
rm -rf /etc/yum.repos.d/epel*
Reinstall epel and base
wget -O/etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-7.repo
yum repolist
Error 3002: Problem in mapping fragments | c# linq to entities
error display:
Error 3002: Problem in mapping fragments run at line 1330:Potential runtime activity of table FTPRuns’s keys (FTPRuns.ID):
Error 3002: Problem in line 1330:Potential runtime activity of table FTPRuns’s keys (FTPRuns.ID): Columns (ftpruns. ID) are mapped to EntitySet FTPRuns’s properties (ftpruns. ID) on the conceptual side but they do not form the EntitySet’s key properties (ftpruns. ID, ftpruns. LastRun)
reason analysis:
Your entity model has the combination of the two properties FTPRuns.ID and FTPRuns.LastRun as entity key while your table has only the column FTPRuns.ID as primary key. So in your model you specify that the combination of FTPRuns.ID and FTPRuns.LastRun must be unique while your database has the stronger requirement that FTPRuns.ID alone must be unique.
Just exclude the property FTPRuns.LastRun from the entity key. Maybe this happened accidentally or the Entity Framework could not get primary key information from the database and had to infer the entity key. For example views have no primary key and the Entity Framework will infer the entity key as the combination of all non-nullable columns.
entity is the compound primary key of two attributes ftpruns. ID and ftpruns. LastRun, while the database table only has one ftpruns. ID as the primary key. All your entities must specify a composite primary key for two properties, whereas the database requires only ftPRUNs. ID to be unique.
excludes the ftpruns. LastRun attribute from the entity primary key, which may happen accidentally, or EF cannot get the primary key information from the database and must notify the entity primary key. For example, if you look at a table that has no primary key, EF will tell the entity to use all columns that are not empty as its primary key
AndroidStudio Android Unknown failure: Can’t find service: package
solution: AVD Manager -> Select your simulator -& GT; Right click – & gt; Cold Boot Now p>
Pandas read_ Error in json() valueerror: training data
has a json file as follows:
{
"cover": "http://p2.music.126.net/wsPS7l8JZ3EAOvlaJPWW-w==/109951163393967421.jpg?param=140y140",
"title": "2018上半年最热新歌TOP50",
"author": "网易云音乐",
"times": "1264万",
"url": "https://music.163.com/playlist?id=2303649893",
"id": "2303649893"
}
{
"cover": "http://p2.music.126.net/wpahk9cQCDtdzJPE52EzJQ==/109951163271025942.jpg?param=140y140",
"title": "你的青春里有没有属于你的一首歌?",
"author": "mayuko然",
"times": "4576万",
"url": "https://music.163.com/playlist?id=2201879658",
"id": "2201879658"
}
when I try to read the file with pd.read_json('data.json'), I get an error. The error part is as follows:
File "D:\python\lib\site-packages\pandas\io\json\json.py", line 853, in _parse_no_numpy
loads(json, precise_float=self.precise_float), dtype=None)
ValueError: Trailing data
after a baidu found that it was a json format error, is the first time I know there is such a thing as jsonviewer. You need to save the dictionary in the file as an element in the list, modified as follows.
[{
"cover": "http://p2.music.126.net/wsPS7l8JZ3EAOvlaJPWW-w==/109951163393967421.jpg?param=140y140",
"title": "2018上半年最热新歌TOP50",
"author": "网易云音乐",
"times": "1264万",
"url": "https://music.163.com/playlist?id=2303649893",
"id": "2303649893"
},
{
"cover": "http://p2.music.126.net/wpahk9cQCDtdzJPE52EzJQ==/109951163271025942.jpg?param=140y140",
"title": "你的青春里有没有属于你的一首歌?",
"author": "mayuko然",
"times": "4576万",
"url": "https://music.163.com/playlist?id=2201879658",
"id": "2201879658"
}]
another method is to file each behavior of a complete dictionary, and then modify the parameters in the function pd. Read_json ('data.json',lines=True). lines default to False, set to True can read json objects according to the row. In the psor.read_json document, it is explained as follows:
lines: Boolean, default False. Read the file as a json object perline.new in version 0.19.0.
the modified json file is as follows:
{"cover": "http://p2.music.126.net/wsPS7l8JZ3EAOvlaJPWW-w==/109951163393967421.jpg?param=140y140","title": "2018上半年最热新歌TOP50","author": "网易云音乐","times": "1264万","url": "https://music.163.com/playlist?id=2303649893","id": "2303649893"}
{"cover": "http://p2.music.126.net/wpahk9cQCDtdzJPE52EzJQ==/109951163271025942.jpg?param=140y140","title": "你的青春里有没有属于你的一首歌?","author": "mayuko然","times": "4576万","url": "https://music.163.com/playlist?id=2201879658","id": "2201879658"}
div>
Module not found: Error: Can’t resolve ‘./$$_gendir/app/app.module.ngfactory’
introduction h4>
error in packaging to generate dist file when creating angular project:
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'D:\web\task\src'
@ ./src/main.ts 3:0-74
@ multi ./src/main.ts
solution:
replace ng build — prod with ng build — env=prod, and then compile successfully.
reason: this is not based on aot, ng build – env = prod: replace environment.prod.ts with environment.prod.ts, but it’s a simple ng build. Ng build — prod: replace the improved version with aot + environment.prod.ts (previously, it was ng build — prod — aot)
An error occurred trying to connect: get http: / / var / run/ docker.sock/v1 .21/containers/json?all
start the container error An error occurred trying to connect: Get http:///var/run/docker.sock/v1.21/containers/json?all
Internet search data three steps to solve:
- Stop docker daemon li>
- sudo rm/var/lib/docker/network/files/local – kv. Db li>
- Start docker daemon li> ol> but failed to solve my problem.
shows UUID when viewing dockre status:
qian:/var/lib/docker/devicemapper/devicemapper # systemctl status docker -l docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled) Active: failed (Result: exit-code) since Fri 2017-03-31 10:15:21 EDT; 45s ago Docs: http://docs.docker.com Process: 34204 ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE) Main PID: 34204 (code=exited, status=1/FAILURE) Mar 31 10:15:21 qian docker[34204]: time="2017-03-31T10:15:21.084102345-04:00" level=warning msg="devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section." Mar 31 10:15:21 qian docker[34204]: time="2017-03-31T10:15:21.098182020-04:00" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: devmapper: Base Device UUID and Filesystem verification failed.devmapper: Current Base Device UUID: does not match with stored UUID:ecfee58a-4aef-41e5-888b-e1588b90f325. Possibly using a different thin pool than last invocation" Mar 31 10:15:21 qian docker[34204]: time="2017-03-31T10:15:21.098304502-04:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and Filesystem verification failed.devmapper: Current Base Device UUID: does not match with stored UUID:ecfee58a-4aef-41e5-888b-e1588b90f325. Possibly using a different thin pool than last invocation"looking at the disk UUID found that there are fewer disks dm-0 or * than the normal container
qian:/var/lib/docker/devicemapper/devicemapper # ls -al /dev/disk/by-uuid/ total 0 drwxr-xr-x 2 root root 100 Mar 30 19:13 . drwxr-xr-x 5 root root 100 Mar 14 09:56 .. lrwxrwxrwx 1 root root 10 Mar 14 09:56 ddaefbae-cc5e-4579-b2dc-24340323ccde -> ../../sda2 lrwxrwxrwx 1 root root 10 Mar 14 09:56 eabdb089-f65f-4150-ac14-7e2deaca1d85 -> ../../sda1 lrwxrwxrwx 1 root root 10 Mar 14 09:56 ecfee58a-4aef-41e5-888b-e1588b90f325 -> ../../sda3check the container device PID, found and normal is not the same, normal is UUID, my display as PTUUID
qian:/var/lib/docker/devicemapper/devicemapper # blkid /dev/mapper/docker-8\:3-126130724-pool /dev/mapper/docker-8:3-126130724-pool: PTUUID="d541fadc" PTTYPE="dos"at this point there is no way to continue to search for the cause, and I can confirm that the disk UUID associated with the container was indeed not found on my node.
view the docker uuid associated in/var/lib/docker/devicemapper/metadata/deviceset – metadata file.
my final solution is to delete the docker related folder /etc/docker /var/lib/docker reinstall docker…
Virtual environment: error: virtualenv is not compatible with this system or executable
I install the python virtual environment
with the following command
pip install --user virtualenv
#不行的话用下一句命令安装virtualenv
#sudo apt-get install python-virtualenv
python virtual environment installation successful, I created a Virtualenv directory in my home directory. I’m going to put all the virtual environments in this directory. Then, go to this directory and I’ll use the following command to create a virtual environment (I’ll call this virtual environment flask-env)
virtualenv helloworld
, however, it reports the following error message 
solution:
open. Bashrc
with the following command
sudo gedit ~/.bashrc
add the following information
on the last line of the open file
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/helloworld/anaconda3/lib
note: cannot have Spaces, on either side of the equal sign “=”/home/helloworld/anaconda3/lib this part is the python lib address, to write this part according to your specific situation.
and then rerun
virtualenv helloworld
virtual environment is created successfully, and the activation command is as follows:
vivian@vivian-Super-Server:~/HelloWorld$ virtualenv helloworldUsing base prefix '/home/vivian/anaconda3'
New python executable in /home/vivian/HelloWorld/helloworld/bin/python
Installing setuptools, pip, wheel...done.
vivian@vivian-Super-Server:~/HelloWorld$ source helloworld/bin/activate
close virtual environment
deactivate
note: the path of the virtual environment cannot have Chinese, otherwise this problem will also occur
Uncaught Error: Highcharts error #16
project used Highcharts to make charts, but accidentally found that the console reported an error as follows.

Analysis of
- li> ul>
here I use frame error has provided the official of the highcharts address: https://www.highcharts.com/errors/16, you can click in to have a look. The contents are in English.
the following address is highcharts official Chinese error description, said has been very clear.
click the open link
Highcharts error #16 is due to repeated definitions of Highcharts, this error occurs due to repetition in the namespace of Highcharts.
and Highcharts namespace actually exists in the Highcharts.js file which we refer to when using Highcharts.
so reason has two: span> span> span> p>
js related files 0. This means that the highcharts. js file is referenced. and will lead to the repetition of command space of Highcharts. The correct way is to introduce js related to Highcharts into public pages and avoid dynamic page loading.
- solution
- li> ul>
Highcharts.js was referenced on the home page, and Highcharts was repeatedly defined whenever the sub-page was loaded.
start full-text search with both Highstock. Js found no reference to the file (I know the project is not used for Highstock, but just to be sure). Since it is not this reason, I wonder if it is the second reason, but I do not understand the second reason, so it does not remind me anything.
later in the project to find the problem of the breakthrough. also discovers that the home page of the project consists of the left menu, the system-level prompt page at the top, and the content page on the right. When you click an item in the left menu, the right content page is populated with the corresponding HTML page .
and when I clicked on the menu, I found that the error repeatedly defined by highcharts almost every time I clicked it, and the first click after logging in (must be the click of the menu containing highcharts) would also report an error . Highcharts.js has been introduced into the main page of the menu.
sure enough, I found the corresponding HTML to confirm my inference. That’s it.
js
Highcharts.js js
Highcharts.
Conclusion
LNK2026 module unsafe for SAFESEH image
LNK2026 module unsafe for SAFESEH image
the solution is as follows: