Author Archives: Robins

‘break’ not in the ‘loop’ or ‘switch’ context Error (Fixed)

Fatal error: ‘break’ not in the ‘loop’ or ‘switch’ context in
. /assets/Classes/PHPExcel/Calculation/Functions.php

‘break’ not in the loop ‘or’ switch ‘context

wrong position FILE:/private/var/WWW/backend/ThinkPHP/Library/Org/Util/PHPExcel/Calculation/Functions provides PHP LINE: 576
A search on the Internet, there are indeed a lot of people also asked:
Just delete ‘break’ on line 576!
Some people on the Internet say that the higher version of PHP7.0 is only available because:
As break is after return statement, so it giving fatal error.
Because break reported a syntax error after return! That’s not true!
Others say the bug has been fixed in 1.8.1! I used 1.7.9, you must use the latest version in the future!
— —
copyright notice: this article is the original article of CSDN blogger “deep drifter”, and follows CC 4.0 by-sa copyright agreement. Please attach the link of original source and this statement to reprint.

How to Fix Error CGContextSetStrokeColorWithColor: invalid context 0x0

CGContextSetStrokeColorWithColor: invalid context 0x0.
1. Error name: CGContextSaveGState: invalid context 0x0. CGContextDrawPath: invalid context 0x0. And so on. I compiled with no errors or warnings until runtime when I printed a series of &lt’s on the console. Error> The information is shown below (error message)

The error message

The reason for this error is not doing something improper to layer in the view’s -drawrect: method such as UIBezierPath’s – (void)setFill; – (void)setStroke; Method UIColor – (void)setFill; – (void)setStroke; Methods, etc.
2. Solutions
(1). Encapsulate the operations on the View Layer layer separately into the -drawRect: method of a View class
(2). Do not call the related method, the official annotation is generally given, com+ click to view: Drawing the context)

Officially given limits -& GT; drawing context

 

VNC logon when Connection union (10061) resolves

Problem: When you connect to a VNC server on Linux on Windows, click connect and the connect: Connect union (10061) alert box pops out and the connection is refused.
First of all, if your VNC configuration is ok and “Xvnc (PID 3644) is running” is shown through Service VNCServer Status on Linux, it is indeed started.
The reason is that you did not add the desktop number to the VNC client when entering the IP address. The above error will occur if you do not add it. The correct way to write it is IP:1
and it will connect and prompt you for your password!  

Solve the problem of VC 6.0 fatal error C1033: cannot open program database’.\debug\vc60.pdb’

VC++6.0 compiled a few times, suddenly appeared

The always open a program database… debug\vc60.pdb

then compile has been the error information…

There are several sayings on the Internet:

 
The
The
1. File properties, change to archive line.

 
The
The
The 2.
Only need to modify the directory, because my original directory path contains Chinese, not recognized, all changed to English. This doesn’t happen on the Chinese version of XP.

3. Clean all, and then rebuild all!

The 4. It could be a memory leak in your program that causes a dead process!

I tried, looks like the above said method are not make for me,

then, he asked the elder brother of the ACM, they say just restart the VC6.0 with respect to OK, ha ha, problem is solved!!!!!! Well, then another big brother said he just had to shut down the project and turn it on. Well, I haven’t tried that yet…

alas, the power is off… I wanted to paste that article on VC6.0 detecting memory leaks later…

other: on CSDN

PDB is Program the meaning of the Database, recorded some information about the Program and debug the related information.
in the Project Settings can set whether to use PDB, by default is selected. If selected, this file will be automatically generated when recompiling.

 
The
The
The
other people say the solution is:

Edit-> If Preferences find: repositories is empty, change it to stdmod

The second method to modify the path is the solution to the problem I encountered, but it is not the optimal one. In fact, if you are careful, you will find that the compilation fails because of the Chinese scrambled code caused by the Chinese path, so solving the scrambled code problem should solve the problem.

The solution, of course, is to modify the format of the language’s advanced options.

Hanyu Formats and Language for Non-Unicode Programs choose Chinese.

After following the steps in the red box above

To Build – first & gt; The Clean, and then Build – & gt; Rebuild All

That solves the problem. This is much more convenient than changing the path, especially for Chinese projects where changing the name will make you cry

Declare my IDE environment:

Windows8.1 with UPDATE, English, Enterprise, VC6.0 SP6, the official original mirror file + official download SP6 patch, many castrated version of VC6.0 sometimes appear some puzzling mistakes, especially the Chinese version of VC6.0, even VC assistant VA are not used, as a developer, if fear of English, then I still advised you to change line.

error: stray ‘\240’ in program

Error: Stray ‘\240’ in program

C :17:1: error: stray ‘\240’ in program
container_of. C :17:1: error: stray ‘\302’ in program
container_of. C :17:1: error: stray ‘\240’ in program
container_of. Stray ‘\302’ in program
container_of. C :17:1: error: stray ‘\240’ in program
container_of. C :17:1: error: stray ‘\302’ in program
container_of. Stray ‘\240’ in program
container_of. C :17:1: error: stray ‘\302’ in program
container_of. C :17:1: error: stray ‘\240’ in program
container_of
There was an error when the code was compiled. The reason is that the code was copied from the web page and probably contained Chinese characters and other characters.
The solution: Remove the illegal ASCII characters
Software: notepad++
operation steps

    CTRL +f call up the search window check the regular expression under search mode
    Enter [^\x00-\x7F]+ replace with blank

svn Key usage violation in certificate has been detected

    sudo apt-get install libneon27-dev

    cd /usr/lib
    sudo mv libneon-gnutls.so.27 libneon-gnutls.so.27.old
    sudo ln -s libneon.so.27 libneon-gnutls.so.27

< script> window._bd_share_config={“common”:{“bdSnsKey”:{},”bdText”:””,”bdMini”:”2″,”bdMiniList”:false,”bdPic”:””,”bdStyle”:”0″,”bdSize”:”16″},”share”:{}}; with(document)0[(getElementsByTagName(‘head’)[0]||body).appendChild(createElement(‘script’)).src=’http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=’+~(-new Date()/36e5)]; < /script>

Read (761) | comments (0) | forward (0) |

0

VIM VMB Installation plug-in
Next: PCH Warning

Related hot articles

Android development environment to build Android custom View implementation… Androidmanifest.xml configuration file… Android relative layout + rounded buttons +Sha… View the Android application package name package and…
Linux DHCP Peizhi ROC soft link on Unix files Ask what this command means, I am new… Sed -e what does “/grep/d” mean… Who can help me with LINUX 2.6 10…

Leave something for the master! ~ ~

Comment on hot

SQLCODE=-551, SQLSTATE=42501 error resolution

I. Questions:
Dbvisualizer: SQLCODE=-551, SQLSTATE=42501, SQLERRMC= user name; SELECT; The name of the table
 
Use software
Dbvisualizer software
 
Iii. Solutions (Windows system) :
Db2 Grant DBADM on Database to User user name
 
Reprint address: http://www.bubuko.com/infodetail-3002569.html
Reprint address 2:https://www.cnblogs.com/clfonly1/p/10613487.html

sklearn.metrics.mean_squared_error

Mean square error regression loss
format:
sklearm.mean_squared_error (y_true, y_pred, sample_weight=None, multioutput= ‘uniform_average’)
parameter:
y_true: true value.
y_pred: predicted value.
sample_weight: sample weight.
multioutput: multi-dimensional input and output, default is’ uniform_average ‘, calculates the mean square error of all elements, returns as a scalar; Alternatively, ‘raw_values’ computes the mean square error of the corresponding column and returns a one-dimensional array with the same number of columns.
example:

from sklearn.metrics import mean_squared_error
y_true = [3, -1, 2, 7]
y_pred = [2, 0.0, 2, 8]
mean_squared_error(y_true, y_pred)
# Output: 0.75
y_true = [[0.5, 1],[-1, 1],[7, -6]]
y_pred = [[0, 2],[-1, 2],[8, -5]]
mean_squared_error(y_true, y_pred)
# Output: 0.7083333333333334
mean_squared_error(y_true, y_pred, multioutput='raw_values')
# Output: array([0.41666667, 1.        ])
mean_squared_error(y_true, y_pred, multioutput=[0.3, 0.7])
# Output: 0.825
# multioutput=[0.3, 0.7]返回将array([0.41666667, 1.        ])按照0.3*0.41666667+0.7*1.0计算所得的结果
mean_squared_error(y_true, y_pred, multioutput='uniform_average')
# Output: 0.7083333333333334

Refer to the link: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.mean_squared_error.html

firefox ssl_error_unsupported_version

Open the page display

Unable to Connect Securely

Firefox cannot guarantee the safety of your data on xxxx because it uses SSLv3, a broken security protocol.
Advanced info: ssl_error_unsupported_version

Solution:
address bar enter about: config.
will be security. The TLS version. The fallback – limit to change the value of 1
the revised all normal!

Caused by the “error string in namespace std does not name a type” error

A weird thing happened when I was learning c++ today: when compiling the following code, the compiler displayed an error:
error: ‘string’ in namespace ‘std’ does not name a type
The procedure is as follows:

struct sales_data
{
	std::string bookNo;
	std::string bookName;
	unsigned int count;
	double price;
};
int main()
{
	return 0;
}

obviously there is a #include< string>

However, if you modify the code as shown below, you will also compile successfully.
The modified code is as follows:

#include<iostream>
struct sales_data
{
	std::string bookNo;
	std::string bookName;
	unsigned int count;
	double price;
};
int main()
{
	return 0;
}

what is the reason for this?
After Google, at http://www.cplusplus.com/ query to the ios libraries and other libraries relationship is as follows:

As you can see from the figure above, the StringStream library has been declared in the IoStream library and includes some of the string functionality. So that’s what happened.