• Eclipse在进入debug时，写好init-2440的初始化代码后。... You can't do that when your target is exec' 这个最后原因是JlinkGDBServer连接失败，要把2440切换到NORflash下使用 我切换在NANDFLASH下了
Eclipse在进入debug时，写好init-2440的初始化代码后。运行时最后提示： load
You can't do that when your target is exec' 这个最后原因是JlinkGDBServer连接失败，要把2440切换到NORflash下使用 我切换在NANDFLASH下了


展开全文
• 1. findbugs官方解释：Exception is caught when Exception is not thrownThis method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and ...
1. findbugs官方解释：

Exception is caught when Exception is not thrownThis method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.A better approach is to either explicitly catch the specific exceptions that are thrown, or to explicitly catch RuntimeException exception, rethrow it, and then catch all non-Runtime Exceptions, as shown below:  try {    ...  } catch (RuntimeException e) {    throw e;  } catch (Exception e) {    ... deal with all non-runtime exceptions ...  }

2. 一般人都会这样写代码：

  try{
//
}
catch(Exception ex){
//
}

3. 这样很省事，但是JAVA规范中并不推荐这样做，这样是属于“过泛地捕获异常”，因为try{}中可能出现的异常种类有很多，上面的做法不利于分别处理各种异常，建议根据业务需求，分别捕获需要特别处理的异常，例子如下：

  try{
//
}
catch(SQLException ex){
//
}
catch(IOException ex){
//
}
catch(Exception ex){
//
}

4. 捕获的异常一定要抛出，并打印日志。


展开全文
• 在stmcubeMX中进行配置的时候，如果使用了freertos系统，生成代码的时候会有如下提示： 其意思就是，当使用了FreeRtos的时候，强烈建议HAL库使用除了Systick以外的时钟源。也就是说当不使用FreeRtos的时候，HAL...
在stmcubeMX中进行配置的时候，如果使用了freertos系统，生成代码的时候会有如下提示：

其意思就是，当使用了FreeRtos的时候，强烈建议HAL库使用除了Systick以外的时钟源。也就是说当不使用FreeRtos的时候，HAL使用的是systick作为时钟源，现在使用了rtos，不建议hal库和rtos一起使用systick作为时钟源。
我们先看一下rtos和HAL库使用systick作为时钟源的代码：
在文件stm32f1xx_it.c中，滴答定时器中断内容如下图所示，可以看到HAL库和rtos公用一个systick作为时钟源

接着根据软件的建议，使用定时作为HAL库的时钟源：
这里我们使用TIM1作为HAL库的时钟源，点击生成代码时，上边的警告已经
展开全文
• 最近新写springboot，配置跨域配置文件后出现的问题。... nested exception is java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*" since
最近新写springboot，配置跨域配置文件后出现的问题。
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.

了解到在较新的springboot版本中，跨域配置需要将 .allowedOrigins 替换成 .allowedOriginPatterns
原配置：
@Override
.allowedOrigins("*")
.allowCredentials(true)
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH")
.maxAge(3600);
}

替换后：
@Override
.allowedOriginPatterns("*")
.allowCredentials(true)
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH")
.maxAge(3600);
}

展开全文
• When allowCredentials is true, allowedOrigins cannot contain the special value "*“since that cannot be set on the “Access-Control-Allow-Origin” response header. To allow credentials to a set of ...
• nested exception is java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*"since that cannot be set on the "Access-Control-Allow-Origin...
• java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header....
• When you say something is static,it means that data or method is not tied to any particular object instance of that class 。这一说法对吗
• 一、问题描述 当你对一个控件（例如ImageView）使用setOnTouchListener() 或者是对你的自定义控件... MyImageOnTouchListener#onTouch should call View#performClick when a click is detected less… (Ctrl+F...
• ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. 代码如下： (x_train, y_train), (x_test, y_test) = keras....
• VSCode工具报“Experimental support for decorators is a feature that is subject to change in a future release. Set the ‘experimentalDecorators’ option to remove this warning.”and“Unable to resolve ...
• CODE can get from this site:https://zhile.io/2018/08/25/jetbrains-license-server-crack.html 2、delete the fucking folder .GoLand2019.3 or other product-config if it exists.The path is C:\Users\...
• 173.When does a transaction complete? (Choose all that apply.)
• vc++2005编译文件iptest.cpp 报错: error C2859: ..../debug/vc80.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header. 正确的解决方法步骤如下:...
• This is a music Alarm that when it goes off(at the time you set it) it starts playing an mp3 that you specify.
• kolla-ansible部署q版openstack执行如下命令 pip install python-openstackclient python-glanceclient python-neutronclient ERROR: After October ... This is because pip will change the way that it resolves
• ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 2 array(s), but instead got the following ...
• 1. It's + some time + since从句.翻译：“自从...以来已经多久了”。...2. It's + some time + that从句.翻译：“...多久了”。要求：此为强调句型，去掉It's和that之后，剩下部分必须是个完整的句子。如...
• that和except when都可表示“除……外”之意，但是它们的含义和用法各不相同，不能混淆。现编如下口诀，以帮助正确地区别与使用： 辨析“除外”看含义， “包括在内”besides①。 except、but“不包括”， ...
• Hi Tommy,> I am working on a Managed C++ project and I get the following error:>> TestThread.cpp(3) : error C2859: c:/projects/ProjectName/debug/vc70.pdb> is not the pdb file that was used when this p
• conda install Hisat2时遇到如下问题： htseq -> python[version=‘2.7.|3.5.|3.6.|>=2.7,<2.8.0a0|>=3.6,❤️.7.0a0|>...If python is on the left-most side of the chain, that’s th
• 本人系统是ubuntu15.10,后安装了vmware pro12后死活无法联网，一打开virtul networks editor就提示：Network configuration is missing. Ensure that /etc/vmware/networking exists.后来各种百度，重装了lubuntu...
• different StateBackend from the one that was used for taking a checkpoint/savepoint is used when restoring.
• *******************************Source file: D:/Projects/StereoMatch/stereomatcher.cppModule: D:/Projects/StereoMatch/Debug/StereoMatch.exeProcess: [4024] StereoMatch.exe The source file is dif
• ## When Work Becomes a Game

千次阅读 2019-10-08 14:49:51
When Work Becomes a Game A) What motivates employees to do their jobs well? Competition with coworkers, for some. The promise of rewards, for others. Pure enjoyment of problem-solving, for a lu...
• 我本来是个atom忠实粉丝, 但是atom使用window10自带输入法在书写汉字时总是会出现首字母缺失的情况, 查了好久没法解决, 直接放弃了atom, 转而使用Vs code书写markdown, 但是使用Vs code时发现在左侧导航栏配置新建...
• eclipse下面的错误，注意下面错误中标红字体处。 Streaming result set ... No statements may be issued when any streaming result sets are open and in use on a given connect...
• When it’s time to quit, that’s the time to carry on. You’ve given it all it takes; now give it some more. Hannan Malik If you’re trying to achieve something spectacular or out...

...