Author Archives: Robins

To solve the problem of failed to load: data in HTML5 game running rmmv locally/ actors.json problem

When running locally RMMV HTML 5 games Failed to load: data/actors. Json problem, discussed in the site has a http://steamcommunity.com/app/363890/discussions/1/483368526577568252/

originally belongs to the problems of cross-domain access, using the server is no problem, need not service for chrome seems to have ways of http://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome/3177718#3177718

in Windows:

using the following command “C:\.. \chrome.exe” –disable-web-security –user-agent=”Android” –user-data-dir=”C:/temp-chrome-eng” –app=”file:///C:/apps/index.html”



for me, use “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” –user-data-dir=”C:/Chrome dev session” –disable-web-security

after Path is added, simplify to chrome –user-data-dir=”C:/ chrome-dws-user-data -dir” –disable web-security

Open chrome with , and enter the file you want to access in the address bar of the page that says “you are using an unsupported command line tag.

file:///C:/Users/xxx/Documents/RMMVGames/Project1/index.html

where XXX is the user name

then encountered a Failed to load:GameFont error

I changed the return value of the function(name) function to true for rpg_core.js.

ERROR: JDWP Unable to get JNI 1.2 environment

failed to get JNI 1.2 environment, JVM ->

ERROR: JDWP is Unable to get JNI 1.2 environment, JVM -> The GetEnv () return code = – 2

the JDWP exit error AGENT_ERROR_NO_JNI_ENV (183) : [… /… /…/SRC/share/back/util. C: 820]

to find the reason for the error. Found a problem with redirecting the output.

is the following is the original network data

install jdk1.6, ha ha ~ I also met this problem. This is something I found on the Internet before. I hope it will be helpful to you.

ERROR: JDWP incapable to get JNI 1.2 environment, JVM -> The GetEnv () return code = – 2

the JDWP exit error AGENT_ERROR_NO_JNI_ENV (183) : [… /… /…/SRC/share/back/util. C: 820]

this is going on?Now Java SE 6 has reached the stage of RC, huh?

after I looked up the Java Doc carefully, I found that there is such a paragraph: http://download.java.net/jdk6/docs/api/java/io/Console.html

“been a virtual machine from a console is dependent upon the physicist platform and also upon the manner in which the virtual machine is invoked. If the virtual machine is started from an interactive command line without redirecting the standard input and
output streams then its console will exist and will typically be connected to the keyboard and display from which the virtual machine was launched. If the virtual machine is started automatically, for example by a background job scheduler, Then it will typically

1, use the command line to run, compile can use the integrated development environment. This completes standard output. 2. Redirect stdout in the program to another device or mode (such as writing to a text file), which can also be “inconvenient” to complete the function. 3. At the end of main function, add system.exit(0);

note:

return and system.exit() what is the difference between:

1. Return is the upper level of the program, system. Exit () is the top level of the program

2

How to Fix ERROR: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?

centos8 using docker composer ERROR: fix ERROR: Couldn’t connect to docker daemon at HTTP +docker://localhost – is it running?

you can see the version number using docker-compose version, proving that the service is enabled. The reason is because it is not added to the Docker group.

execute command: sudo gpasswd-a ${USER} docker note: do not change the command, directly execute

after the execution of the user needs to switch: su root; su hyn

npm ERR! Error: CERT_ Untrusted problem solving

nodejs I will not introduce, IT is very hot technology recently, the function is very powerful. I also did some research. Error when installing a nodejs software project:

npm ERR! Error: CERT_UNTRUSTED

after careful screening and Google, turns out to be the SSL problem:

solution:

npm config set strict-ssl false

or

npm config set registry=”http://registry.npmjs.org/”

to continue error error-code-elifecycle, execute the following command:
NPM cache clear –force
NPM install -g NPM (upgrade)

solution: command prompt (run as an administrator) [run as a super administrator for Windows, Linux requires sudo]

note: please try to run this command again as root/Administrator.

sudo
sudo NPM install –save-dev grunt
but this may not work, you need to do this:

sudo NPM install –unsafe-perm=true –save-dev grunt
perhaps you will still encounter an error, try

sudo npm install –unsafe-perm=true –allow-root –save-dev grunt

background: after installing nodejs on Linux, I have been using the NPM install command to install project dependencies that have been denied permission undefined. I am root.

solution, need this command.

npm install –unsafe-perm=true –allow-root

Replace an NPM installation source as follows:

1, through the config command NPM config set registry https://registry.npm.taobao.org NPM info the underscore (if there could be strings configured properly this command response)

2, command line specifies the NPM – registry https://registry.npm.taobao.org info the underscore and then install it

and then rerun NPM install -g **** OK ~~~


a good habit in the project life cycle when installing a new dependent module NPM install XXX – save
NPM added – save dependent module version information will be written to the package.
in the json every time such in server deployment directly cp package files NPM install can be in accordance with the package. The information in the json (reduction) deployment as dependent on good operation environment

of course, the most important thing is that node version compatibility is the first

according to my understanding, this kind of node, is not only to indicate the dependent package version, but also indicate the other version dependencies, such as running environment version number and build tools version, operating system, database version, because the node changing fast (also different update quickly, ECS grammar)

node version is too low?

install n module: sudo NPM install -g n (node has a module called n, which is used to manage versions of node.js)

upgrade node.js to the latest stable version in the terminal input: n stable

you can check the node version installed successfully: node-v

shares several common NPM commands

npm-v # displays the version and checks to see if NPM is installed correctly.

NPM install express # express module

NPM install -g express # global install express module

NPM list # lists installed modules

NPM show express # display module details

NPM update # updates all modules of the project in the current directory

NPM update express # updates the specified module of the project in the current directory

NPM update-g express # upgrade globally installed express module

NPM uninstall express # remove the specified module

/usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at “BOOST_JOIN”

qt-ros:

/usr/include/boost/type_traits/ has_binary_operation.hp :50: Parse error at “BOOST_JOIN” error

temporary solution:

modify /usr/include/boost/type_traits/detail/ has_binary_operation.hpp file

namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {

..

}

to

#ifndef Q_MOC_RUN
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
#endif

#ifndef Q_MOC_RUN
}
#endif


Solution to error opening trace file: no such file or directory (2) in Android

this error may occur frequently in android projects:

error opening trace file: No such file or directory (2)
combined with the Internet search and their own experience to give the following some solutions:

is usually a problem with the file androidmainfest.xml:

1. Check whether the version of android API is consistent with that of the emulator;

2, delete < USES – SDK android: minSdkVersion = “8” android: targetSdkVersion = “15”/& gt;
add & lt; USES – the permission of the android: name = “android. Permission. WRITE_EXTERNAL_STORAGE”/& gt;

3. Check whether tag tags appear in pairs in XML files;

4. Check the androidmainfest.xml file for missing the corresponding activity event. activity> Or change the class name in a Java file and forget to change it back in an XML file.

if this error occurs while testing with a physical machine, try shutting down the machine before restarting it.

NPM error ‘cannot find module’ internal / util / types’ solution;

1. Uninstall node.js

2, delete C:\Users\Administrator\AppData\ cache under NPM, npm-cache (this step must have)

3. Reinstall node.js and enter node. v and npm-v in DOS again to see the corresponding version number

I played with node for a long time, unloaded and unloaded; The beginning did not carry on the second part, so ask not to do not work, the key is in the second step;

The errors dimensions of materials being qualified are not persistent


actually in matlab, we often encounter this problem, you have a look at the cause of the problem, you know what is the reason, but sometimes, pretty sure your program will be a problem, but the error, a run is a newspaper is very embarrassed, but it is not your program logic has a problem, mainly because the following error

Dimensions of matrices being concatenated are not consistent.


Cell2mat is matlab function is commonly used in a function, function is to convert the inside of the cell format digital into digital, in fact, when the inside of the cell number is expressed as a character to, such as’ 1 ‘, ‘2’, ‘3’ some of these characters, Cell2mat can also be converted characters into Numbers, but when these characters into ’10’, ’11’, ’12, the situation is complicated, the system will be an error, then say:

Error using cat

Dimensions of matrices being concatenated are not consistent.

Error in cell2mat (line 84)

m{n} = cat(1,c{:,n});

the solution to this problem is to use the function str2num to convert to number.





to solve this problem, a search on the Internet, are all conversion, but it seems that it is no use, I do not have time to find a solution to this problem, I will find a solution after busy with this topic research.

Error: /usr/bin/python: Error while finding module specification for ‘virtualenvwrapper.hook_loader’

reasons: workon command fails, the Python version changes, is to use the previous python3.6 install Python virtual environment, relevant documents is in the/Library/Frameworks/Python framework Versions/3.6/bin
solution 1: to install a virtual environment in new python3.7 environment

$sudo pip3 install virtualenv virtualenvwrapper
$source .bashrc

the solution 2: will/Library/Frameworks/Python framework Versions/3.6/bin three files in the directory, copy it to/usr/local/bin directory in

$cd /Library/Frameworks/Python.framework/Versions/3.6/bin
$cp virtualenv-clone virtualenvwrapper.sh virtualenvwrapper_lazy.sh /usr/local/bin

error: aggregate value used where an integer was expected

problem description:

casts struct struct type data into unsigned long

The reason why

cannot be converted is that the structural Type (including union) is not a Scalar Type; Conversion is only possible between quantitative types. Quantitative types include arithmetic types and pointer types, and arithmetic types include integer types and floating point types.

even if it’s

struct in_addr type:

struct in_addr
 {
    in_addr_t s_addr;
};
in_addr_t 一般为 32位的unsigned int,其字节顺序为网络顺序(network byte ordered),即该无符号整数采用大端字节序。

这里即使内存中是unsigned int 类型的,也不能实际使用成unsigned int,因为整体类型不一样,c语言禁止强制转换,强制转换是'低级类型',转'高级类型';
但是可以使用指针强制将这段内存解释成unsigned int类型的数据。

即unsigned int a1 =  *(unsigned int *)&((struct in_addr) a2);