The content of selectServerInTCPIPbook.c is as follows: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <arpa/inet.h> #include <sys/socket.h> #include <sys/time.h> #include <sys/select.h> #defineBUF_SIZE 100 void error_handling(char *buf); int main(int argc, char *argv[]) {<!– –> int serv_sock, clnt_sock; struct sockaddr_in serv_adr, clnt_adr; struct timeval timeout; fd_set reads, cpy_reads; socklen_t adr_sz; int fd_max, str_len, fd_num, i; […]
Tag: tor
Flutter practice two: repository mode
1.repository Almost all apps, from the simplest to the most complex, include state management and data sources in their architecture. Common state management methods include Bloc, Cubit, Provider, ViewModel, etc. Data sources are classes that directly interact with databases or network clients to obtain corresponding data and parse them into models. Typically, the state manager […]
Use opencv to correct image distortion
1 Affine transformation 1.1 What is affine transformation In image processing, it is often necessary to perform various operations on images, such as translation, scaling, rotation, flipping, etc., which are all affine transformations of images. Image affine transformation, also known as image affine mapping, means that in geometry, a vector space is transformed into another […]
MySQL face vector, Euclidean distance similarity query
Foreword For example, the title uses the extracted face feature vector to write a Euclidean SQL statement to query the top_K data records with the highest similarity in the database. Although the approach is alternative, there is a ready-made facial retrieval API on the market at the business layer, and there is now a vector […]
Android Compose implements number selector
Android Compose implements number selector Preface Blogs to learn from The text is here Use process Conclusion Foreword I haven’t written a blog for a long time. Now let’s write an article about how to implement a numerical scrolling selector in compose. This is because a component in my company’s project uses a similar function. […]
A brief discussion on CoordinatorLayout
Directory Article directory Table of contents 1.What is CoordinatorLayout 2. Features of CoordinatorLayout 3. Usage of CoordinatorLayout 4.CoordinatorLayout related attribute methods Properties of CoordinatorLayout Behavior method Methods of CoordinatorLayout 4.Usage of CoordinatorLayout In Android development, we often need to deal with complex interface interactions and coordination operations. CoordinatorLayout is a useful layout container from the […]
bclinux aarch64 ceph 14.2.10 file storage Ceph File System, you need to deploy mds: ceph-deploy mds
Createapool [root@ceph-0~]#cephosdpoolcreatecephfs_data64pool’cephfs_data’created[root@ceph-0~]#cephosdpoolcreatecephfs_metadata32pool’cephfs_metadata’created cephfs_metadata64error Officialdescription: Metadatapoolstypicallyholduptoafewgigabytesofdata.Forthisreason,itisgenerallyrecommendedtouseasmallerPGcount.Typically64or128isusedinpracticeforlargeclusters. poollist [root@ceph-0~]#cephosdpoollsvdbenchcephfs_datacephfs_metadata Createfilesystem [root@ceph-0~]#cephfsnewcephfscephfs_metadatacephfs_datanewfswithmetadatapool4anddatapool3[root@ceph-0~]#cephfslsname:cephfs,metadatapool:cephfs_metadata,datapools:[cephfs_data] Filesystemstatus [root@ceph-0~]#cephfsstatuscephfscephfs-0clients======+——+——-+—–+———-+—–+——+|Rank|State|MDS|Activity|dns|inos|+——+——-+—–+———-+—–+——++——+——-+—–+———-+—–+——++—————–+———-+——-+——-+|Pool|type|used|avail|+—————–+———-+——-+——-+|cephfs_metadata|metadata|0|103G||cephfs_data|data|0|103G|+—————–+———-+——-+——-++————-+|StandbyMDS|+————-++————-++———+———+|version|daemons|+———+———++———+———+ Clusterstatus [root@ceph-0~]#ceph-scluster:id:ff72b496-d036-4f1b-b2ad-55358f3c16cbhealth:HEALTH_ERR1filesystemisoffline1filesystemisonlinewithfewerMDSthanmax_mdsmonceph-0islowonavailablespace services:mon:4daemons,quorumceph-3,ceph-1,ceph-0,ceph-2(age4h)mgr:ceph-0(active,since45h),standbys:ceph-1,ceph-3,ceph-2mds:cephfs:0osds:4osds:3up(since45h),3in(since44h) data:pools:3pools,224pgsobjects:4.30kobjects,17GiBusage:53GiBused,247GiB/300GiBavailablepgs:224active+clean Viewmdsstatus(x) [root@ceph-0~]#cephmdsstatcephfs:0 mdshasnoreadynode Thisserviceisnotdeployedbasedonceph-deploy ceph-deploydeploymds ceph-deploymdscreateceph-0ceph-1ceph-2ceph-3 Deploymentsuccesslog [root@ceph-0~]#cd/etc/ceph/ [root@ceph-0ceph]#ceph-deploymdscreateceph-0ceph-1ceph-2ceph-3 [ceph_deploy.conf][DEBUG]foundconfigurationfileat:/root/.cephdeploy.conf [ceph_deploy.cli][INFO]Invoked(2.0.1):/usr/bin/ceph-deploymdscreateceph-0ceph-1ceph-2ceph-3 [ceph_deploy.cli][INFO]ceph-deployoptions: [ceph_deploy.cli][INFO]username:None [ceph_deploy.cli][INFO]verbose:False [ceph_deploy.cli][INFO]overwrite_conf:False [ceph_deploy.cli][INFO]subcommand:create [ceph_deploy.cli][INFO]quiet:False [ceph_deploy.cli][INFO]cd_conf:<ceph_deploy.conf.cephdeploy.Confinstanceat0xffff976c7640> [ceph_deploy.cli][INFO]cluster:ceph [ceph_deploy.cli][INFO]func:<functionmdsat0xffff977620d0> [ceph_deploy.cli][INFO]ceph_conf:None [ceph_deploy.cli][INFO]mds:[(‘ceph-0′,’ceph-0’),(‘ceph-1′,’ceph-1’),(‘ceph-2′,’ceph-2’),(‘ceph-3′,’ceph-3’)] [ceph_deploy.cli][INFO]default_release:False [ceph_deploy.mds][DEBUG]Deployingmds,clustercephhostsceph-0:ceph-0ceph-1:ceph-1ceph-2:ceph-2ceph-3:ceph-3 [ceph-0][DEBUG]connectedtohost:ceph-0 [ceph-0][DEBUG]detectplatforminformationfromremotehost 21.10U3LTS bclinux [ceph-0][DEBUG]detectmachinetype [ceph_deploy.mds][INFO]Distroinfo:bclinux21.10U321.10U3LTS [ceph_deploy.mds][DEBUG]remotehostwillusesystemd [ceph_deploy.mds][DEBUG]deployingmdsbootstraptoceph-0 [ceph-0][DEBUG]writeclusterconfigurationto/etc/ceph/{cluster}.conf [ceph-0][WARNIN]mdskeyringdoesnotexistyet,creatingone [ceph-0][DEBUG]createakeyringfile [ceph-0][DEBUG]createpathifitdoesn’texist [ceph-0][INFO]Runningcommand:ceph–clusterceph–nameclient.bootstrap-mds–keyring/var/lib/ceph/bootstrap-mds/ceph.keyringauthget-or-createmds.ceph-0osdallowrwxmdsallowmonallowprofilemds-o/var/lib/ceph/mds/ceph-ceph-0/keyring [ceph-0][INFO]Runningcommand:systemctlenableceph-mds@ceph-0 [ceph-0][WARNIN]Createdsymlink/etc/systemd/system/ceph-mds.target.wants/ceph-mds@ceph-0.service→/usr/lib/systemd/system/ceph-mds@.service. [ceph-0][INFO]Runningcommand:systemctlstartceph-mds@ceph-0 […]
SSD trains its own data set (Pytorch), super detailed version! ! ! !
I recently started to learn the SSD algorithm. From being confused when I got the code to finally being able to run my own code (I have a weak foundation), I am very, very happy. This article mainly introduces my modification process and the encounters I encountered during the training process. The problems I mentioned […]
Refactor Android asynchronous code using promises
Author: Wushan Old Demon Background Writing Android asynchronous tasks in business has always been a challenge. The previous callback and thread management methods were complex and cumbersome, making the code difficult to maintain and read. JavaScript actually faces the same problem in the front-end field, and Promise is one of its more mainstream solutions. Before […]
10. C++ operator overloading
1. Operator + overloading #include <iostream> #include <string.h> #include <unistd.h> using namespace std; class Point { private: int x; int y; public: Point() {} Point(int x, int y) : x(x), y(y) {} int getX(){ return x; } int getY(){ return y; } void setX(int x){ this->x = x; } void setY(int y){ this->y = y; […]