This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stack - Array based implementation. | |
// Creating a stack of integers. | |
#include<stdio.h> | |
#define MAX_SIZE 101 | |
int A[MAX_SIZE]; // integer array to store the stack | |
int top = -1; // variable to mark top of stack in array | |
// Push operation to insert an element on top of stack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Queue - Circular Array implementation in C++*/ | |
#include<iostream> | |
using namespace std; | |
#define MAX_SIZE 101 //maximum size of the array that will store Queue. | |
// Creating a class named Queue. | |
class Queue | |
{ | |
private: | |
int A[MAX_SIZE]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Evaluation Of postfix Expression in C++ | |
Input Postfix expression must be in a desired format. | |
Operands must be integers and there should be space in between two operands. | |
Only '+' , '-' , '*' and '/' operators are expected. | |
*/ | |
#include<iostream> | |
#include<stack> | |
#include<string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Login as root | |
sudo su | |
#create jdk directory | |
mkdir /opt/jdk | |
#uncompress, change to your file name | |
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk | |
#check if files are there |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place this file the path such ends with: ChatServer/server/ChatServer.java | |
package ChatServer.server; | |
import java.io.IOException; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killall mongod | |
sudo apt-get purge -y mongodb-org* | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 | |
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
rm -rf mongod | |
echo "mongod --dbpath=data --nojournal" > mongod | |
chmod a+x mongod |