[atguigu@hadoop102 .ssh]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/atguigu/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/atguigu/.ssh/id_dsa.
Your public key has been saved in /home/atguigu/.ssh/id_dsa.pub.
The key fingerprint is:
25:0a:23:7f:a7:f0:d1:78:f6:59:57:e3:cc:78:49:d0 atguigu@hadoop102
The key's randomart image is:
+--[ DSA 1024]----+
| .. |
| .E |
| . o . . o.|
| o o + o *.o|
| o = S ...* |
| + * . o .. |
| o o |
| |
| |
+-----------------+
[atguigu@hadoop102 .ssh]$ ssh-copy-id hadoop103
/usr/bin/ssh-copy-id: ERROR: No identities found
After regenerating the key pair, it was copied to another machine, HadoOP103 times made the following mistake:
/usr/bin/ssh-copy-id: ERROR: No identities found
The reason mentioned online is that no key pair has been generated.
Obviously, I am not the reason, as mentioned below:
Then it is found that the public key path is missing and can be added through -i:
$ ssh-copy-id -i ~/.ssh/id_dsa.pub user@remote_ip
I tried it, and I solved it
[atguigu@hadoop102 .ssh]$ ssh-copy-id -i ~/.ssh/id_dsa.pub atguigu@hadoop103
atguigu@hadoop103's password:
Now try logging into the machine, with "ssh 'atguigu@hadoop103'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[atguigu@hadoop102 .ssh]$ ssh-copy-id -i ~/.ssh/id_dsa.pub atguigu@hadoop104
atguigu@hadoop104's password:
Now try logging into the machine, with "ssh 'atguigu@hadoop104'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[atguigu@hadoop102 .ssh]$ ssh hadoop104
Last login: Fri Dec 28 03:39:18 2018 from 192.168.31.1
[atguigu@hadoop104 ~]$ exit
logout
Connection to hadoop104 closed.
[atguigu@hadoop102 .ssh]$ ssh hadoop103
Last login: Fri Dec 28 03:39:18 2018 from 192.168.31.1
[atguigu@hadoop103 ~]$ exit
logout
Connection to hadoop103 closed.
div>
There was a problem with the editor ‘vi’
There was a problem with the editor ‘vi’
submitted the code through
git commit-m 'modify message' in the project. It was found that the modify message submitted was not accurate, so I wanted to modify it. Use the git commit -amend command to modify modify message. After editing the message in vim, the w+q exits with an error and the 0 message1 fails to save, 2The error message is:

error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.Solutions:

git config --global core.editor /usr/bin/vimAmend git commit --amend is OK this time.
Reference:
http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/
The installation of Homebrew encountered a 400 Bad Request error
ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
appear
Curl: (22) The requested URL returned error: 400 Bad Request
error, search The following command to successfully install:
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
tftp open error resolution
Can’t bind the TFTP port!
Solutions:
Check to see if port 69 is occupied by netstat -AN
2 If it is not occupied, delete the TFTPD32 folder under HKEY_LOCAL_MACHINE, SOFTWARE in the registry
Restart the tftp32
error C2057: expected constant expression (Can the size of an array in C language be defined when the program is running?)
no. In the definition of an array, the size of the array must be known at compile time, not at run time. For example, if I is a variable, you cannot use I to define the size of an array:
char array[I]; Notvalidc */
supports this definition in some languages, but not in C. If C supported this definition, the stack would become more complex, the overhead of calling functions would be greater, and the program would run significantly slower.
if the size of the array is known at compile time, even if it is a very complex expression, you can define it as long as it can be calculated at compile time. If you want to use an array whose size is not known until the program is running, you can specify a pointer and call the malloc() or calloc() functions to allocate memory space for the array from the heap. Here is an example of an argv array that is copied to the main() function:
[cpp]
view plain
copy
- 7.15 cases in row to determine the size of the array, use the pointer and the malloc ()/* A silly program that copies the argv array and all the pointed – to strings. Just for fun, it also deallocates all the copies. */# include & lt; Stdlib. H> # include & lt; String. H> Int main (int arg c, char * * argv) {char * * new_argv; Int I;/* Since argv [0] through argv [arg c] are all valid, the program needs to the allocate room for arg c + 1 Pointers. */new_argv = (char * *) calloc (arg c + l, sizeof (char *));/* or malloc ((arg c + 1) * sizeof (char *)) */printf (” allocated room for % d Pointers starting at % P \ n “, arg c + 1, new_argv);/* now copy all the strings more (argv [0] through argv [arg c – l]) */for (I = 0; i< argc; + + I) {/ * make room for ‘\ 0’ at end, too */new_argv [I] = (char *) malloc (strlen (argv [I]) + l); Strcpy (new_argv [I], argv [I]); Printf (” % d bytes allocated for new_argv [% d] at % P “, “copied \” % s \ \ “n”, strlen (argv [I]) + l, I, new_argv [I], new_argv [I]); } new_ argv [arg c] = NULL:/* To deallocate everything, get rid of the strings (in any order), then the array of Pointers. If you free the array of poiners first, you lose all the reference To t (I = 0); i< argc; + + I) {free (new_argv [I]); Printf (” freed new_argv [% d] at % P \ n “, I, new_argv [I]); Argv [I] = NULL; * * Habit, see note at the end of this example */} free(new_argv); Printf (” Freed new_argv itself at %P\n”, new_argv); Return 0; /* see 16.4 */}
Note: Why does example 7.5 assign NULL after freeing each element in the new_argv array?This is a habit formed on the basis of long practice. After a pointer is released, you can no longer use the data it originally pointed to, or the pointer is “suspended” and no longer points to any useful data. If a pointer is assigned NULL immediately after it is released, the program will not make an error even if it USES the pointer again. Of course, the program may indirectly refer to the null pointer, but such errors can be detected in time while debugging the program. In addition, a
program may still have some original copies of the pointer pointing to the portion of memory that has been freed, which is natural in C programs. In short, although this habit doesn’t solve all problems, it does help.
Linux7 hardware time occasionally encounter nonsense Powerpath startup error
New environment, RHEL 7.2 installs EMPPP multipath software
But after starting, an ERROR
, Nov 14 10:44:46 localhost PowerPathPost: ERROR: Cannot open PowerPath. Initialization ERROR
, Nov 14 10:44:46 localhost PowerPathPost: ERROR: Cannot open PowerPath
Later, I checked EMC’s official website and found relevant bugs, because the hardware time and system time did not match. When the PP starts, it needs to be initialized. Hwoo-w synchronization time, and restart the host after normal.
https://community.emc.com/docs/DOC-60879
Reproduced in: https://blog.51cto.com/yangjunfeng/2316861
Use of rep function in R
The official help document reads as follows:
Usage
rep(x, ...) rep.int(x, times) rep_len(x, length.out)
Arguments
x |
a vector (of any mode including a list) or a factor or (for rep only) A POSIXct or POSIXlt or Date object; or an S4 object containing such an object. |
||||
... |
further arguments to be passed to or from other methods. For the internal default method these can include:
dl> td> tr> | times code> td>
length.out non-negative integer: the desired length of the output vector. |
|
Rep functions with four parameters: the x vector or class vector of objects, each: x elements each repetitions, times: after each vector processing, if The Times is a single value, is the value of the whole after each repeat number of times, if it is equal to the vector x after each of the length of the vector, for each of the number of the elements of the repeat times each element in the same position, otherwise an error; Leng. out refers to the length of the final output of the vector processed by times. If it is longer than the generated vector, it is completed. That is, rep will take each parameter, generate a vector X1, and times will manipulate X1 to generate X2, lengthen. Out will manipulate X2 to produce the final output vector X3. Here is an example:
> Rep (1:4,times=c(1,2,3,4)) # and vector x equal length times mode
[1] 1 2 2 3 3 3 4 4 4 4
> Rep (1:4,times=c(1,2,3)) # non-equilong mode, Error
Error in rep(1:4,times=c(1,2,3)) : invalid 'times' argument
> Rep (1:4,each=2,times=c(1,2,3,4)) # is still non-equal length mode, because the vector after each has 8 bits, instead of 4 bits
Error in rep(1:4,each=2,times=c(1,2,3,4)) :
invalid 'times' argument
> Rep (1:4, times = c (1, 2, 3, 4)) # isometric model, I wrote to the o (╯/╰) o
[1] 1 2 2, 3, 3, 3, 4, 4 4 4
& gt; Rep (1:4,times=c(1,2,3,4),each=3) # repeat example, don't beat me
Error in rep(1:4,times=c(1,2,3,4),each=3) :
invalid 'times' argument
> Rep (1:4, each = 2, times = 8) # value correctly, times8 bit length vector
[1] 1 1 1 2 2 2 2 2 2 2, 3, 3 3 3 3 3 3 3 3 3, 3, 4, 4 4 4 4 4 4 4 4 4 4 4 4 4 4
& gt; Rep (1:4,each=2,times=1:8,len=3) # use of len, loop complement pay attention to
[1] 1 1 2
> Rep (1:4,each=2,times=3) # after each times
[1] 1 1 2 2 3 3 4 4 1 1 2 2 3 3 4 4 4 1 1 2 2 3 3 3 4 4
> Rep function over!
Reproduced in: https://www.cnblogs.com/business-analysis/p/3414997.html
error C2471: cannot update program database vc90.pdb
Why is it that after I convert a VC6 project to a VS2008 project, the compilation always fails to find and cannot upgrade the VC90.pDB file?Recompiling doesn’t work either.
jump directly from VC6 to VS2008
This VS2008 is a well-known bug. See https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?for details FeedbackID=309462
The official current solution is as follows:
I have found an alternate way for the time beging to avoid C2471 error but it works only in the case of successful release build.
for this click build menu than Configuration manager than create a new setting from release settings. Change following things in your project settings as :
C\C++ | General | Debug Information format | C7 Compatible (/Z7)
C\C++ | Code Generation | Enable String Pooling | Yes (/GF)
Linker |Debuging |General Debug Info | Yes (/DEBUG)
Reproduced in: https://www.cnblogs.com/kex1n/archive/2012/01/14/2322164.html
unity fatal error in gc too many heap sections error
Node.JS “Cannot enqueue Handshake after invoking quit” Error (Fixed)
module.exports = {
getDataFromUserGps: function(callback)
{
connection.connect();
connection.query("SELECT * FROM usergps",
function(err, results, fields) {
if (err) return callback(err, null);
return callback(null, results);
}
);
connection.end();
},
loginUser: function(login, pass, callback)
{
connection.connect();
connection.query(
"SELECT id FROM users WHERE login = ?AND pass = ?",
[login, pass],
function(err, results, fields)
{
if (err) return callback(err, null);
return callback(null, results);
}
);
connection.end();
},
getUserDetails: function(userid, callback)
{
connection.connect();
connection.query(
"SELECT * FROM userProfilDetails LEFT JOIN tags ON userProfilDetails.userId = tags.userId WHERE userProfilDetails.userid = ?",
[userid],
function(err, results, fields)
{
if (err) return callback(err, null);
return callback(null, results);
}
);
connection.end();
},
addTags: function(userId, tags)
{
connection.connect();
connection.query(
"INSERT INTO tag (userId, tag) VALUES (?, ?)",
[userId, tags],
function(err, results, fields)
{
if (err) throw err;
}
)
connection.end();
}
}
Everything worked fine at first, but when I executed the second “query, “I got this error:
Cannot enqueue Handshake after invoking quit
I’ve tried turning off the connection without using the.end() method, but it doesn’t work.
Thanked first.
Radex
Those blind solutions and water paste I will not translate.
According to:
Fixing Node Mysql “Error: Cannot enqueue Handshake after invoking quit.”:
http://codetheory.in/fixing-node-mysql-error-cannot-enqueue-handshake-after-invoking-quit/
TL; Every time DR closes a connection you need to create a new connection using the createConnection method.
And
Note: If you are serving web requests, you should not turn off the connection each time the request is processed. When the server starts up, create a connection and keep querying it with the Connection/Client object. To handle server disconnection and reconnection events you can listen for error events. Complete code: Here.
Again according to:
The Readme. Md – Server disconnects:
https://github.com/felixge/node-mysql#server-disconnects
It said
Server disconnects
You may lose your connection to MySQL server due to a network problem, server timeout, or server hanging. All of these are considered “fatal errors “and there will be an error codeerr. Code = 'PROTOCOL_CONNECTION_LOST'. See the error handling section for more information.
The best way to handle these unwanted disconnections is as follows:function handleDisconnect(connection) { connection.on('error', function(err) { if (!err.fatal) { return; } if (err.code !== 'PROTOCOL_CONNECTION_LOST') { throw err; } console.log('Re-connecting lost connection: ' + err.stack); connection = mysql.createConnection(connection.config); handleDisconnect(connection); connection.connect(); }); } handleDisconnect(connection);As the example above shows, reconnection is achieved by creating a new connection, because the connection object is designed so that it cannot be reconnected once it dies.
When a connection pool is used, suspended connections are removed from the pool and space is freed, and a new connection is automatically created when a new connection request arrives.
the respondent has posted his own autoreconnect code at the end, so I’m not going to post it here.The answer was 18:58 on May 3, 2013
XP1
Although this answer was not adopted by the main topic, but I and the following comments have always thought that this answer is better.
The original web site: http://stackoverflow.com/questions/14087924/cannot-enqueue-handshake-after-invoking-quit
hbase ERROR org.apache.hadoop.hbase.PleaseHoldException: Master is initializing
Hbase error:
hbase(main):001:0> status
ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is the initializing
the at org.. Apache hadoop, hbase. Master. HMaster. CheckInitialized (HMaster. Java: 2293)
the at org.apache.hadoop.hbase.master.MasterRpcServices.getClusterStatus(MasterRpcServices.java:777)
…..
Solution:
log in zookeeper client and delete /hbase
#./bin/zkCli. Sh
[zk: localhost:2181(CONNECTED) 1] RMR /hbase
Then restart the HBase service
error: ‘stoi’ was not declared in this scope linux (Fixed)
It needs to be compiled to c++11 standard. This can be modified in the Makefilelist
Add the following statement: Set (CMAKE_CXX_STANDARD 11)The following problems exist: the version of GCC is too low and the above statement may fail