Skip to main content

Posts

Showing posts with the label #Casual

Message Scroller (Big and Styled Characters)

/*     IDEA BY OUR SIR     Programmer - Aditya Gupta (aka. Techy15)     Language - C++     NAMASTE ! */ //Known Bug : It doesn't scroll if it the length of the bigger string matches the terminal width, for a second or so /*LEARNT ThINGS :  * VIM : :%s/foo/bar/g finds and replaces ALL 'foo' with 'bar'  * A - 65  * a - 97  *Observation - Terminal in windowed mode has a heiht of 23 lines, width of 80 characters; and in full screen, has a height of 38 lines, and width of 169 characters [Useful for creating clrscr alternative with newlines] */ #include <iostream> #include <string> #include <unistd.h> #ifdef _WIN32   //Macro defined by MSVC (Microsoft Visual C++) compiler (not g++)     #include <windows.h> #elif __linux__     #include <sys/ioctl.h> #elif __MINGW32__   //MinGW (g++)     #incl...

Decimal to Binary (wo Array) - A DIFFERENT APPROACH (the way i do it)

 /* * Title - Decimal to Binary Converter - My Way  *  * Programmer - Aditya Gupta (@Techy15)  *  * */ /*The more general approach is to take remainders after dividing by 2, but this one is by comparison*/ /*Compiled with g++ on Zorin OS (Linux)*/ #include<iostream> using namespace std; long pow(int a, int power){         if(power==0) return 1;         else if(power==1) return a;         else return a*pow(a,power-1);         } int main(){         int dec,bin=0,wtemp1,wtemp2,i=0;         cin>>dec; wtemp1=wtemp2=dec;         while(wtemp1>0){                         while(...

AP, GP Generator (using Linked List)

//Future advancements-> add save as file, in text or in a database option (for the sequences) //                      add more series to this //Programmer - Aditya Gupta #include<iostream> #include<stdlib.h> #include<math.h> //#include<fstream> //reqd when save support is added to this! using namespace std; struct Node{ int data; Node* next; }; void inline title(void){ system("cls"); cout<<"\tNAMASTE!...\n\nProgram-AP,GP Generator\nPrograammer - MR. ADITYA GUPTA (TEChY 3)\n\n"; } class List{ //NOTE: I HAVE REMOVED ALL COMMENTS, REFER TO THE LINKED LIST TEMPLATE FOR DETAILED COMMENTS             //here only generator specific comments are there, and that too which are not in template Node *top,*rear; public: void Push(int dat); int isempty(); int search(int dat); int noo...

MY ENCODER / DECODER (The Way i Do it!)

/* ======================= MY ENCODER / DECODER ======================= ------------------------- Further ideas - 1. Encode whole of a file given by user (but, how to set the file stream to input a file name given in run time, and not a predefined name) 2. Make it more advance by using many encryption techniques, and let the program chose any one of them randomly, taki khud programmer ko bhi pata na ho ki kaun se coding se decode hoga, and set a password in the program bnefore askig to decode, because that will be the only way 3. Currently i am supporting sentence input of maximum 101 characters, increase it to unlimited using stacks, queues, etc. 4. Add support for encoding and decoding other characters as well 5. In the print() function - Add a condition (maybe using iomanip.h) so as to print first character as capital, in case of printing decoded string 6.In the ctb() function -   {i}  Try to remove the assumption by modifying the functio...