Skip to content

Instantly share code, notes, and snippets.

View lcongdanh's full-sized avatar

Danh Le lcongdanh

  • Viet Nam
  • 06:24 (UTC +07:00)
View GitHub Profile
@nax3t
nax3t / instructions
Last active July 21, 2020 08:16
Code for https://youtu.be/b089GmAvUyQ MongoDB c9.io Install Instructions
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
// 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;
@filipelenfers
filipelenfers / installJdkTarGzUbuntu.sh
Last active June 15, 2024 14:33
Install JDK from tar.gz Ubuntu
#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
/*
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>
@mycodeschool
mycodeschool / Queue_CircularArrayImplementation.cpp
Last active May 25, 2024 10:46
Queue - Array Implementation
/* 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];
@mycodeschool
mycodeschool / Stack_ArrayImplementation.C
Last active June 22, 2024 12:46
This is a basic array based implementation of stack data structure in C.
// 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.