Author Archives: Robins

Securityerror: error ᦇ 2148: SWF file XXX cannot access local resources, only file system only

refer to: http://helpx.adobe.com/flash-player/kb/flash-builder-flash-player-throws.html

Error message: SecurityError: Error #2148: SWF file C:/Documents and Settings/Administrator/Adobe Flash Builder 4/domain_mgr_flex/bin – debug/domain_mgr_main. SWF cannot access the local resources C:/Documents and Settings/Administrator/Adobe Flash Builder 4/domain_mgr_flex/bin – debug/textLayout_4 0.0.10485. SWF. Only file system-limited SWF files and trusted local SWF files can access local resources.
at flash.net: : URLStream/load ()
at flash.net: : the URLLoader/load ()

the solution:
in the C: \ WINDOWS \ system32 \ Macromed \ Flash \ FlashPlayerTrust directory (if FlashPlayerTrust directory does not exist, can create a) add a file, such as: True.txt (file name can be anything from), C:\Documents and Settings\Administrator\Adobe Flash Builder 4\ Flex workspace path, of course, can also be set to C:\

or all the disc characters can be written:

C:\
D:\
E:\
F:\
Note: You will need to restart your browser after editing this trust.txt file.
Originally, I had FlashBuilder4.0 installed on my machine, so I didn’t have this problem when debugging SWF. FlashBuilder4.7 was installed later, but version 4.0 was not uninstalled, so running SWF in the 4.0 compiler will report this error, while version 4.7 will not, presumably due to workspace path conflicts.
Strangely, errors are only reported in Firefox, but not in IE. It seems that the Flashplayer of these two browsers is quite different.

[unity problem] what should I do if I encounter ‘Global::’ already contains a definition

Cs (7,14): error CS0101: The namespace ‘global::’ already contains a definition for’ LHtest’

Let’s first see if the code is okay. If you close UNITY,VS. Open it again, no effect.

So just copy and paste the entire correct code into another new.cs file. I’m going to run this new.cs file.

Then the problem is solved.

In another case, you create a.cs file with the same name, just change the name.

“There was an internal API error” in Xcode debugging;

Visit: here
I wrote a game demo a while ago. I took some time to optimize the following method today. I found that the following errors will be reported when Debugging on iPad.

At the beginning, I thought that I used a private API. Later, I carefully checked that there was no problem. Therefore, I began to use the common debugging method when the real machine debugging went wrong.
1. Necessary good habits, Product –& GT; The clear;
2. Delete the previously debugged program on iPad, run it again, OK, and solve the problem (unexpectedly easy); As for the specific reason, I found that when the error dialog box popped up, it happened to be the detection of certificates such as profile, which might have something to do with the identification detection of the real machine. No matter how much, the problem is solved;
3. I encountered this problem again today. It was found that the apps debugged on the real computer had a profile conflict with some apps on the iPad, that is, they Shared a profile. (added on 14 May 2013)
PS: today may no longer regrets about baidu and Google, don’t know if industry reason, sometimes some problem on the search technology, found that all these results given in baidu and Google really really can’t, the efficiency is too low, turn a few pages is less than what you want, don’t know the reason why is because the algorithm or because baidu too pursuit of commercial cause, so if you have any questions how sometimes asked baidu are not the answer, might as well try Google;

undefined reference to `pthread_create’ collect2: ld returned 1 exit status


Cause of the problem: the
pthread library is not the default library on Linux systems, and you need to use the static library libpthread.a to connect, so you need to link the library when you create a thread using pthread_create() and when you call the pthread_atfork() function to create a fork handler.

add -lpthread parameter
GCC mult-tcp-server. c-o mult-tcp-server. lpthread
mult-tcp-server. c for your source file, don’t forget to add header #include< pthread.h>

PHP error in Windows: class’ mysqli ‘not found

For example, we have access to mysql through the API provided by PHP extension Mysqli. The error report is: Class ‘mysqli’ not found. The reason for this error is that PHP was unable to load the dynamic library php_mysqli.dll. The solution is to configure the relevant variables so that the program finds the location.
By default php_mysqli. DLL is existing in the PHP installation directory under ext directory:

The first thing we need to do is to modify the PHP configuration file. The configuration file in Windows is in php.ini under the PHP installation directory. If not, you can make a copy through PHp.ini-Development. We found one of them; Extension =php_mysqli.dll, remove the semicolon at the beginning to allow the configuration to take effect. This means that you can use the MySQli extension.

In general, this is fine, but our configuration file PHp.ini will not take effect if our system does not configure the environment variable PHPRC. In order for php.ini to take effect, we need to configure the environment variable PHPRC, which specifies the PHP installation directory.

After configuring the environment variables, we can restart the Apache server. We can verify our PHP-related information by using phpInfo (). First, the Configuration File is in the Loaded Configuration File, not “none”, but php.ini under the PHP installation directory.

The second is that the mySQli extension appears in the middle of the page. If one of the above two steps is missing, this part will not be displayed. When we call the MYSQli API in our PHP code, we will report an error:
said that php_mysqli.dll from ext in the PHP installation directory should be copied to C:\Windows\ System32. This is because php.ini has not taken effect, and php.ini should be copied to C:\Windows directory.
Next, we can query the emP table ID and name in the mysql database test through a program, the code is as follows:

<?php
$servername = "127.0.0.1";
$username = "root";
$password = "root";
$dbname = "test";

$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connect Fail " . $conn->connect_error);
}

$sql = "SELECT id, name FROM emp";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        echo "id: " . $row["id"]. " - name: " . $row["name"]. "<br>";
    }
} else {
    echo "0 output";
}
$conn->close();

We visited the PHP file on the page and got the following results:

A simple mysqli application and the problem of mysqli extension are solved.

vs2013 wdk8.1 ERROR: Symbol file could not be found. Defaulted to export symbols for ntkrnlmp.exe

ERROR: Symbol file could not be found. Defaulted to export symbols for NTKRNLMP.exe
In the environment
Win10 1803
Vs2013 + wdk8.1
win764+ VMware
Setting in environment variables
_NT_SYMBOL_PATH
cache*C:\Symbols; C:\Symbols; SRV*C:\Symbols*http://msdl.microsft.com/download/symbols;
Note that in previous versions it is best to set disk C without changing the path



 
This is set in variables, but also set in WinDBg
Set debug-break only under stop
File-Symbol File Path -(cache*C:\Symbols; C:\Symbols; SRV*C:\Symbols*http://msdl.microsft.com/download/symbols; cache*c:/Symbolsl; srv*c:/Symbols*http://msdl.microsoft.com/download/symbols )
The path here is the opposite

MySQL error: column ‘ID’ in field list is ambiguous

1. Error message

ERROR 1052 (23000): Column 'id' in field list is ambiguous

2. Cause analysis
Column ‘ID’ is repeated in the field list. In fact, two tables have the same field, but the name of the table field is not preceded by the name of the table, so the reference is unknown. The prefix student is no problem.
3. Solutions

SELECT student.name, student.student_id, score.score FROM student INNER JOIN score ONstudent.student_id = score.student_id WHERE student.name='mio';

+------+------------+-------+

| name | student_id | score |

+------+------------+-------+

| mio  |          1 |    99 |

| mio  |          1 |    77 |

| mio  |          1 |    88 |

| mio  |          1 |    99 |

+------+------------+-------+

4 rows in set (0.00 sec)

Follow my technical official account “Ramble on ARTIFICIAL Intelligence”, and push high-quality articles every day

error: File not found by glob???

Several situations that lead to the above problems:
1. The package name of RPM package contains such special symbols as “[,]”;
2. When rM-IVH XXXX. RPM, XXXX packet name does not exist;
3. The directory name at the top of RPM package does not exist or has problems; — I have made this trap of the problem, it took several days to solve.
Solutions:
1. Modify the package name of RPM package through MV;
2. Add packages to install in the installation directory;
3. Correct the directory name of RPM package to keep it consistent with the directory specified in the installation software;

Reproduced in: https://www.cnblogs.com/noxy/p/5794801.html

File contains no section headers. File: File: / / etc/ yum.repos .d/

When executing the installation instruction using the yum command, File contains no Section Headers. File: file:///etc/yum.repos.d/
The reason is that there is no yum source configured in the configuration,
Solutions:
Method 1: Configure yum source and modify the /etc/yum.repos. D/cenos-base.repo file
Method 2: Delete the original file and download it again
Delete the original file RM-f /etc/yum.repos. D/cenos-base.repo
To download, wget -o/etc/yum repos. D/CentOS – Base. ‘http://mirrors.aliyun.com/repo/Centos-7.repo
Clean up the cache of Yum Clean All

R learning notes (1) — ARIMA model

In view of the existing tutorial (http://blog.csdn.net/desilting/article/details/39013825), in the operation of the problems and solutions
If you have to do d-order differences on a time series to get a stationary series, then you use the ARIMA(P, D, Q) model, where D is the order of the difference. ARIMA(P, D, Q) Model is fully known as Autoregressive Integrated Moving Average Model (ARIMA). AR is Autoregressive and P is an Autoregressive term. MA is the moving average, Q is the number of moving average terms, and D is the difference times made when the time series becomes stationary.
Here are some basic ways to view help:
A. Help ()
two

1. Open R interface
2. 3. Click on “packages” in the pop-up page and then go to “…”

3.
library(help=”MASS”)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
data< – XTS (data,seq(as.POSIXct(“2014-01-01″),len=length(data),by=”day”)
Error in as. Vector (x, mode) :
cannot coerce type ‘closure’ to vector of type ‘any’
Solution: Just because the blogger did not replace the input data (source), it should be data< -xts(source,seq(as.POSIXct(“2014-01-01″),len=length(source),by=”day”))

acf < -acf (data_diff1,lag.max=100,plot=FALSE)
Error in na.fail. Default (as. Ts (x)) : there is a missing value
in the object
Solution: acf & lt; – acf(data_diff1,lag.max=100,na.action = na.pass,plot=FALSE)
However, in the ACF figure displayed at this time, the maximum value of the horizontal axis coordinate (hysteresis value) is not 100, and the horizontal axis coordinate grows exponentially with the value of E +00 and E +02.
After checking the specific value of ACF, it was found that the original horizontal coordinate of lag=1 was 86400, which should be changed to the unit of seconds (?). .
There is no way to solve this problem at present, just put “data< – “(data, seq (as POSIXct (” 2014-01-01″), len = length (data), by = “day”)) “this step can be omitted…

data.fit < – arima (data, order = c (7, 0), seasonal = list (order = c (1, 0), the period = 7))
Here’s a seasonal setup for ARIMA models, the setup rules are unclear.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
The final result is the same as the original blogger
Question: Do I need to do a unit root test?(Verified to be stationary time series)

error: invalid compressed data to inflate file #14: bad zipfile offset (local header sig):

The reason is that the zip file is too large to be extracted directly by using the command unzip name.zip.
Solutions:
1. See the blog on CSDN that jar XVF full.zip is used for decompression, and the actual measurement can be done;
One stateoverflow option is zip-f file.zip --out file-large.zip and then use the command unzip file-large.zip.

HTTPError HTTP Error 500 INTERNAL SERVER ERROR

Problem description
django + mysql + collect.py
When using the collection.py script to collect information into the library, the URllib request is an error, but the data is already in the library

Traceback (most recent call last):
  File "collectRHEL.py", line 201, in <module>
    req = urllib2.urlopen(url, url_encode)
  File "/root/.pyenv/versions/2.7.11/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/root/.pyenv/versions/2.7.11/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/root/.pyenv/versions/2.7.11/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/root/.pyenv/versions/2.7.11/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/root/.pyenv/versions/2.7.11/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/root/.pyenv/versions/2.7.11/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: INTERNAL SERVER ERROR

Solution idea, test method
First, clear the data in the library, modify some ORM field to make its length less than the length of the data to be inserted, which is bound to make an error, and then request with urllib and URllib2 respectively as the last test, but this time give enough length, and then test with urllib and urllib2 respectively
The test results
Whether it’s URllib or URllib2, it’s going to go wrong and whatever module you’re using, it’s going to be fine
conclusion

1. Determine the length of the database field in the ORM model
2. In fact, urllib.urlopen() or urllib2.urlopen() does not matter much