Author Archives: Robins

Unity5.4.x Update to Unity2019 Error: -System.MissingMethodException

Error Messages:

System.Reflection.BindingFlags
ReadSelectedTable Error = System.MissingMethodException: TABLE.xxx.rows Due to: Attempted to access a missing member.
at System.RuntimeType.InvokeMember (System.String name, System.Reflection.BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[] providedArgs, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParams) [0x0070c] in <567df3e0919241ba98db88bec4c6696f>:0
at System.Type.InvokeMember (System.String name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object target, System.Object[] args) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0

 

Solution:

Unity2019

var rowsData = arrayType.InvokeMember(“rows”, BindingFlags.Public | BindingFlags.GetProperty | BindingFlags.Instance, null, arrayData, null);
tableRows = (rowsData as ICollection).GetEnumerator();

Python: How to Calculate the Distance of Latitude and Longitude

 1     def geodistance(self, lng1, lat1, lng2, lat2):
 2         # lng1,lat1,lng2,lat2 = (120.12802999999997,30.28708,115.86572000000001,28.7427)
 3         lng1, lat1, lng2, lat2 = map(radians, [float(lng1), float(lat1), float(lng2), float(lat2)])  # Latitude and longitude to radians
 4         dlon = lng2 - lng1
 5         dlat = lat2 - lat1
 6         a = sin(dlat / 2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
 7         distance = 2 * asin(sqrt(a)) * 6371 * 1000  # Average radius of the Earth, 6371km
 8         # Unit: meter
 9         distance = round(distance, 3)
10         return distance

[Solved] freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:

Using Freemarker to report an error, I feel that there is no problem with the template. After only one project is deployed in use, an error is reported. . . .

 

 

 

 

Solution: Add the following line in config file

spring.freemarker.settings.classic_compatible=true

HDFS Operate hadoop Error: Command not Found [How to Solve]

1. sudo vim /etc/profile

sudo into the profile file

 

2.

export JAVA_HOME=/usr/lib/jvm/jdk-1.8.0_212
export HADOOP_HOME=usr/local/hadoop
export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH

Add the above three to the end of the profile file

Press i to edit first, press Esc after writing, then: wq save and exit

 

3.source /etc/profile

Update environment variables

 

This problem can be solved by the above three steps

C Language: How to Search in Header File (Two Methods)

angle bracket pattern

Header files enclosed by angle brackets, for example #include <file>, are searched from standard system directories by default, and the exact search path depends on the target system, how GCC is configured, and where GCC is installed. cpp -vThe default search path can be viewed through the directive.

quote pattern

Header files enclosed in quotes, for example #include "file", are searched first from the current file’s directory, and then from the standard system directories.

Specify the search directory

With -Idircommand line options, you can specify a custom search directory.

For quote mode, after the current directory is searched, the directory specified by dir will be searched, and finally the standard system directory will be searched.

For angle bracket mode, the directory specified by dir is searched first, followed by the standard system directories.

More granular control over search directories

If you want to specify only the search path for quote patterns, you can use -iquotethis option. This option only applies to quote patterns. -I,-isystem,-idirafterApplies to both.

[Solved] Vue Project Created error: found 23 vulnerabilities (2 low, 16 moderate, 5 high)

found 23 vulnerabilities (2 low, 16 moderate, 5 high)
run npm audit fix to fix them, or npm audit for details

D:\myproject\yiyan_webauto
$ npm audit fix
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json

npm ERR! A complete log of this run can be found in:
npm ERR! D:\Program Files\nodejs\node_cache_logs\2022-03-01T04_21_12_141Z-debug.log

D:\myproject\yiyan_webauto
$ npm audit
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json

npm ERR! A complete log of this run can be found in:
npm ERR! D:\Program Files\nodejs\node_cache_logs\2022-03-01T04_21_18_162Z-debug.log

The above error is because package.json is not found in the current directory, cd to the root directory of the front-end project and execute it

 

D:\myproject\yiyan_webauto\front (master -> origin)
$ npm audit fix
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

up to date in 5.064s

82 packages are looking for funding
  run `npm fund` for details

fixed 0 of 23 vulnerabilities in 1208 scanned packages
  2 package updates for 23 vulnerabilities involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

WPF: How to Customize High-perfor Forms with WindowChrome

background:

But when we customize the form, the default form cannot meet our functional requirements, then we need to customize the form.

Core code:

<WindowChrome.WindowChrome> 
        < WindowChrome 
            CaptionHeight = " 30 " 
            CornerRadius = " 10 " 
            GlassFrameThickness = " 1 " 
            NonClientFrameEdges = " None " 
            UseAeroCaptionButtons = " False " /> 
    </WindowChrome.WindowChrome>

Paste it directly under the WIndow root node