Skip to main content

Posts

UDP SOCKETS CHAT APPLICATION (SERVER & CLIENT) USING C

SERVER #include<stdio.h> #include<netinet/in.h> #include<sys/types.h> #include<sys/socket.h> #include<netdb.h> #include<string.h> #include<stdlib.h> #define MAX 80 #define PORT 43454 #define SA struct sockaddr void func(int sockfd) { char buff[MAX]; int n,clen; struct sockaddr_in cli; clen=sizeof(cli); for(;;) { bzero(buff,MAX); recvfrom(sockfd,buff,sizeof(buff),0,(SA *)&cli,&clen); printf("From client %s To client",buff); bzero(buff,MAX); n=0; while((buff[n++]=getchar())!='\n'); sendto(sockfd,buff,sizeof(buff),0,(SA *)&cli,clen); if(strncmp("exit",buff,4)==0) { printf("Server Exit...\n"); break; } } } int main() { int sockfd; struct sockaddr_in servaddr; sockfd=socket(AF_INET,SOCK_DGRAM,0); if(sockfd==-1) { printf("socket creation failed...\n"); exit(0); } else printf("Socket successfully cre...

Linux Increase The Maximum Number Of Open Files / File Descriptors (FD)

Linux Increase The Maximum Number Of Open Files / File Descriptors (FD) last updated  September 16, 2015   in  Categories BASH Shell ,  CentOS ,  Debian / Ubuntu ,  File system ,  Linux ,  RedHat and Friends ,  Suse ,  Ubuntu Linux H ow do I increase the maximum number of open files under CentOS Linux? How do I open more file descriptors under Linux? The ulimit command provides control over the resources available to the shell and/or to processes started by it, on systems that allow such control. The maximum number of open file descriptors displayed with following command (login as the root user). Command To List Number Of Open File Descriptors Use the following command command to display maximum number of open file descriptors: cat /proc/sys/fs/file-max Output: 75000 75000 files normal user can have open in single login session. To see the hard and soft values, issue the command as follows: # ulimit -Hn # ulimit -Sn To se...

How to change all columns' and tables' collation to 'utf8_bin' in MySQL

Run The following Command SELECT * FROM information_schema.COLUMNS WHERE table_schema = '<dbname>' AND collation_name != 'utf8_bin'; SELECT * FROM information_schema.COLUMNS WHERE table_schema = '<dbname>' AND collation_name != 'utf8_bin' \G; use <dbname>; SET foreign_key_checks = 0; ALTER TABLE <table name> CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; SET foreign_key_checks = 1; Note: for more detail info visit following link https://confluence.atlassian.com/jirakb/how-to-change-all-columns-and-tables-collation-to-utf8_bin-in-mysql-601456761.html

Jira Migration : Database Setup for MYSQL

Make Ready Your Database as follows instruction. Database Setup for MYSQL https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html This page provides instructions for configuring Confluence to use a MySQL database. Before you start See  Supported Platforms  to check your version of MySQL is supported. You may need to upgrade your database before installing Confluence. If you're switching from another database, including the embedded evaluation database, read  Migrating to Another Database  before you begin. Confluence will not work on MySQL variants such as  MariaDB ( CONFSERVER-29060 ) and Percona Server ( CONFSERVER-36471 ) 1. Install MySQL Server If you don't already have MySQL installed,  download  and install it now. See the  MySQL documentation  for step-by-step instructions. 2. Configure MySQL Server In this step, you will configure your MySQL database server. Note:  If you int...